summaryrefslogtreecommitdiff
path: root/pkg/machine/e2e/machine_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-05-04 08:33:22 -0400
committerGitHub <noreply@github.com>2022-05-04 08:33:22 -0400
commit1975975cf4bcf9ea16f5a49909f1357ec881e615 (patch)
tree874d1aa57eeccd3ecfe8a5609869bdc8c2b65aa1 /pkg/machine/e2e/machine_test.go
parent3d84661195aa8fbf3dab67375099cb991fd7fe81 (diff)
parent88015cf0d8c62e27452899c870555667d658427f (diff)
downloadpodman-1975975cf4bcf9ea16f5a49909f1357ec881e615.tar.gz
podman-1975975cf4bcf9ea16f5a49909f1357ec881e615.tar.bz2
podman-1975975cf4bcf9ea16f5a49909f1357ec881e615.zip
Merge pull request #14099 from jwhonce/wip/machine_inspect
Implement --format for machine inspect
Diffstat (limited to 'pkg/machine/e2e/machine_test.go')
-rw-r--r--pkg/machine/e2e/machine_test.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/pkg/machine/e2e/machine_test.go b/pkg/machine/e2e/machine_test.go
index 2b3b60b2b..657014b05 100644
--- a/pkg/machine/e2e/machine_test.go
+++ b/pkg/machine/e2e/machine_test.go
@@ -23,14 +23,20 @@ func TestMain(m *testing.M) {
const (
defaultStream string = "podman-testing"
- tmpDir string = "/var/tmp"
)
var (
+ tmpDir = "/var/tmp"
fqImageName string
suiteImageName string
)
+func init() {
+ if value, ok := os.LookupEnv("TMPDIR"); ok {
+ tmpDir = value
+ }
+}
+
// TestLibpod ginkgo master function
func TestMachine(t *testing.T) {
RegisterFailHandler(Fail)
@@ -70,7 +76,8 @@ var _ = SynchronizedAfterSuite(func() {},
})
func setup() (string, *machineTestBuilder) {
- homeDir, err := ioutil.TempDir("/var/tmp", "podman_test")
+ // Set TMPDIR if this needs a new directory
+ homeDir, err := ioutil.TempDir("", "podman_test")
if err != nil {
Fail(fmt.Sprintf("failed to create home directory: %q", err))
}