pkg/machine/e2e: set XDG_CONFIG_HOME

This is basically a partial backport of commit b14e833ef6
("machine: add test to check config mount").

It seems on the ubuntu github actions runners we have XDG_CONFIG_HOME
set so the tests do not actually use its own private dir but a shared
one for the configs which breaks the test assumptions.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2026-06-05 13:28:12 +02:00
parent b45fbbeec1
commit e71ded2997

View File

@@ -145,6 +145,9 @@ func setup() (string, *machineTestBuilder) {
Fail("unable to set home dir on windows")
}
}
if err := os.Setenv("XDG_CONFIG_HOME", filepath.Join(homeDir, ".config")); err != nil {
Fail("failed to set XDG_CONFIG_HOME dir")
}
if err := os.Setenv("XDG_RUNTIME_DIR", homeDir); err != nil {
Fail("failed to set xdg_runtime dir")
}