Skip to content

Commit

Permalink
Merge pull request GoogleCloudPlatform#2982 from justinsb/warn_if_spe…
Browse files Browse the repository at this point in the history
…c_resourceid_is_empty

tests: warn, don't panic, if we can't read spec.resourceID
  • Loading branch information
google-oss-prow[bot] authored Oct 23, 2024
2 parents 37df823 + a5e53bc commit 6c68a3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/e2e/unified_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ func runScenario(ctx context.Context, t *testing.T, testPause bool, fixture reso
for _, create := range opt.Create {
resourceID, _, err := unstructured.NestedString(create.Object, "spec", "resourceID")
if err != nil {
t.Fatalf("error reading spec.resourceID: %v", err)
}
if strings.Contains(resourceID, "${resourceId}") {
j, _ := json.Marshal(create.Object)
t.Logf("error reading spec.resourceID, can't check for acquisition test: %v. object is %v", err, string(j))
} else if strings.Contains(resourceID, "${resourceId}") {
t.Skipf("test has ${resourceId} placeholder in spec.resource, indicating an acquisition test. Not currently supported here; skipping")
}
}
Expand Down

0 comments on commit 6c68a3b

Please sign in to comment.