Commit 743f2edb authored by Justin Santa Barbara's avatar Justin Santa Barbara

Fix tests

parent 89089900
...@@ -112,17 +112,17 @@ func TestNewAWSCloud(t *testing.T) { ...@@ -112,17 +112,17 @@ func TestNewAWSCloud(t *testing.T) {
}{ }{
{ {
"No config reader", "No config reader",
nil, fakeAuthFunc, nil, nil, fakeAuthFunc, &FakeMetadata{},
true, "", true, "",
}, },
{ {
"Config specified invalid zone", "Config specified invalid zone",
strings.NewReader("[global]\nzone = blahonga"), fakeAuthFunc, nil, strings.NewReader("[global]\nzone = blahonga"), fakeAuthFunc, &FakeMetadata{},
true, "", true, "",
}, },
{ {
"Config specifies valid zone", "Config specifies valid zone",
strings.NewReader("[global]\nzone = eu-west-1a"), fakeAuthFunc, nil, strings.NewReader("[global]\nzone = eu-west-1a"), fakeAuthFunc, &FakeMetadata{},
false, "eu-west-1a", false, "eu-west-1a",
}, },
{ {
...@@ -143,7 +143,8 @@ func TestNewAWSCloud(t *testing.T) { ...@@ -143,7 +143,8 @@ func TestNewAWSCloud(t *testing.T) {
for _, test := range tests { for _, test := range tests {
t.Logf("Running test case %s", test.name) t.Logf("Running test case %s", test.name)
c, err := newAWSCloud(test.reader, test.authFunc, test.metadata) selfInstanceId := "self-instance"
c, err := newAWSCloud(test.reader, test.authFunc, selfInstanceId, test.metadata)
if test.expectError { if test.expectError {
if err == nil { if err == nil {
t.Errorf("Should error for case %s", test.name) t.Errorf("Should error for case %s", test.name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment