diff --git a/src/saltext/azurerm/utils/azurerm.py b/src/saltext/azurerm/utils/azurerm.py index 39e92aa..9f54bb7 100644 --- a/src/saltext/azurerm/utils/azurerm.py +++ b/src/saltext/azurerm/utils/azurerm.py @@ -102,7 +102,7 @@ def _determine_auth(**kwargs): if "client_id" in kwargs and "tenant" in kwargs and "secret" in kwargs: credentials = get_identity_credentials(**kwargs) else: - kwargs.pop("client_id") + kwargs.pop("client_id", None) credentials = DefaultAzureCredential(authority=authority, **kwargs) except ClientAuthenticationError: raise SaltInvocationError( # pylint: disable=raise-missing-from diff --git a/tests/integration/states/test_compute_availability_set.py b/tests/integration/states/test_compute_availability_set.py index 97d3e6d..2e01ca2 100644 --- a/tests/integration/states/test_compute_availability_set.py +++ b/tests/integration/states/test_compute_availability_set.py @@ -1,5 +1,9 @@ import pytest +pytestmark = [ + pytest.mark.destructive_test, +] + @pytest.mark.run(order=4) def test_present(salt_call_cli, availability_set, resource_group, connection_auth): diff --git a/tests/integration/states/test_compute_virtual_machine.py b/tests/integration/states/test_compute_virtual_machine.py index 36d67ea..9e9da77 100644 --- a/tests/integration/states/test_compute_virtual_machine.py +++ b/tests/integration/states/test_compute_virtual_machine.py @@ -3,6 +3,10 @@ import pytest +pytestmark = [ + pytest.mark.destructive_test, +] + @pytest.fixture(scope="session") def password(): diff --git a/tests/integration/states/test_dns.py b/tests/integration/states/test_dns.py index f3b71aa..f18b70e 100644 --- a/tests/integration/states/test_dns.py +++ b/tests/integration/states/test_dns.py @@ -1,5 +1,9 @@ import pytest +pytestmark = [ + pytest.mark.destructive_test, +] + @pytest.mark.run(order=3) def test_zone_present(salt_call_cli, zone, resource_group, connection_auth): diff --git a/tests/integration/states/test_keyvault_key.py b/tests/integration/states/test_keyvault_key.py index 1f2c0c9..6fc8b99 100644 --- a/tests/integration/states/test_keyvault_key.py +++ b/tests/integration/states/test_keyvault_key.py @@ -3,6 +3,10 @@ import pytest +pytestmark = [ + pytest.mark.destructive_test, +] + @pytest.fixture(scope="session") def key(): diff --git a/tests/integration/states/test_keyvault_secret.py b/tests/integration/states/test_keyvault_secret.py index a1e53c0..d288b7a 100644 --- a/tests/integration/states/test_keyvault_secret.py +++ b/tests/integration/states/test_keyvault_secret.py @@ -3,6 +3,10 @@ import pytest +pytestmark = [ + pytest.mark.destructive_test, +] + @pytest.fixture(scope="session") def secret(): diff --git a/tests/integration/states/test_keyvault_vault.py b/tests/integration/states/test_keyvault_vault.py index 30f4862..d594459 100644 --- a/tests/integration/states/test_keyvault_vault.py +++ b/tests/integration/states/test_keyvault_vault.py @@ -2,6 +2,10 @@ import pytest +pytestmark = [ + pytest.mark.destructive_test, +] + @pytest.mark.run(order=3) def test_present( diff --git a/tests/integration/states/test_network_interface.py b/tests/integration/states/test_network_interface.py index 70e6f1d..203c7b6 100644 --- a/tests/integration/states/test_network_interface.py +++ b/tests/integration/states/test_network_interface.py @@ -1,5 +1,9 @@ import pytest +pytestmark = [ + pytest.mark.destructive_test, +] + @pytest.mark.run(order=4) def test_present( diff --git a/tests/integration/states/test_network_route.py b/tests/integration/states/test_network_route.py index f46860c..cf4da65 100644 --- a/tests/integration/states/test_network_route.py +++ b/tests/integration/states/test_network_route.py @@ -1,5 +1,9 @@ import pytest +pytestmark = [ + pytest.mark.destructive_test, +] + @pytest.mark.run(order=3) def test_table_present(salt_call_cli, route_table, resource_group, connection_auth): diff --git a/tests/integration/states/test_network_security_group.py b/tests/integration/states/test_network_security_group.py index 0ac8ccf..0cc5426 100644 --- a/tests/integration/states/test_network_security_group.py +++ b/tests/integration/states/test_network_security_group.py @@ -3,6 +3,10 @@ import pytest +pytestmark = [ + pytest.mark.destructive_test, +] + @pytest.fixture(scope="session") def nsg(): diff --git a/tests/integration/states/test_public_ip_address.py b/tests/integration/states/test_public_ip_address.py index f9cf47c..4ea3603 100644 --- a/tests/integration/states/test_public_ip_address.py +++ b/tests/integration/states/test_public_ip_address.py @@ -1,5 +1,9 @@ import pytest +pytestmark = [ + pytest.mark.destructive_test, +] + @pytest.mark.run(order=3) # Creates a public IP address with a "Standard" SKU for Bastion Host tests and another one with a "Basic" SKU diff --git a/tests/integration/states/test_resource_group.py b/tests/integration/states/test_resource_group.py index 1b9567f..2f8bb45 100644 --- a/tests/integration/states/test_resource_group.py +++ b/tests/integration/states/test_resource_group.py @@ -1,5 +1,9 @@ import pytest +pytestmark = [ + pytest.mark.destructive_test, +] + @pytest.mark.run(order=1, before="test_changes_remove_tag") def test_changes_add_tag(salt_call_cli, resource_group, location, tags, connection_auth): diff --git a/tests/integration/states/test_virtual_network.py b/tests/integration/states/test_virtual_network.py index b70ab2e..763a783 100644 --- a/tests/integration/states/test_virtual_network.py +++ b/tests/integration/states/test_virtual_network.py @@ -1,5 +1,9 @@ import pytest +pytestmark = [ + pytest.mark.destructive_test, +] + @pytest.mark.run(order=3) def test_present(salt_call_cli, vnet, resource_group, location, connection_auth):