|
28 | 28 | } |
29 | 29 |
|
30 | 30 |
|
31 | | -@pytest.mark.satellite_iop_only |
32 | | -def test_podman_login_check(request, sat_maintain): |
33 | | - """Test Podman login check with local Red Hat Lightspeed(IoP) Satellite. |
34 | | -
|
35 | | - :id: 70fd6d86-a647-442c-a971-cbd1207b734b |
36 | | -
|
37 | | - :setup: Configure a Satellite with local Red Hat Lightspeed(IoP) enabled. |
38 | | -
|
39 | | - :steps: |
40 | | - 1. Run satellite-maintain update check. |
41 | | - 2. Verify that the Podman login check passes. |
42 | | - 3. Log out of the remote container registry. |
43 | | - 4. Run satellite-maintain update check. |
44 | | - 5. Verify that the Podman login check fails. |
45 | | -
|
46 | | - :Verifies: SAT-35282 |
47 | | - """ |
48 | | - iop_settings = settings.rh_cloud.iop_advisor_engine |
49 | | - |
50 | | - request.addfinalizer(lambda: sat_maintain.podman_logout(iop_settings.registry)) |
51 | | - |
52 | | - check_description = 'Check whether podman needs to be logged in to the registry' |
53 | | - fail_message = ( |
54 | | - 'You are using containers from registry.redhat.io,\n' |
55 | | - 'but your system is not logged in to the registry, or the login expired.\n' |
56 | | - 'Please login to registry.redhat.io.' |
57 | | - ) |
58 | | - # Login to Prod registry to ensure the check runs correctly, it won't work for any other registry |
59 | | - sat_maintain.podman_login(iop_settings.username, iop_settings.token, iop_settings.registry) |
60 | | - result = sat_maintain.cli.Health.check(options={'label': 'container-podman-login'}) |
61 | | - assert 'FAIL' not in result.stdout |
62 | | - assert check_description in result.stdout, result.stdout |
63 | | - sat_maintain.podman_logout(iop_settings.registry) |
64 | | - result = sat_maintain.cli.Health.check(options={'label': 'container-podman-login'}) |
65 | | - assert 'FAIL' in result.stdout |
66 | | - assert fail_message in result.stdout, result.stdout |
67 | | - |
68 | | - |
69 | 31 | @pytest.mark.include_capsule |
70 | 32 | def test_positive_health_list(sat_maintain): |
71 | 33 | """List health check in satellite-maintain |
@@ -166,26 +128,6 @@ def test_positive_health_check_by_tags(sat_maintain): |
166 | 128 | ) |
167 | 129 |
|
168 | 130 |
|
169 | | -@pytest.mark.include_capsule |
170 | | -def test_positive_health_check_pre_upgrade(sat_maintain): |
171 | | - """Verify pre-upgrade health checks |
172 | | -
|
173 | | - :id: f52bd43e-79cd-488b-adbb-3c9e5bac32cc |
174 | | -
|
175 | | - :parametrized: yes |
176 | | -
|
177 | | - :steps: |
178 | | - 1. Run satellite-maintain health check --tags pre-upgrade |
179 | | -
|
180 | | - :expectedresults: Pre-upgrade health checks should pass. |
181 | | - """ |
182 | | - result = sat_maintain.cli.Health.check( |
183 | | - options={'tags': 'pre-upgrade', 'whitelist': 'non-rh-packages'} |
184 | | - ) |
185 | | - assert result.status == 0 |
186 | | - assert 'FAIL' not in result.stdout |
187 | | - |
188 | | - |
189 | 131 | @pytest.mark.include_capsule |
190 | 132 | def test_positive_health_check_server_ping(sat_maintain): |
191 | 133 | """Verify server ping check |
|
0 commit comments