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) { ...@@ -17,7 +17,6 @@ func TestBlockDevice(t *testing.T) {
{ {
Config: &BlockDevice{ Config: &BlockDevice{
DeviceName: "/dev/sdb", DeviceName: "/dev/sdb",
VirtualName: "ephemeral0",
SnapshotId: "snap-1234", SnapshotId: "snap-1234",
VolumeType: "standard", VolumeType: "standard",
VolumeSize: 8, VolumeSize: 8,
...@@ -27,7 +26,7 @@ func TestBlockDevice(t *testing.T) { ...@@ -27,7 +26,7 @@ func TestBlockDevice(t *testing.T) {
Result: &ec2.BlockDeviceMapping{ Result: &ec2.BlockDeviceMapping{
DeviceName: aws.String("/dev/sdb"), DeviceName: aws.String("/dev/sdb"),
VirtualName: aws.String("ephemeral0"), VirtualName: aws.String(""),
EBS: &ec2.EBSBlockDevice{ EBS: &ec2.EBSBlockDevice{
SnapshotID: aws.String("snap-1234"), SnapshotID: aws.String("snap-1234"),
VolumeType: aws.String("standard"), VolumeType: aws.String("standard"),
...@@ -55,7 +54,6 @@ func TestBlockDevice(t *testing.T) { ...@@ -55,7 +54,6 @@ func TestBlockDevice(t *testing.T) {
{ {
Config: &BlockDevice{ Config: &BlockDevice{
DeviceName: "/dev/sdb", DeviceName: "/dev/sdb",
VirtualName: "ephemeral0",
VolumeType: "io1", VolumeType: "io1",
VolumeSize: 8, VolumeSize: 8,
DeleteOnTermination: true, DeleteOnTermination: true,
...@@ -64,7 +62,7 @@ func TestBlockDevice(t *testing.T) { ...@@ -64,7 +62,7 @@ func TestBlockDevice(t *testing.T) {
Result: &ec2.BlockDeviceMapping{ Result: &ec2.BlockDeviceMapping{
DeviceName: aws.String("/dev/sdb"), DeviceName: aws.String("/dev/sdb"),
VirtualName: aws.String("ephemeral0"), VirtualName: aws.String(""),
EBS: &ec2.EBSBlockDevice{ EBS: &ec2.EBSBlockDevice{
VolumeType: aws.String("io1"), VolumeType: aws.String("io1"),
VolumeSize: aws.Long(8), VolumeSize: aws.Long(8),
...@@ -73,6 +71,17 @@ func TestBlockDevice(t *testing.T) { ...@@ -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 { 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