mirror of
https://github.com/containers/podman.git
synced 2025-07-01 16:17:06 +08:00
pkg/machine/e2e: use tmp file for connections
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 <pholzing@redhat.com>
This commit is contained in:
@ -111,6 +111,9 @@ func setup() (string, *machineTestBuilder) {
|
|||||||
if err := os.Unsetenv("SSH_AUTH_SOCK"); err != nil {
|
if err := os.Unsetenv("SSH_AUTH_SOCK"); err != nil {
|
||||||
Fail("unable to unset SSH_AUTH_SOCK")
|
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()
|
mb, err := newMB()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Fail(fmt.Sprintf("failed to create machine test: %q", err))
|
Fail(fmt.Sprintf("failed to create machine test: %q", err))
|
||||||
|
Reference in New Issue
Block a user