Commit ae064207 authored by Tommy Ulfsparre's avatar Tommy Ulfsparre Committed by Chris Bednarski

Add test for ephemeral block device mapping

parent 224bb781
......@@ -17,7 +17,6 @@ func TestBlockDevice(t *testing.T) {
{
Config: &BlockDevice{
DeviceName: "/dev/sdb",
VirtualName: "ephemeral0",
SnapshotId: "snap-1234",
VolumeType: "standard",
VolumeSize: 8,
......@@ -27,7 +26,7 @@ func TestBlockDevice(t *testing.T) {
Result: &ec2.BlockDeviceMapping{
DeviceName: aws.String("/dev/sdb"),
VirtualName: aws.String("ephemeral0"),
VirtualName: aws.String(""),
EBS: &ec2.EBSBlockDevice{
SnapshotID: aws.String("snap-1234"),
VolumeType: aws.String("standard"),
......@@ -55,7 +54,6 @@ func TestBlockDevice(t *testing.T) {
{
Config: &BlockDevice{
DeviceName: "/dev/sdb",
VirtualName: "ephemeral0",
VolumeType: "io1",
VolumeSize: 8,
DeleteOnTermination: true,
......@@ -64,7 +62,7 @@ func TestBlockDevice(t *testing.T) {
Result: &ec2.BlockDeviceMapping{
DeviceName: aws.String("/dev/sdb"),
VirtualName: aws.String("ephemeral0"),
VirtualName: aws.String(""),
EBS: &ec2.EBSBlockDevice{
VolumeType: aws.String("io1"),
VolumeSize: aws.Long(8),
......@@ -73,6 +71,17 @@ func TestBlockDevice(t *testing.T) {
},
},
},
{
Config: &BlockDevice{
DeviceName: "/dev/sdb",
VirtualName: "ephemeral0",
},
Result: &ec2.BlockDeviceMapping{
DeviceName: aws.String("/dev/sdb"),
VirtualName: aws.String("ephemeral0"),
},
},
}
for _, tc := range cases {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment