fix tests
This commit is contained in:
parent
a84fc6bde9
commit
b764b1d7e1
|
@ -42,6 +42,7 @@ func TestConfigValidationCatchesMissing(t *testing.T) {
|
||||||
"dest_image_list",
|
"dest_image_list",
|
||||||
"source_image_list",
|
"source_image_list",
|
||||||
"shape",
|
"shape",
|
||||||
|
"ssh_username",
|
||||||
}
|
}
|
||||||
for _, key := range required {
|
for _, key := range required {
|
||||||
tc := testConfig()
|
tc := testConfig()
|
||||||
|
@ -53,15 +54,6 @@ func TestConfigValidationCatchesMissing(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestValidationsIgnoresOptional(t *testing.T) {
|
|
||||||
tc := testConfig()
|
|
||||||
delete(tc, "ssh_username")
|
|
||||||
_, err := NewConfig(tc)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("Shouldn't care if ssh_username is missing: err: %#v", err.Error())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestConfigValidatesObjects(t *testing.T) {
|
func TestConfigValidatesObjects(t *testing.T) {
|
||||||
var objectTests = []struct {
|
var objectTests = []struct {
|
||||||
object string
|
object string
|
||||||
|
|
Loading…
Reference in New Issue