-
Notifications
You must be signed in to change notification settings - Fork 70
[4.21][Storage] De-quarantine libguestfs test and use data source #5263
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
base: cnv-4.21
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,9 +5,9 @@ | |||||||
| from ocp_resources.pod import Pod | ||||||||
| from pytest_testconfig import config as py_config | ||||||||
|
|
||||||||
| from tests.storage.utils import create_cirros_dv | ||||||||
| from utilities.constants import QUARANTINED, TIMEOUT_1MIN, UNPRIVILEGED_PASSWORD, UNPRIVILEGED_USER | ||||||||
| from utilities.constants import TIMEOUT_1MIN, TIMEOUT_3MIN, UNPRIVILEGED_PASSWORD, UNPRIVILEGED_USER | ||||||||
| from utilities.infra import login_with_user_password | ||||||||
| from utilities.storage import create_dv, get_dv_size_from_datasource | ||||||||
|
|
||||||||
| pytestmark = pytest.mark.post_upgrade | ||||||||
|
|
||||||||
|
|
@@ -22,31 +22,42 @@ def virtctl_libguestfs_by_user( | |||||||
| f"virtctl guestfs {dv_created_by_specific_user.name} -n {dv_created_by_specific_user.namespace} \ | ||||||||
| {fs_group_flag}" | ||||||||
| ) | ||||||||
|
|
||||||||
| libguestfs_pod = Pod( | ||||||||
| client=unprivileged_client, | ||||||||
| name=f"libguestfs-tools-{dv_created_by_specific_user.name}", | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done, thank you! |
||||||||
| namespace=dv_created_by_specific_user.namespace, | ||||||||
| ) | ||||||||
| libguestfs_pod.wait_for_status(status=Pod.Status.RUNNING, timeout=TIMEOUT_3MIN) | ||||||||
| guestfs_proc.send("\n\n") | ||||||||
| guestfs_proc.expect("$", timeout=TIMEOUT_1MIN) | ||||||||
| guestfs_proc.expect(r"\$", timeout=TIMEOUT_1MIN) | ||||||||
| yield guestfs_proc | ||||||||
| guestfs_proc.send("exit\n") | ||||||||
| guestfs_proc.expect(pexpect.EOF, timeout=TIMEOUT_1MIN) | ||||||||
| guestfs_proc.close() | ||||||||
| Pod( | ||||||||
| name=f"libguestfs-tools-{dv_created_by_specific_user.name}", | ||||||||
| namespace=dv_created_by_specific_user.namespace, | ||||||||
| ).wait_deleted() | ||||||||
| libguestfs_pod.wait_deleted() | ||||||||
|
|
||||||||
|
|
||||||||
| @pytest.fixture | ||||||||
| def dv_created_by_specific_user( | ||||||||
| request, | ||||||||
| namespace, | ||||||||
| client_for_test, | ||||||||
| fedora_data_source_scope_module, | ||||||||
| ): | ||||||||
| yield from create_cirros_dv( | ||||||||
| name=request.param["data_volume_name"], | ||||||||
| namespace=namespace.name, | ||||||||
| with create_dv( | ||||||||
| dv_name=request.param["data_volume_name"], | ||||||||
| storage_class=py_config["default_storage_class"], | ||||||||
| client=client_for_test, | ||||||||
| ) | ||||||||
| namespace=namespace.name, | ||||||||
| source_ref={ | ||||||||
| "kind": fedora_data_source_scope_module.kind, | ||||||||
| "name": fedora_data_source_scope_module.name, | ||||||||
| "namespace": fedora_data_source_scope_module.namespace, | ||||||||
| }, | ||||||||
| size=get_dv_size_from_datasource(data_source=fedora_data_source_scope_module), | ||||||||
| ) as dv: | ||||||||
| dv.wait_for_dv_success() | ||||||||
| yield dv | ||||||||
|
|
||||||||
|
|
||||||||
| @pytest.fixture() | ||||||||
|
|
@@ -86,13 +97,8 @@ def client_for_test(request, admin_client, unprivileged_client): | |||||||
| ], | ||||||||
| indirect=True, | ||||||||
| ) | ||||||||
| @pytest.mark.xfail( | ||||||||
| reason=f"{QUARANTINED}: Timeout exceeded. Tracked in CNV-62312", | ||||||||
| run=False, | ||||||||
| ) | ||||||||
|
Comment on lines
-89
to
-92
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's keep the DataSource change, but the test still needs to stay quarantined. I see it fails in 4.22 tier2 lane. |
||||||||
| @pytest.mark.s390x | ||||||||
| def test_virtctl_libguestfs_with_specific_user( | ||||||||
| client_for_test, | ||||||||
| virtctl_libguestfs_by_user, | ||||||||
| ): | ||||||||
| virtctl_libguestfs_by_user.sendline("libguestfs-test-tool") | ||||||||
|
|
||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test Execution Plan
Run smoke tests: False
No smoke-marked test depends on
test_libguestfs.py, the removedcreate_cirros_dvhelper (now deleted fromtests/storage/utils.py), or any changed symbol. Verified: zero remaining callers ofcreate_cirros_dvintests/;test_libguestfs.pycarries no@pytest.mark.smokemarker.Run gating tests: False
No gating-marked test file is in the affected set. Verified:
rg -l '@pytest.mark.gating' tests/returned no results.Affected tests to run
tests/storage/test_libguestfs.py::test_virtctl_libguestfs_with_specific_user(tier2) — de-quarantined; now clones fromfedora_data_source_scope_moduleviacreate_dv(replaces HTTP import of Cirros); addslibguestfs_pod.wait_for_status(RUNNING)before shell interaction; fixes regex"$"→r"\\$"for pexpect; reuseslibguestfs_podreference forwait_deleted.