diff options
author | Miloslav Trmač <mitr@redhat.com> | 2018-07-18 21:15:31 +0200 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-07-19 16:12:49 +0000 |
commit | cedb4576a4481bc45b0008e7a0c8da0a1f8f858f (patch) | |
tree | e325ea2616579021ad3078b0178099167e952e67 /libpod/container_internal_test.go | |
parent | 930660c36baa4490afe26926dc8b3d3850affe48 (diff) | |
download | podman-cedb4576a4481bc45b0008e7a0c8da0a1f8f858f.tar.gz podman-cedb4576a4481bc45b0008e7a0c8da0a1f8f858f.tar.bz2 podman-cedb4576a4481bc45b0008e7a0c8da0a1f8f858f.zip |
Fix TestPostDeleteHooks on macOS
os.TempDir() is /var/folders/.../T/ on macOS, not /tmp.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Closes: #1111
Approved by: baude
Diffstat (limited to 'libpod/container_internal_test.go')
-rw-r--r-- | libpod/container_internal_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libpod/container_internal_test.go b/libpod/container_internal_test.go index aa28e99e3..600d24201 100644 --- a/libpod/container_internal_test.go +++ b/libpod/container_internal_test.go @@ -7,6 +7,7 @@ import ( "os" "path/filepath" "runtime" + "strings" "testing" rspec "github.com/opencontainers/runtime-spec/specs-go" @@ -59,7 +60,7 @@ func TestPostDeleteHooks(t *testing.T) { t.Fatal(err) } - stateRegexp := `{"ociVersion":"1\.0\.0","id":"123abc","status":"stopped","bundle":"/tmp/libpod_test_[0-9]*","annotations":{"a":"b"}}` + stateRegexp := `{"ociVersion":"1\.0\.0","id":"123abc","status":"stopped","bundle":"` + strings.TrimSuffix(os.TempDir(), "/") + `/libpod_test_[0-9]*","annotations":{"a":"b"}}` for _, path := range []string{statePath, copyPath} { t.Run(path, func(t *testing.T) { content, err := ioutil.ReadFile(path) |