summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-03-28 15:14:19 +0200
committerGitHub <noreply@github.com>2022-03-28 15:14:19 +0200
commite1699d8591ab87717ae018583c896561c43efb29 (patch)
treef9ce0e691659969510b13714b047c3af49a5ed80 /test
parentaeae59804990e98fea6cd64388c99a1d863a7cb5 (diff)
parentd106b294b428fbb10f59d4cafe72c3dcaa4e73bb (diff)
downloadpodman-e1699d8591ab87717ae018583c896561c43efb29.tar.gz
podman-e1699d8591ab87717ae018583c896561c43efb29.tar.bz2
podman-e1699d8591ab87717ae018583c896561c43efb29.zip
Merge pull request #13668 from rhatdan/walk
Switch all calls to filepath.Walk to filepath.WalkDir
Diffstat (limited to 'test')
-rw-r--r--test/e2e/pod_rm_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/e2e/pod_rm_test.go b/test/e2e/pod_rm_test.go
index 7a0d97d28..dbb2d6d13 100644
--- a/test/e2e/pod_rm_test.go
+++ b/test/e2e/pod_rm_test.go
@@ -2,6 +2,7 @@ package integration
import (
"fmt"
+ "io/fs"
"io/ioutil"
"os"
"path/filepath"
@@ -46,14 +47,14 @@ var _ = Describe("Podman pod rm", func() {
Expect(result).Should(Exit(0))
// Also check that we don't leak cgroups
- err := filepath.Walk("/sys/fs/cgroup", func(path string, info os.FileInfo, err error) error {
+ err := filepath.WalkDir("/sys/fs/cgroup", func(path string, d fs.DirEntry, err error) error {
if err != nil {
return err
}
- if !info.IsDir() {
+ if !d.IsDir() {
Expect(err).To(BeNil())
}
- if strings.Contains(info.Name(), podid) {
+ if strings.Contains(d.Name(), podid) {
return fmt.Errorf("leaking cgroup path %s", path)
}
return nil