Skip to content

Commit 24265ba

Browse files
jparrillclaude
andcommitted
fix(OCPBUGS-78586): convert dependency-tests from error to warning
The TestWatchedDependenciesAreUpToDate test was too restrictive, failing every PR whenever a new commit landed in the upstream hypershift/api repository. Convert t.Error/t.Errorf to t.Log/t.Logf so outdated dependencies are reported as warnings without blocking PRs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Juan Manuel Parrilla Madrid <jparrill@redhat.com>
1 parent e9f691b commit 24265ba

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

tests/integration/dependencies/dependencies_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,28 +61,28 @@ func TestWatchedDependenciesAreUpToDate(t *testing.T) {
6161

6262
t.Logf("Latest available %s version: %s", module, latestVersion)
6363

64-
// Compare versions directly
64+
// Compare versions - warn if outdated but do not fail the test
6565
if currentVersion != latestVersion {
6666
allDependenciesUpToDate = false
6767

68-
errorMsg := fmt.Sprintf("Dependency %s is not up-to-date with upstream %s branch.\n"+
68+
warnMsg := fmt.Sprintf("WARNING: Dependency %s is not up-to-date with upstream %s branch.\n"+
6969
"Current version: %s\n"+
7070
"Latest available: %s\n"+
7171
"Consider running: go get %s@%s && go mod tidy && go mod vendor",
7272
module, targetBranch, currentVersion, latestVersion, module, targetBranch)
73-
failureMessages = append(failureMessages, errorMsg)
74-
t.Error(errorMsg)
73+
failureMessages = append(failureMessages, warnMsg)
74+
t.Log(warnMsg)
7575
} else {
76-
t.Logf("Dependency %s is up-to-date with upstream %s branch", module, targetBranch)
76+
t.Logf("Dependency %s is up-to-date with upstream %s branch", module, targetBranch)
7777
}
7878
})
7979
}
8080

81-
// If any dependency failed, fail the main test with a summary
81+
// Log a summary warning if any dependency is outdated, but do not fail the test
8282
if !allDependenciesUpToDate {
83-
t.Errorf("One or more dependencies are not up-to-date:\n%s", strings.Join(failureMessages, "\n\n"))
83+
t.Logf("WARNING: One or more dependencies are not up-to-date:\n%s", strings.Join(failureMessages, "\n\n"))
8484
} else {
85-
t.Logf("All %d watched dependencies are up-to-date", len(watchedDependencies))
85+
t.Logf("All %d watched dependencies are up-to-date", len(watchedDependencies))
8686
}
8787
}
8888

0 commit comments

Comments
 (0)