@@ -100,6 +100,76 @@ def test_modify_default_catalog_configmap_reconciles(
100100 id = "test_hf_source_unauthorized" ,
101101 marks = pytest .mark .xfail (reason = "RHOAIENG-42213 is causing this failure" ),
102102 ),
103+ pytest .param (
104+ """
105+ catalogs:
106+ - name: HuggingFace Hub
107+ id: error_catalog
108+ type: hf
109+ enabled: true
110+ includedModels:
111+ - abc-random*
112+ """ ,
113+ 'failed to expand model patterns: wildcard pattern "abc-random*" is not supported - '
114+ "Hugging Face requires a specific organization" ,
115+ id = "test_hf_source_invalid_organization" ,
116+ ),
117+ pytest .param (
118+ """
119+ catalogs:
120+ - name: HuggingFace Hub
121+ id: error_catalog
122+ type: hf
123+ enabled: true
124+ includedModels:
125+ - '*'
126+ """ ,
127+ 'failed to expand model patterns: wildcard pattern "*" is not supported - '
128+ "Hugging Face requires a specific organization" ,
129+ id = "test_hf_source_global_wildcard" ,
130+ ),
131+ pytest .param (
132+ """
133+ catalogs:
134+ - name: HuggingFace Hub
135+ id: error_catalog
136+ type: hf
137+ enabled: true
138+ includedModels:
139+ - '*/*'
140+ """ ,
141+ 'failed to expand model patterns: wildcard pattern "*/*" is not supported - '
142+ "Hugging Face requires a specific organization" ,
143+ id = "test_hf_source_global_org_wildcard" ,
144+ ),
145+ pytest .param (
146+ """
147+ catalogs:
148+ - name: HuggingFace Hub
149+ id: error_catalog
150+ type: hf
151+ enabled: true
152+ includedModels:
153+ - 'RedHatAI/'
154+ """ ,
155+ 'failed to expand model patterns: wildcard pattern "RedHatAI/" is not supported - '
156+ "Hugging Face requires a specific organization" ,
157+ id = "test_hf_source_empty_model_name" ,
158+ ),
159+ pytest .param (
160+ """
161+ catalogs:
162+ - name: HuggingFace Hub
163+ id: error_catalog
164+ type: hf
165+ enabled: true
166+ includedModels:
167+ - '*RedHatAI*'
168+ """ ,
169+ 'failed to expand model patterns: wildcard pattern "*RedHatAI*" is not supported - '
170+ "Hugging Face requires a specific organization" ,
171+ id = "test_hf_source_multiple_wildcards" ,
172+ ),
103173 ],
104174 indirect = ["updated_catalog_config_map_scope_function" ],
105175 )
0 commit comments