|
6 | 6 | FOREMAN_PROXY_PORT = 8443 |
7 | 7 |
|
8 | 8 |
|
9 | | -def get_proxy_v2_features(server, certificates, server_fqdn): |
| 9 | +@pytest.fixture(scope="module") |
| 10 | +def proxy_v2_features(server, certificates, server_fqdn): |
10 | 11 | cmd = server.run( |
11 | 12 | f"curl --cacert {certificates['server_ca_certificate']} " |
12 | 13 | f"--cert {certificates['client_certificate']} " |
@@ -56,17 +57,15 @@ def test_foreman_proxy_client_auth_to_foreman(server, certificates, server_fqdn) |
56 | 57 |
|
57 | 58 |
|
58 | 59 | @pytest.mark.feature('bmc') |
59 | | -def test_bmc_capabilities(server, certificates, server_fqdn): |
60 | | - features = get_proxy_v2_features(server, certificates, server_fqdn) |
61 | | - assert 'bmc' in features |
62 | | - capabilities = features['bmc'].get('capabilities', []) |
| 60 | +def test_bmc_capabilities(proxy_v2_features): |
| 61 | + assert 'bmc' in proxy_v2_features |
| 62 | + capabilities = proxy_v2_features['bmc'].get('capabilities', []) |
63 | 63 | assert 'ipmitool' in capabilities |
64 | 64 | assert 'freeipmi' in capabilities |
65 | 65 | assert 'redfish' in capabilities |
66 | 66 |
|
67 | 67 |
|
68 | 68 | @pytest.mark.feature('bmc') |
69 | | -def test_bmc_default_provider(server, certificates, server_fqdn): |
70 | | - features = get_proxy_v2_features(server, certificates, server_fqdn) |
71 | | - settings = features['bmc'].get('settings', {}) |
| 69 | +def test_bmc_default_provider(proxy_v2_features): |
| 70 | + settings = proxy_v2_features['bmc'].get('settings', {}) |
72 | 71 | assert settings.get('bmc_default_provider') == 'ipmitool' |
0 commit comments