From e496238791cd38cc860532ecd8592e5e2c2c49c3 Mon Sep 17 00:00:00 2001 From: Parag Kamble Date: Thu, 11 Jul 2024 16:39:04 +0530 Subject: [PATCH] Added skip marker to test if azure KV config is not set. Signed-off-by: Parag Kamble --- ocs_ci/framework/pytest_customization/marks.py | 6 ++++++ .../pv/pv_encryption/test_azure_kms_pv_encryption.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ocs_ci/framework/pytest_customization/marks.py b/ocs_ci/framework/pytest_customization/marks.py index fd2fada6700..38529c86f8d 100644 --- a/ocs_ci/framework/pytest_customization/marks.py +++ b/ocs_ci/framework/pytest_customization/marks.py @@ -32,6 +32,7 @@ MS_CONSUMER_TYPE, HCI_PROVIDER, BAREMETAL_PLATFORMS, + AZURE_KV_PROVIDER_NAME, ) from ocs_ci.utility import version from ocs_ci.utility.aws import update_config_from_s3 @@ -370,6 +371,11 @@ reason="KMS config not found in auth.yaml", ) +azure_kv_config_required = pytest.mark.skipif( + config.ENV_DATA["KMS_PROVIDER"].lower() != AZURE_KV_PROVIDER_NAME, + reason="Azure KV config required to run the test.", +) + external_mode_required = pytest.mark.skipif( config.DEPLOYMENT.get("external_mode") is not True, reason="Test will run on External Mode cluster only", diff --git a/tests/functional/pv/pv_encryption/test_azure_kms_pv_encryption.py b/tests/functional/pv/pv_encryption/test_azure_kms_pv_encryption.py index 82b20ad9dd5..316d4879085 100644 --- a/tests/functional/pv/pv_encryption/test_azure_kms_pv_encryption.py +++ b/tests/functional/pv/pv_encryption/test_azure_kms_pv_encryption.py @@ -5,7 +5,7 @@ tier1, green_squad, azure_platform_required, - kms_config_required, + azure_kv_config_required, polarion_id, skipif_ocs_version, skipif_managed_service, @@ -24,7 +24,7 @@ @tier1 @green_squad @azure_platform_required -@kms_config_required +@azure_kv_config_required @skipif_ocs_version("<4.16") @skipif_managed_service @skipif_hci_provider_and_client