diff --git a/builder/amazon/chroot/step_register_ami_test.go b/builder/amazon/chroot/step_register_ami_test.go index f075755fb..a6a64b8fc 100644 --- a/builder/amazon/chroot/step_register_ami_test.go +++ b/builder/amazon/chroot/step_register_ami_test.go @@ -30,7 +30,7 @@ func TestStepRegisterAmi_buildRegisterOpts_pv(t *testing.T) { blockDevices := []*ec2.BlockDeviceMapping{} - opts := buildRegisterOptsFromExistingImage(&config, &image, blockDevices, rootDeviceName) + opts := buildRegisterOptsFromExistingImage(&config, &image, blockDevices, rootDeviceName, config.AMIName) expected := config.AMIVirtType if *opts.VirtualizationType != expected { @@ -64,7 +64,7 @@ func TestStepRegisterAmi_buildRegisterOpts_hvm(t *testing.T) { blockDevices := []*ec2.BlockDeviceMapping{} - opts := buildRegisterOptsFromExistingImage(&config, &image, blockDevices, rootDeviceName) + opts := buildRegisterOptsFromExistingImage(&config, &image, blockDevices, rootDeviceName, config.AMIName) expected := config.AMIVirtType if *opts.VirtualizationType != expected { @@ -99,7 +99,7 @@ func TestStepRegisterAmi_buildRegisterOptsFromScratch(t *testing.T) { }, RootDeviceName: rootDeviceName, } - registerOpts := buildBaseRegisterOpts(&config, nil, 10, snapshotID) + registerOpts := buildBaseRegisterOpts(&config, nil, 10, snapshotID, config.AMIName) if len(registerOpts.BlockDeviceMappings) != 1 { t.Fatal("Expected block device mapping of length 1") @@ -138,7 +138,7 @@ func TestStepRegisterAmi_buildRegisterOptFromExistingImage(t *testing.T) { }, }, } - registerOpts := buildBaseRegisterOpts(&config, &sourceImage, 15, snapshotID) + registerOpts := buildBaseRegisterOpts(&config, &sourceImage, 15, snapshotID, config.AMIName) if len(registerOpts.BlockDeviceMappings) != 2 { t.Fatal("Expected block device mapping of length 2") @@ -196,7 +196,7 @@ func TestStepRegisterAmi_buildRegisterOptFromExistingImageWithBlockDeviceMapping }, }, } - registerOpts := buildBaseRegisterOpts(&config, &sourceImage, 15, snapshotId) + registerOpts := buildBaseRegisterOpts(&config, &sourceImage, 15, snapshotId, config.AMIName) if len(registerOpts.BlockDeviceMappings) != 1 { t.Fatal("Expected block device mapping of length 1")