Adding test for new attribute defaults

pull/1558/head
adantop 2 weeks ago
parent e8af03cd36
commit 0a43b55d53
No known key found for this signature in database
GPG Key ID: 0026BC0BA1D40CC2

@ -186,6 +186,7 @@ func TestGCP_Init(t *testing.T) {
args args
wantErr bool
}{
{"ok", fields{"GCP", "name", nil, zero, nil}, args{config, srv.URL}, false},
{"ok", fields{"GCP", "name", nil, zero, nil}, args{config, srv.URL}, false},
{"ok", fields{"GCP", "name", []string{"service-account"}, zero, nil}, args{config, srv.URL}, false},
{"ok", fields{"GCP", "name", []string{"service-account"}, Duration{Duration: 1 * time.Minute}, nil}, args{config, srv.URL}, false},
@ -211,6 +212,14 @@ func TestGCP_Init(t *testing.T) {
if err := p.Init(tt.args.config); (err != nil) != tt.wantErr {
t.Errorf("GCP.Init() error = %v, wantErr %v", err, tt.wantErr)
}
if p.EnableSSHCAUser {
t.Errorf("By default EnableSSHCAUser should be false")
}
if p.DisableSSHCAHost {
t.Errorf("By default DisableSSHCAHost should be false")
}
})
}
}

Loading…
Cancel
Save