@@ -224,32 +224,25 @@ func TestGetBundleInfoFromNameValid(t *testing.T) {
224
224
{"crc_hyperv_4.18.0_arm64.crcbundle" , preset .OpenShift .String (), "hyperv" , "4.18.0" , "arm64" , "" },
225
225
{"crc_libvirt_4.18.0-ec.2_amd64.crcbundle" , preset .OpenShift .String (), "libvirt" , "4.18.0-ec.2" , "amd64" , "" },
226
226
227
- {"crc_hyperv_4.18_x86.crcbundle" , preset .OpenShift .String (), "hyperv" , "4.18" , "x86" , "" },
228
- {"crc_microshift_hyperv_4.18_x86.crcbundle" , preset .Microshift .String (), "hyperv" , "4.18" , "x86" , "" },
229
- {"crc_microshift_hyperv_4.18_x86_1233.crcbundle" , preset .Microshift .String (), "hyperv" , "4.18" , "x86" , "1233" },
230
- {"crc_hyperv_4.18_x86_4566.crcbundle" , preset .OpenShift .String (), "hyperv" , "4.18" , "x86" , "4566" },
231
- {"crc_ABCdrv_4.18.0_x86_4566.crcbundle" , preset .OpenShift .String (), "ABCdrv" , "4.18.0" , "x86" , "4566" },
232
- {"crc_ABCdrv_4.18.1.2_x86_4566.crcbundle" , preset .OpenShift .String (), "ABCdrv" , "4.18.1.2" , "x86" , "4566" },
233
- {"crc_hyperv_4.18_x86.crcbundle" , preset .OpenShift .String (), "hyperv" , "4.18" , "x86" , "" },
227
+ {"crc_microshift_hyperv_4.18.0_x86.crcbundle" , preset .Microshift .String (), "hyperv" , "4.18.0" , "x86" , "" },
228
+ {"crc_microshift_hyperv_4.18.0_x86_1233.crcbundle" , preset .Microshift .String (), "hyperv" , "4.18.0" , "x86" , "1233" },
229
+ {"crc_hyperv_4.18.0_x86.crcbundle" , preset .OpenShift .String (), "hyperv" , "4.18.0" , "x86" , "" },
230
+ {"crc_hyperv_4.18.0_x86_123.crcbundle" , preset .OpenShift .String (), "hyperv" , "4.18.0" , "x86" , "123" },
234
231
{"crc_ABCdrv_4.18.0_x86.crcbundle" , preset .OpenShift .String (), "ABCdrv" , "4.18.0" , "x86" , "" },
235
- {"crc_ABCdrv_4.18.1.2_x86. crcbundle" , preset .OpenShift .String (), "ABCdrv" , "4.18.1.2 " , "x86" , "" },
236
- {"crc_hyperv_4.18_64bit. crcbundle" , preset .OpenShift .String (), "hyperv" , "4.18" , "64bit" , "" },
237
- {"crc_hyperv_4.1_64bit. crcbundle" , preset .OpenShift .String (), "hyperv" , "4.1" , "64bit" , "" },
232
+ {"crc_ABCdrv_4.18.0_x86_4566. crcbundle" , preset .OpenShift .String (), "ABCdrv" , "4.18.0 " , "x86" , "4566 " },
233
+ {"crc_hyperv_4.18.1_64bit. crcbundle" , preset .OpenShift .String (), "hyperv" , "4.18.1 " , "64bit" , "" },
234
+ {"crc_hyperv_4.1.1-rc.0_64bit. crcbundle" , preset .OpenShift .String (), "hyperv" , "4.1.1-rc.0 " , "64bit" , "" },
238
235
239
236
{"crc_openshift_libvirt_4.16.7_amd64.crcbundle" , preset .OpenShift .String (), "libvirt" , "4.16.7" , "amd64" , "" },
240
237
{"crc_openshift_libvirt_4.16.7_amd64_1.crcbundle" , preset .OpenShift .String (), "libvirt" , "4.16.7" , "amd64" , "1" },
241
- {"crc_openshift_libvirt_00.00.00.00_amd64.crcbundle" , preset .OpenShift .String (), "libvirt" , "00.00.00.00" , "amd64" , "" },
242
- {"crc_openshift_libvirt_00.00.00.00_amd64_100.crcbundle" , preset .OpenShift .String (), "libvirt" , "00.00.00.00" , "amd64" , "100" },
243
238
{"crc_libvirt_4.16.7_intel.crcbundle" , preset .OpenShift .String (), "libvirt" , "4.16.7" , "intel" , "" },
244
239
{"crc_libvirt_4.16.7_intel_23.crcbundle" , preset .OpenShift .String (), "libvirt" , "4.16.7" , "intel" , "23" },
245
240
{"crc_libvirt_4.16.7_64.crcbundle" , preset .OpenShift .String (), "libvirt" , "4.16.7" , "64" , "" },
246
241
{"crc_libvirt_4.16.7_64_132.crcbundle" , preset .OpenShift .String (), "libvirt" , "4.16.7" , "64" , "132" },
247
242
{"crc_microshift_libvirt_4.16.7_64.crcbundle" , preset .Microshift .String (), "libvirt" , "4.16.7" , "64" , "" },
248
243
{"crc_microshift_libvirt_4.16.7_64_123.crcbundle" , preset .Microshift .String (), "libvirt" , "4.16.7" , "64" , "123" },
249
- {"crc_libvirt_4_amd64.crcbundle" , preset .OpenShift .String (), "libvirt" , "4" , "amd64" , "" },
250
- {"crc_libvirt_4_amd64_0123.crcbundle" , preset .OpenShift .String (), "libvirt" , "4" , "amd64" , "0123" },
251
- {"crc_okd_libvirt_4_amd64.crcbundle" , preset .OKD .String (), "libvirt" , "4" , "amd64" , "" },
252
- {"crc_okd_libvirt_4_amd64_0123.crcbundle" , preset .OKD .String (), "libvirt" , "4" , "amd64" , "0123" },
244
+ {"crc_okd_libvirt_4.0.0_amd64.crcbundle" , preset .OKD .String (), "libvirt" , "4.0.0" , "amd64" , "" },
245
+ {"crc_okd_libvirt_4.0.0_amd64_0123.crcbundle" , preset .OKD .String (), "libvirt" , "4.0.0" , "amd64" , "0123" },
253
246
}
254
247
255
248
for _ , parts := range valid {
@@ -268,6 +261,10 @@ func TestGetBundleInfoFromNameInvalid(t *testing.T) {
268
261
_ , err := GetBundleInfoFromName ("crc_libvirt_amd64.crcbundle" )
269
262
assert .Error (t , err )
270
263
264
+ // wrong version format
265
+ _ , err = GetBundleInfoFromName ("crc_hyperv_4.18_x86.crcbundle" )
266
+ assert .Error (t , err )
267
+
271
268
// missing crc prefix
272
269
_ , err = GetBundleInfoFromName ("libvirt_4.16.0_amd64.crcbundle" )
273
270
assert .Error (t , err )
0 commit comments