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{})