add simple test for expandInstanceString

This commit is contained in:
Clint Shryock 2015-03-02 10:00:45 -06:00
parent da55f9bf85
commit 2b3bcd5c27
1 changed files with 19 additions and 0 deletions

View File

@ -312,3 +312,22 @@ func Test_flattenParameters(t *testing.T) {
} }
} }
} }
func Test_expandInstanceString(t *testing.T) {
expected := []elb.Instance{
elb.Instance{aws.String("test-one")},
elb.Instance{aws.String("test-two")},
}
ids := []interface{}{
"test-one",
"test-two",
}
expanded := expandInstanceString(ids)
if !reflect.DeepEqual(expanded, expected) {
t.Fatalf("Expand Instance String output did not match.\nGot:\n%#v\n\nexpected:\n%#v", expanded, expected)
}
}