|
36 | 36 | _ns, |
37 | 37 | _sa_to_user, |
38 | 38 | _snapshot_cr, |
| 39 | + _wait_for_maas_auth_policy_ready, |
| 40 | + _wait_for_maas_subscription_ready, |
39 | 41 | _wait_reconcile, |
40 | 42 | DISTINCT_MODEL_ID, |
41 | 43 | DISTINCT_MODEL_REF, |
@@ -1099,7 +1101,10 @@ def test_user_token_returns_all_models(self): |
1099 | 1101 | _create_test_auth_policy(auth2_name, DISTINCT_MODEL_2_REF, users=[sa_user]) |
1100 | 1102 | _create_test_subscription(sub2_name, DISTINCT_MODEL_2_REF, users=[sa_user]) |
1101 | 1103 |
|
1102 | | - _wait_reconcile() |
| 1104 | + _wait_for_maas_auth_policy_ready(auth1_name) |
| 1105 | + _wait_for_maas_auth_policy_ready(auth2_name) |
| 1106 | + _wait_for_maas_subscription_ready(sub1_name) |
| 1107 | + _wait_for_maas_subscription_ready(sub2_name) |
1103 | 1108 |
|
1104 | 1109 | # Query with user token (no X-MaaS-Subscription header) |
1105 | 1110 | log.info("Querying /v1/models with user token (no header)") |
@@ -1954,7 +1959,10 @@ def test_service_account_token_multiple_subs_no_header(self): |
1954 | 1959 | _create_test_auth_policy(auth2_name, DISTINCT_MODEL_2_REF, users=[sa_user]) |
1955 | 1960 | _create_test_subscription(sub2_name, DISTINCT_MODEL_2_REF, users=[sa_user]) |
1956 | 1961 |
|
1957 | | - _wait_reconcile() |
| 1962 | + _wait_for_maas_auth_policy_ready(auth1_name) |
| 1963 | + _wait_for_maas_auth_policy_ready(auth2_name) |
| 1964 | + _wait_for_maas_subscription_ready(sub1_name) |
| 1965 | + _wait_for_maas_subscription_ready(sub2_name) |
1958 | 1966 |
|
1959 | 1967 | # Query with K8s token (no header) |
1960 | 1968 | log.info("Querying /v1/models with K8s token (no header) - should return models from both subscriptions") |
@@ -2018,7 +2026,10 @@ def test_service_account_token_multiple_subs_with_header(self): |
2018 | 2026 | _create_test_auth_policy(auth2_name, DISTINCT_MODEL_2_REF, users=[sa_user]) |
2019 | 2027 | _create_test_subscription(sub2_name, DISTINCT_MODEL_2_REF, users=[sa_user]) |
2020 | 2028 |
|
2021 | | - _wait_reconcile() |
| 2029 | + _wait_for_maas_auth_policy_ready(auth1_name) |
| 2030 | + _wait_for_maas_auth_policy_ready(auth2_name) |
| 2031 | + _wait_for_maas_subscription_ready(sub1_name) |
| 2032 | + _wait_for_maas_subscription_ready(sub2_name) |
2022 | 2033 |
|
2023 | 2034 | # Query with K8s token and header specifying sub1 |
2024 | 2035 | log.info(f"Querying /v1/models with K8s token and header: {sub1_name}") |
|
0 commit comments