From 5d600c70f2356c7b5d8a06eb363e9c05ea824a77 Mon Sep 17 00:00:00 2001 From: Jan Schumann Date: Wed, 10 Jun 2015 17:20:41 +0200 Subject: [PATCH] added test to illustrate wrong behavior --- builder/amazon/common/block_device_test.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/builder/amazon/common/block_device_test.go b/builder/amazon/common/block_device_test.go index aacd54cb4..12d1530bf 100644 --- a/builder/amazon/common/block_device_test.go +++ b/builder/amazon/common/block_device_test.go @@ -36,6 +36,23 @@ func TestBlockDevice(t *testing.T) { }, }, }, + { + Config: &BlockDevice{ + DeviceName: "/dev/sdb", + VolumeSize: 8, + }, + + Result: &ec2.BlockDeviceMapping{ + DeviceName: aws.String("/dev/sdb"), + VirtualName: aws.String(""), + EBS: &ec2.EBSBlockDevice{ + Encrypted: aws.Boolean(false), + VolumeType: aws.String(""), + VolumeSize: aws.Long(8), + DeleteOnTermination: aws.Boolean(false), + }, + }, + }, { Config: &BlockDevice{ DeviceName: "/dev/sdb",