Skip to content

Commit

Permalink
Merge pull request GoogleCloudPlatform#2601 from jasonvigil/fix-perio…
Browse files Browse the repository at this point in the history
…dics-part-2

fix: Skip testNoChangeAfterUpdate if update resource is empty.

Samples test failure is unrelated and being investigated.
  • Loading branch information
cheftako authored Sep 3, 2024
2 parents 2316606 + af9b783 commit 196a4b9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/controller/dynamic/dynamic_controller_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,15 @@ func testNoChangeAfterCreate(ctx context.Context, t *testing.T, testContext test

// testNoChangeAfterUpdate is enabled only on resources allowlisted inside the function.
func testNoChangeAfterUpdate(ctx context.Context, t *testing.T, testContext testrunner.TestContext, systemContext testrunner.SystemContext, resourceContext contexts.ResourceContext) {
// Do not run for tests with `SkipUpdate` explicitly set to 'true'.
if resourceContext.SkipUpdate {
return
}
// Do not run for tests without an update.yaml set.
if testContext.UpdateUnstruct == nil {
t.Logf("UpdateUnstruct not set; skipping testNoChangeAfterUpdate")
return
}
switch testContext.ResourceFixture.GVK.GroupKind() {
case schema.GroupKind{Group: "sql.cnrm.cloud.google.com", Kind: "SQLInstance"}: // test coverage for https://github.com/GoogleCloudPlatform/k8s-config-connector/issues/1802
default:
Expand Down

0 comments on commit 196a4b9

Please sign in to comment.