Skip to content

Commit f72df65

Browse files
committed
integration tests: pass XDG_CACHE_HOME to agent tests
The integration test setup was not passing through the XDG_CACHE_HOME environment variable to the test environment, causing tests to fall back to $HOME/.cache for caching downloaded files. This caused test failures in environments where $HOME/.cache is not writable but XDG_CACHE_HOME points to a writable location. This change ensures that if XDG_CACHE_HOME is set in the test runner's environment, it is passed through to the integration test environment, allowing tests to respect the XDG Base Directory specification. Assisted-by: Claude Code
1 parent b96c364 commit f72df65

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/openshift-install/internal_integration_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ func runIntegrationTest(t *testing.T, testFolder string) {
112112
}
113113
}
114114
e.Vars = append(e.Vars, fmt.Sprintf("RELEASE_IMAGE=%s", pullspec))
115+
if xdgCacheHome, ok := os.LookupEnv("XDG_CACHE_HOME"); ok && xdgCacheHome != "" {
116+
e.Vars = append(e.Vars, fmt.Sprintf("XDG_CACHE_HOME=%s", xdgCacheHome))
117+
}
115118
// When AUTH_FILE is set in the CI integration-tests job
116119
if authFilePath, ok := os.LookupEnv("AUTH_FILE"); ok && authFilePath != "" {
117120
workDir := e.Getenv("WORK")

0 commit comments

Comments
 (0)