1212
1313
1414@pytest .mark .parametrize (
15- "updated_dsc_component_state_scope_class, model_registry_instance_rest_endpoint " ,
15+ "updated_dsc_component_state_scope_class, is_model_registry_oauth " ,
1616 [
1717 pytest .param (
1818 {
2323 },
2424 }
2525 },
26- {"service_fixture " : "model_registry_instance_service" },
27- id = "standard_endpoint " ,
26+ {"use_oauth_proxy " : False },
27+ id = "servicemesh " ,
2828 ),
2929 pytest .param (
3030 {
3535 },
3636 }
3737 },
38- {"service_fixture " : "model_registry_instance_oauth_service" },
39- id = "oauth_endpoint " ,
38+ {"use_oauth_proxy " : True },
39+ id = "oauth " ,
4040 ),
4141 ],
4242 indirect = True ,
4343 scope = "class" ,
4444)
45- @pytest .mark .usefixtures ("updated_dsc_component_state_scope_class" )
45+ @pytest .mark .usefixtures ("updated_dsc_component_state_scope_class" , "is_model_registry_oauth" )
4646class TestModelRegistryRBAC :
4747 """
4848 Tests RBAC for Model Registry REST endpoint using ServiceAccount tokens.
@@ -63,9 +63,7 @@ def test_service_account_access_denied(
6363 """
6464 LOGGER .info ("--- Starting RBAC Test: Access Denied ---" )
6565 LOGGER .info (f"Targeting Model Registry REST endpoint: { model_registry_instance_rest_endpoint } " )
66- LOGGER .info (
67- f"Using { 'OAuth' if request .node .callspec .id == 'oauth_endpoint' else 'standard' } client configuration"
68- )
66+ LOGGER .info (f"Using { 'OAuth' if request .node .callspec .id == 'oauth' else 'servicemesh' } client configuration" )
6967 LOGGER .info ("Expecting initial access DENIAL (403 Forbidden)" )
7068
7169 client_args = build_mr_client_args (
@@ -98,9 +96,7 @@ def test_service_account_access_granted(
9896 """
9997 LOGGER .info ("--- Starting RBAC Test: Access Granted ---" )
10098 LOGGER .info (f"Targeting Model Registry REST endpoint: { model_registry_instance_rest_endpoint } " )
101- LOGGER .info (
102- f"Using { 'OAuth' if request .node .callspec .id == 'oauth_endpoint' else 'standard' } client configuration"
103- )
99+ LOGGER .info (f"Using { 'OAuth' if request .node .callspec .id == 'oauth' else 'servicemesh' } client configuration" )
104100 LOGGER .info ("Applied RBAC Role/Binding via fixtures. Expecting access GRANT." )
105101
106102 try :
0 commit comments