Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test_nsfs_system test case #10675

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions tests/cross_functional/system_test/test_nsfs_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
)
from ocs_ci.ocs.ocp import OCP
from ocs_ci.ocs.resources import pod

from ocs_ci.ocs.resources.mcg_params import NSFS
from ocs_ci.ocs.resources.pod import get_mds_pods, wait_for_storage_pods
from tests.conftest import revert_noobaa_endpoint_scc_class

logger = logging.getLogger(__name__)

Expand All @@ -39,6 +39,7 @@
@skipif_mcg_only
@ignore_leftovers
@skipif_ocs_version("<4.10")
@pytest.mark.usefixtures(revert_noobaa_endpoint_scc_class.__name__)
class TestNSFSSystem(MCGTest):
"""
NSFS system test
Expand Down Expand Up @@ -81,6 +82,9 @@ def test_nsfs(
nsfs_bucket_factory(nsfs_obj)
logger.info(f"Successfully created NSFS bucket: {nsfs_obj.bucket_name}")

# Waiting for the changes to propagate
sleep(30)

# Put, Get, Copy, Head, list and Delete S3 operations
for nsfs_obj in nsfs_objs:
logger.info(f"Put and Get object operation on {nsfs_obj.bucket_name}")
Expand Down Expand Up @@ -150,7 +154,8 @@ def test_nsfs(
pattern=nsfs_obj_pattern,
s3_creds=nsfs_obj.s3_creds,
result_pod=nsfs_obj.interface_pod,
result_pod_path=nsfs_obj.mount_path + "/" + nsfs_obj.bucket_name,
# result_pod_path=nsfs_obj.mount_path + "/" + nsfs_obj.bucket_name,
result_pod_path=nsfs_obj.mounted_bucket_path,
)
pods_to_respin = [
pod.Pod(
Expand Down Expand Up @@ -186,13 +191,13 @@ def test_nsfs(
sync_object_directory(
podobj=awscli_pod_session,
src=f"s3://{nsfs_obj.bucket_name}",
target=nsfs_obj.mount_path + "/" + nsfs_obj.bucket_name,
target=f"{test_directory_setup.result_dir}/{nsfs_obj.bucket_name}/a",
signed_request_creds=nsfs_obj.s3_creds,
)
compare_directory(
awscli_pod=awscli_pod_session,
original_dir=f"{test_directory_setup.origin_dir}/{nsfs_obj.bucket_name}",
result_dir=nsfs_obj.mount_path + "/" + nsfs_obj.bucket_name,
result_dir=f"{test_directory_setup.result_dir}/{nsfs_obj.bucket_name}/a",
amount=5,
pattern=nsfs_obj_pattern,
result_pod=nsfs_obj.interface_pod,
Expand All @@ -203,13 +208,13 @@ def test_nsfs(
sync_object_directory(
podobj=awscli_pod_session,
src=f"s3://{nsfs_obj.bucket_name}",
target=nsfs_obj.mount_path + "/" + nsfs_obj.bucket_name,
target=f"{test_directory_setup.result_dir}/{nsfs_obj.bucket_name}/b",
signed_request_creds=nsfs_obj.s3_creds,
)
compare_directory(
awscli_pod=awscli_pod_session,
original_dir=f"{test_directory_setup.origin_dir}/{nsfs_obj.bucket_name}",
result_dir=nsfs_obj.mount_path + "/" + nsfs_obj.bucket_name,
result_dir=f"{test_directory_setup.result_dir}/{nsfs_obj.bucket_name}/b",
amount=5,
pattern=nsfs_obj_pattern,
result_pod=nsfs_obj.interface_pod,
Expand All @@ -231,13 +236,13 @@ def test_nsfs(
sync_object_directory(
podobj=awscli_pod_session,
src=f"s3://{nsfs_obj.bucket_name}",
target=nsfs_obj.mount_path + "/" + nsfs_obj.bucket_name,
target=f"{test_directory_setup.result_dir}/{nsfs_obj.bucket_name}/c",
signed_request_creds=nsfs_obj.s3_creds,
)
compare_directory(
awscli_pod=awscli_pod_session,
original_dir=f"{test_directory_setup.origin_dir}/{nsfs_obj.bucket_name}",
result_dir=nsfs_obj.mount_path + "/" + nsfs_obj.bucket_name,
result_dir=f"{test_directory_setup.result_dir}/{nsfs_obj.bucket_name}/c",
amount=5,
pattern=nsfs_obj_pattern,
result_pod=nsfs_obj.interface_pod,
Expand Down
Loading