Skip to content

Commit

Permalink
show better validation errors when version not set
Browse files Browse the repository at this point in the history
  • Loading branch information
furkhat committed Oct 21, 2021
1 parent 5b69f75 commit 87280d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions metakube/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func testAccPreCheckForOpenstack(t *testing.T) {
checkEnv(t, testEnvOpenstackImage)
checkEnv(t, testEnvOpenstackImage2)
checkEnv(t, testEnvOpenstackFlavor)
checkEnv(t, testEnvOpenstackAuthUrl)
}

func testAccPreCheckForAzure(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion metakube/resource_metakube_cluster_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func metakubeResourceValidateVersionExistence(ctx context.Context, d *schema.Res
available := make([]string, 0)
for _, v := range r.Payload {
available = append(available, v.Version.(string))
if s, ok := v.Version.(string); ok && s == version {
if v.Version.(string) == version {
return nil
}
}
Expand Down

0 comments on commit 87280d1

Please sign in to comment.