From 4648a97b98e30d72ec3a531b01a22d4bcee2a29a Mon Sep 17 00:00:00 2001 From: Krzysztof Wilczynski Date: Mon, 1 Aug 2016 11:29:46 +0900 Subject: [PATCH] Fix test failures. Signed-off-by: Krzysztof Wilczynski --- builtin/providers/aws/resource_aws_vpn_gateway_attachment.go | 4 ++-- .../providers/aws/resource_aws_vpn_gateway_attachment_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/providers/aws/resource_aws_vpn_gateway_attachment.go b/builtin/providers/aws/resource_aws_vpn_gateway_attachment.go index 0da68f8019dd..f04db1b548c5 100644 --- a/builtin/providers/aws/resource_aws_vpn_gateway_attachment.go +++ b/builtin/providers/aws/resource_aws_vpn_gateway_attachment.go @@ -66,7 +66,7 @@ func resourceAwsVpnGatewayAttachmentCreate(d *schema.ResourceData, meta interfac _, err = stateConf.WaitForState() if err != nil { - fmt.Errorf("Error waiting for VPN Gateway %q to attach to VPC %q: %s", + return fmt.Errorf("Error waiting for VPN Gateway %q to attach to VPC %q: %s", vgwId, vpcId, err) } log.Printf("[DEBUG] VPN Gateway %q attached to VPC %q.", vgwId, vpcId) @@ -157,7 +157,7 @@ func resourceAwsVpnGatewayAttachmentDelete(d *schema.ResourceData, meta interfac _, err = stateConf.WaitForState() if err != nil { - fmt.Errorf("Error waiting for VPN Gateway %q to detach from VPC %q: %s", + return fmt.Errorf("Error waiting for VPN Gateway %q to detach from VPC %q: %s", vgwId, vpcId, err) } log.Printf("[DEBUG] VPN Gateway %q detached from VPC %q.", vgwId, vpcId) diff --git a/builtin/providers/aws/resource_aws_vpn_gateway_attachment_test.go b/builtin/providers/aws/resource_aws_vpn_gateway_attachment_test.go index 69dd1643ad4c..7a28aff50d41 100644 --- a/builtin/providers/aws/resource_aws_vpn_gateway_attachment_test.go +++ b/builtin/providers/aws/resource_aws_vpn_gateway_attachment_test.go @@ -134,7 +134,7 @@ func testAccCheckVpnGatewayAttachmentDestroy(s *terraform.State) error { vgw := resp.VpnGateways[0] if *vgw.VpcAttachments[0].State != "detached" { return fmt.Errorf("Expected VPN Gateway %q to be in detached state, but got: %q", - *vgw.VpcAttachments[0].State) + vgwId, *vgw.VpcAttachments[0].State) } }