From e25c9f86442e4cd55eae5330fab1cdb6dc000156 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Wed, 4 Mar 2015 18:32:47 -0500 Subject: [PATCH] Fix the logic around the AWS instance test We test that when we get instances with the same name that we get an error --- pkg/cloudprovider/aws/aws_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/cloudprovider/aws/aws_test.go b/pkg/cloudprovider/aws/aws_test.go index 6df2cfbef19..d08f99ab71d 100644 --- a/pkg/cloudprovider/aws/aws_test.go +++ b/pkg/cloudprovider/aws/aws_test.go @@ -134,10 +134,12 @@ func TestList(t *testing.T) { } func TestIPAddress(t *testing.T) { + // Note these instances have the same name + // (we test that this produces an error) instances := make([]ec2.Instance, 2) instances[0].PrivateDNSName = "instance1" instances[0].PrivateIpAddress = "192.168.0.1" - instances[1].PrivateDNSName = "instance2" + instances[1].PrivateDNSName = "instance1" instances[1].PrivateIpAddress = "192.168.0.2" aws1 := mockInstancesResp([]ec2.Instance{})