3434
3535@pytest .mark .skip_must_gather
3636class TestModelCatalogGeneral :
37- @pytest .mark .post_upgrade
38- def test_config_map_exists (self : Self , catalog_config_map : ConfigMap ):
39- # Check that the default configmaps is created when model registry is
37+ @pytest .mark .parametrize (
38+ "model_catalog_config_map" ,
39+ [
40+ pytest .param (
41+ {"configmap_name" : "model-catalog-sources" },
42+ id = "test_model_catalog_sources_configmap" ,
43+ ),
44+ pytest .param (
45+ {"configmap_name" : "model-catalog-default-sources" },
46+ id = "test_model_catalog_default_sources_configmap" ,
47+ ),
48+ ],
49+ indirect = ["model_catalog_config_map" ],
50+ )
51+ def test_config_map_exists (self : Self , model_catalog_config_map : ConfigMap ):
52+ # Check that model catalog configmaps is created when model registry is
4053 # enabled on data science cluster.
41- assert catalog_config_map .exists , f"{ catalog_config_map .name } does not exist"
42- catalogs = yaml .safe_load (catalog_config_map .instance .data ["sources.yaml" ])["catalogs" ]
54+ catalogs = yaml .safe_load (model_catalog_config_map .instance .data ["sources.yaml" ])["catalogs" ]
4355 assert catalogs
44- assert len (catalogs ) == 1 , f"{ catalog_config_map .name } should have 1 catalog"
56+ assert len (catalogs ) == 1 , f"{ model_catalog_config_map .name } should have 1 catalog"
4557 validate_default_catalog (default_catalog = catalogs [0 ])
4658
4759 @pytest .mark .parametrize (
@@ -65,7 +77,6 @@ def test_config_map_exists(self: Self, catalog_config_map: ConfigMap):
6577 ),
6678 ],
6779 )
68- @pytest .mark .post_upgrade
6980 def test_model_catalog_resources_exists (
7081 self : Self , admin_client : DynamicClient , model_registry_namespace : str , resource_name : Any
7182 ):
0 commit comments