290
290
" With explicit --platform, buildah should warn about pulling difference in platform"
291
291
assert " $output " =~ " TARGETOS=linux" " --platform TARGETOS set correctly"
292
292
assert " $output " =~ " TARGETARCH=amd64" " --platform TARGETARCH set correctly"
293
- assert " $output " =~ " TARGETVARIANT=" " --platform TARGETVARIANT set correctly"
293
+ # By default, BUILDVARIANT/TARGETVARIANT should be empty.
294
+ assert " $output " =~ " TARGETVARIANT=\s" " --platform TARGETVARIANT set correctly"
294
295
assert " $output " =~ " TARGETPLATFORM=linux/amd64/v2" " --platform TARGETPLATFORM set correctly"
295
296
296
297
# Likewise with individual args
@@ -300,23 +301,26 @@ _EOF
300
301
" With explicit --variant, buildah should warn about pulling difference in platform"
301
302
assert " $output " =~ " TARGETOS=linux" " --os --arch --variant TARGETOS set correctly"
302
303
assert " $output " =~ " TARGETARCH=amd64" " --os --arch --variant TARGETARCH set correctly"
303
- assert " $output " =~ " TARGETVARIANT=" " --os --arch --variant TARGETVARIANT set correctly"
304
+ # By default, BUILDVARIANT/TARGETVARIANT should be empty.
305
+ assert " $output " =~ " TARGETVARIANT=\s" " --os --arch --variant TARGETVARIANT set correctly"
304
306
assert " $output " =~ " TARGETPLATFORM=linux/amd64" " --os --arch --variant TARGETPLATFORM set correctly"
305
307
306
308
run_buildah build $WITH_POLICY_JSON --os linux -t source -f $containerfile
307
309
assert " $output " ! ~ " WARNING" \
308
310
" With explicit --os (but no arch/variant), buildah should not warn about TARGETOS"
309
311
assert " $output " =~ " TARGETOS=linux" " --os TARGETOS set correctly"
310
312
assert " $output " =~ " TARGETARCH=${ARCH} " " --os TARGETARCH set correctly"
311
- assert " $output " =~ " TARGETVARIANT=" " --os TARGETVARIANT set correctly"
313
+ # By default, BUILDVARIANT/TARGETVARIANT should be empty.
314
+ assert " $output " =~ " TARGETVARIANT=\s" " --os TARGETVARIANT set correctly"
312
315
assert " $output " =~ " TARGETPLATFORM=linux/${ARCH} " " --os TARGETPLATFORM set correctly"
313
316
314
317
run_buildah build $WITH_POLICY_JSON --arch amd64 -t source -f $containerfile
315
318
assert " $output " ! ~ " WARNING" \
316
319
" With explicit --os (but no arch/variant), buildah should not warn about TARGETOS"
317
320
assert " $output " =~ " TARGETOS=linux" " --arch TARGETOS set correctly"
318
321
assert " $output " =~ " TARGETARCH=amd64" " --arch TARGETARCH set correctly"
319
- assert " $output " =~ " TARGETVARIANT=" " --arch TARGETVARIANT set correctly"
322
+ # By default, BUILDVARIANT/TARGETVARIANT should be empty.
323
+ assert " $output " =~ " TARGETVARIANT=\s" " --arch TARGETVARIANT set correctly"
320
324
assert " $output " =~ " TARGETPLATFORM=linux/amd64" " --arch TARGETPLATFORM set correctly"
321
325
322
326
for option in " --arch=arm64" " --os=windows" " --variant=v2" ; do
0 commit comments