Skip to content

Commit

Permalink
pkg/machine/e2e: use tmp file for connections
Browse files Browse the repository at this point in the history
On linux and macos the connections are stored under the home dir by
default so it is not a problem there but on windows we first check
the APPDATA env and use this dir as config storage. This has the problem
that it is not cleaned up after each test as such connections might leak
into the following test causing failues there.

Fixes #22844

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed Jul 1, 2024
1 parent 672c6c8 commit f84f4a9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/machine/e2e/machine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ func setup() (string, *machineTestBuilder) {
if err := os.Unsetenv("SSH_AUTH_SOCK"); err != nil {
Fail("unable to unset SSH_AUTH_SOCK")
}
if err := os.Setenv("PODMAN_CONNECTIONS_CONF", filepath.Join(homeDir, "connections.json")); err != nil {
Fail("failed to set PODMAN_CONNECTIONS_CONF")
}
mb, err := newMB()
if err != nil {
Fail(fmt.Sprintf("failed to create machine test: %q", err))
Expand Down

0 comments on commit f84f4a9

Please sign in to comment.