From 434a9759a04b503fecd15a07d242e6f59262e675 Mon Sep 17 00:00:00 2001 From: Paul Hinze Date: Wed, 18 Feb 2015 17:24:46 -0600 Subject: [PATCH] providers/aws: enhance root_block_device acceptance test So that we have a test that will fail in case the flubbery of #1000 returns. --- builtin/providers/aws/resource_aws_instance_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_instance_test.go b/builtin/providers/aws/resource_aws_instance_test.go index 7c34a3663..bf59b2a4d 100644 --- a/builtin/providers/aws/resource_aws_instance_test.go +++ b/builtin/providers/aws/resource_aws_instance_test.go @@ -108,6 +108,11 @@ func TestAccAWSInstance_blockDevices(t *testing.T) { "aws_instance.foo", "root_block_device.0.device_name", "/dev/sda1"), resource.TestCheckResourceAttr( "aws_instance.foo", "root_block_device.0.volume_size", "11"), + // this one is important because it's the only root_block_device + // attribute that comes back from the API. so checking it verifies + // that we set state properly + resource.TestCheckResourceAttr( + "aws_instance.foo", "root_block_device.0.volume_type", "gp2"), resource.TestCheckResourceAttr( "aws_instance.foo", "block_device.#", "1"), resource.TestCheckResourceAttr( @@ -378,7 +383,6 @@ resource "aws_instance" "foo" { } block_device { device_name = "/dev/sdb" - volume_type = "gp2" volume_size = 9 } }