Skip to content

Commit

Permalink
Adds condition for skipping BS creation on IBM cloud for FIPS enabled…
Browse files Browse the repository at this point in the history
… cluster

Signed-off-by: Uday Kurundwade <[email protected]>
  • Loading branch information
udaysk23 committed Jan 6, 2025
1 parent e865d5e commit ab649a5
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/functional/object/mcg/test_multicloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import pytest

from ocs_ci.framework import config
from ocs_ci.framework.pytest_customization.marks import tier1
from ocs_ci.framework.testlib import MCGTest
from ocs_ci.framework.pytest_customization.marks import (
Expand Down Expand Up @@ -55,6 +56,9 @@ def test_multicloud_backingstore_creation(
"""
Test MCG backingstore creation
"""
_, value = backingstore_tup
if config.ENV_DATA.get("fips") == "true" and "ibmcos" in value:
pytest.skip("Skipping test for IBM Cloud on FIPS enabled cluster")

backingstore_factory(*backingstore_tup)

Expand Down
28 changes: 28 additions & 0 deletions tests/functional/object/mcg/test_write_to_bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import pytest
from flaky import flaky

from ocs_ci.framework import config
from ocs_ci.framework.pytest_customization.marks import (
vsphere_platform_required,
skip_inconsistent,
Expand Down Expand Up @@ -205,6 +206,20 @@ def test_mcg_data_deduplication(
awscli_pod_session (pod): A pod running the AWSCLI tools
bucket_factory: Calling this fixture creates a new bucket(s)
"""

if (
config.ENV_DATA.get("fips") == "true"
and "ibmcos" in bucketclass_dict["backingstore_dict"]
):
pytest.skip("Skipping test for IBM Cloud on FIPS enabled cluster")

if (
config.ENV_DATA.get("fips") == "true"
and bucketclass_dict is None
and config.ENV_DATA["platform"].lower() == "ibm_cloud"
):
pytest.skip("Skipping test for IBM Cloud on FIPS enabled cluster")

download_dir = AWSCLI_TEST_OBJ_DIR
file_size = int(
awscli_pod_session.exec_cmd_on_pod(
Expand Down Expand Up @@ -268,6 +283,19 @@ def test_mcg_data_compression(
awscli_pod_session (pod): A pod running the AWSCLI tools
bucket_factory: Calling this fixture creates a new bucket(s)
"""
if (
config.ENV_DATA.get("fips") == "true"
and "ibmcos" in bucketclass_dict["backingstore_dict"]
):
pytest.skip("Skipping test for IBM Cloud on FIPS enabled cluster")

if (
config.ENV_DATA.get("fips") == "true"
and bucketclass_dict is None
and config.ENV_DATA["platform"].lower() == "ibm_cloud"
):
pytest.skip("Skipping test for IBM Cloud on FIPS enabled cluster")

download_dir = AWSCLI_TEST_OBJ_DIR
bucketname = bucket_factory(1, bucketclass=bucketclass_dict)[0].name
full_object_path = f"s3://{bucketname}"
Expand Down

0 comments on commit ab649a5

Please sign in to comment.