|
3 | 3 | import pexpect |
4 | 4 | import pytest |
5 | 5 | from ocp_resources.pod import Pod |
6 | | -from pytest_testconfig import config as py_config |
7 | 6 |
|
8 | | -from tests.storage.utils import create_cirros_dv |
9 | | -from utilities.constants import QUARANTINED, TIMEOUT_1MIN, UNPRIVILEGED_PASSWORD, UNPRIVILEGED_USER |
| 7 | +from utilities.constants import TIMEOUT_1MIN, TIMEOUT_2MIN, UNPRIVILEGED_PASSWORD, UNPRIVILEGED_USER |
10 | 8 | from utilities.infra import login_with_user_password |
| 9 | +from utilities.storage import create_dv, get_dv_size_from_datasource |
11 | 10 |
|
12 | 11 | pytestmark = pytest.mark.post_upgrade |
13 | 12 |
|
@@ -40,13 +39,23 @@ def dv_created_by_specific_user( |
40 | 39 | request, |
41 | 40 | namespace, |
42 | 41 | client_for_test, |
| 42 | + fedora_data_source_scope_module, |
| 43 | + storage_class_name_scope_function, |
43 | 44 | ): |
44 | | - yield from create_cirros_dv( |
45 | | - name=request.param["data_volume_name"], |
46 | | - namespace=namespace.name, |
47 | | - storage_class=py_config["default_storage_class"], |
| 45 | + with create_dv( |
| 46 | + dv_name=request.param["data_volume_name"], |
| 47 | + storage_class=storage_class_name_scope_function, |
48 | 48 | client=client_for_test, |
49 | | - ) |
| 49 | + namespace=namespace.name, |
| 50 | + source_ref={ |
| 51 | + "kind": fedora_data_source_scope_module.kind, |
| 52 | + "name": fedora_data_source_scope_module.name, |
| 53 | + "namespace": fedora_data_source_scope_module.namespace, |
| 54 | + }, |
| 55 | + size=get_dv_size_from_datasource(data_source=fedora_data_source_scope_module), |
| 56 | + ) as dv: |
| 57 | + dv.wait_for_dv_success(timeout=TIMEOUT_2MIN) |
| 58 | + yield dv |
50 | 59 |
|
51 | 60 |
|
52 | 61 | @pytest.fixture() |
@@ -86,13 +95,8 @@ def client_for_test(request, admin_client, unprivileged_client): |
86 | 95 | ], |
87 | 96 | indirect=True, |
88 | 97 | ) |
89 | | -@pytest.mark.xfail( |
90 | | - reason=f"{QUARANTINED}: Timeout exceeded. Tracked in CNV-62312", |
91 | | - run=False, |
92 | | -) |
93 | 98 | @pytest.mark.s390x |
94 | 99 | def test_virtctl_libguestfs_with_specific_user( |
95 | | - client_for_test, |
96 | 100 | virtctl_libguestfs_by_user, |
97 | 101 | ): |
98 | 102 | virtctl_libguestfs_by_user.sendline("libguestfs-test-tool") |
|
0 commit comments