From 2e20facc8b986720d9eb2522aed7f38bc875e2f6 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Mon, 14 Oct 2019 14:13:21 -0700 Subject: [PATCH] fix tests --- builder/amazon/chroot/step_register_ami_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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")