@@ -240,35 +240,36 @@ def test_koji_vmi_compound_product_name(fake_koji, koji_dir):
240
240
release = rel_obj ,
241
241
)
242
242
243
+
243
244
@mark .parametrize ("boot_mode" , [None , "legacy" , "uefi" , "hybrid" ])
244
- def test_coreos_assembler_image (boot_mode ,fake_koji , koji_dir ):
245
+ def test_coreos_assembler_image (boot_mode , fake_koji , koji_dir ):
245
246
boot_mode_enum = BootMode (boot_mode ) if boot_mode else None
246
247
247
248
archives = []
248
249
images = {
249
250
"meta.json" : "json" ,
250
251
"commitmeta.json" : "json" ,
251
- "coreos-assembler-git.tar.gz" : "tar"
252
-
252
+ "coreos-assembler-git.tar.gz" : "tar" ,
253
253
}
254
254
for file_name , type_name in images .items ():
255
255
archives .append (
256
- {'btype' : 'image' ,
257
- 'btype_id' : 4 ,
258
- 'build_id' : 123456 ,
259
- 'buildroot_id' : 1234567 ,
260
- 'checksum' : 'dde60621880aa996c42e356a687744ef' ,
261
- 'checksum_type' : 0 ,
262
- 'compression_type' : None ,
263
- 'filename' : file_name ,
264
- 'id' : 234792 ,
265
- 'metadata_only' : False ,
266
- 'size' : 16077 ,
267
- 'type_description' : 'JSON data' ,
268
- 'type_extensions' : 'json' ,
269
- 'type_id' : 49 ,
270
- 'type_name' : type_name
271
- }
256
+ {
257
+ "btype" : "image" ,
258
+ "btype_id" : 4 ,
259
+ "build_id" : 123456 ,
260
+ "buildroot_id" : 1234567 ,
261
+ "checksum" : "dde60621880aa996c42e356a687744ef" ,
262
+ "checksum_type" : 0 ,
263
+ "compression_type" : None ,
264
+ "filename" : file_name ,
265
+ "id" : 234792 ,
266
+ "metadata_only" : False ,
267
+ "size" : 16077 ,
268
+ "type_description" : "JSON data" ,
269
+ "type_extensions" : "json" ,
270
+ "type_id" : 49 ,
271
+ "type_name" : type_name ,
272
+ }
272
273
)
273
274
274
275
name = "rhcos"
@@ -288,7 +289,8 @@ def test_coreos_assembler_image(boot_mode,fake_koji, koji_dir):
288
289
"release" : release ,
289
290
"nvr" : nvr ,
290
291
"completion_time" : "2022-12-20 12:30:25" ,
291
- "extra" : {"typeinfo" : {"image" : {"arch" : "x86_64" ,"boot_mode" : boot_mode }}}}
292
+ "extra" : {"typeinfo" : {"image" : {"arch" : "x86_64" , "boot_mode" : boot_mode }}},
293
+ }
292
294
293
295
fake_koji .build_data [nvr ] = fake_koji .build_data [1234 ]
294
296
@@ -325,12 +327,26 @@ def test_coreos_assembler_image(boot_mode,fake_koji, koji_dir):
325
327
items = list (source )
326
328
327
329
vms_with_custom_meta_data = [
328
- {'target' : 'aws' , 'push_item_class' : AmiPushItem , 'custom_meta_data' : {'region' : 'us-gov-west-1' ,
329
- 'src' : 'ami-01' }, "sha256" : "4ef7806152bd89ce44326ff746c4f1883ad543885e980bce59821df2d946ea4c" },
330
- {'target' : 'aws' , 'push_item_class' : AmiPushItem , 'custom_meta_data' : {'region' : 'us-east-1' ,
331
- 'src' : 'ami-02' }, "sha256" : "4ef7806152bd89ce44326ff746c4f1883ad543885e980bce59821df2d946ea4c" },
332
- {'target' : 'azure' , 'push_item_class' : VHDPushItem , 'custom_meta_data' : {
333
- 'src' : 'https://example.windows.net/imagebucket/rhcos-4.11-0-azure.x86_64.vhd' }, "sha256" : "2cd817331af29093e2eaa025139ebddd6008c193970b06b35afbbdbebae0ce3e" }
330
+ {
331
+ "target" : "aws" ,
332
+ "push_item_class" : AmiPushItem ,
333
+ "custom_meta_data" : {"region" : "us-gov-west-1" , "src" : "ami-01" },
334
+ "sha256" : "4ef7806152bd89ce44326ff746c4f1883ad543885e980bce59821df2d946ea4c" ,
335
+ },
336
+ {
337
+ "target" : "aws" ,
338
+ "push_item_class" : AmiPushItem ,
339
+ "custom_meta_data" : {"region" : "us-east-1" , "src" : "ami-02" },
340
+ "sha256" : "4ef7806152bd89ce44326ff746c4f1883ad543885e980bce59821df2d946ea4c" ,
341
+ },
342
+ {
343
+ "target" : "azure" ,
344
+ "push_item_class" : VHDPushItem ,
345
+ "custom_meta_data" : {
346
+ "src" : "https://example.windows.net/imagebucket/rhcos-4.11-0-azure.x86_64.vhd"
347
+ },
348
+ "sha256" : "2cd817331af29093e2eaa025139ebddd6008c193970b06b35afbbdbebae0ce3e" ,
349
+ },
334
350
]
335
351
336
352
out = []
0 commit comments