summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorEng Zer Jun <engzerjun@gmail.com>2022-05-05 21:39:46 +0800
committerEng Zer Jun <engzerjun@gmail.com>2022-05-05 21:39:46 +0800
commitd7f43e6772b734d0a7a7533bf94a61939ac1ebe5 (patch)
tree48a67c6e7acd09cdf5e3eaf50b12b23963d90e44 /libpod
parentcf35168f0a9cf457f0622cd89cff84bdbe610d58 (diff)
downloadpodman-d7f43e6772b734d0a7a7533bf94a61939ac1ebe5.tar.gz
podman-d7f43e6772b734d0a7a7533bf94a61939ac1ebe5.tar.bz2
podman-d7f43e6772b734d0a7a7533bf94a61939ac1ebe5.zip
test: fix failing TestPostDeleteHooks
We no longer create the temporary directory as `libpod_test_*`. The directory returned by `t.TempDir()` is TestPostDeleteHooks/001 Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_internal_test.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/libpod/container_internal_test.go b/libpod/container_internal_test.go
index 05fdba04f..1b4e62e91 100644
--- a/libpod/container_internal_test.go
+++ b/libpod/container_internal_test.go
@@ -4,10 +4,8 @@ import (
"context"
"fmt"
"io/ioutil"
- "os"
"path/filepath"
"runtime"
- "strings"
"testing"
rspec "github.com/opencontainers/runtime-spec/specs-go"
@@ -58,7 +56,7 @@ func TestPostDeleteHooks(t *testing.T) {
t.Fatal(err)
}
- stateRegexp := `{"ociVersion":"1\.0\.2-dev","id":"123abc","status":"stopped","bundle":"` + strings.TrimSuffix(os.TempDir(), "/") + `/libpod_test_[0-9]*","annotations":{"a":"b"}}`
+ stateRegexp := `{"ociVersion":"1\.0\.2-dev","id":"123abc","status":"stopped","bundle":"` + dir + `","annotations":{"a":"b"}}`
for _, p := range []string{statePath, copyPath} {
path := p
t.Run(path, func(t *testing.T) {