summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-08-13 12:57:33 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-08-13 21:44:23 +0200
commit4929cafb9183ddaf8d49c6e624823d393cd58f90 (patch)
treed47afeb2c5af4dbb41fbb7326c26dde048229ff4 /test
parent2e6164d124251c53d1e2fc13c90e1211526f5e80 (diff)
downloadpodman-4929cafb9183ddaf8d49c6e624823d393cd58f90.tar.gz
podman-4929cafb9183ddaf8d49c6e624823d393cd58f90.tar.bz2
podman-4929cafb9183ddaf8d49c6e624823d393cd58f90.zip
tests: skip pause tests if freezer is not available
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/pause_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/e2e/pause_test.go b/test/e2e/pause_test.go
index 455f60937..c61131078 100644
--- a/test/e2e/pause_test.go
+++ b/test/e2e/pause_test.go
@@ -4,6 +4,7 @@ import (
"fmt"
"os"
+ "github.com/containers/libpod/pkg/cgroups"
. "github.com/containers/libpod/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
@@ -25,6 +26,17 @@ var _ = Describe("Podman pause", func() {
if err != nil {
os.Exit(1)
}
+
+ cgroupsv2, err := cgroups.IsCgroup2UnifiedMode()
+ Expect(err).To(BeNil())
+
+ if cgroupsv2 {
+ _, err := os.Stat("/sys/fs/cgroup/cgroup.freeze")
+ if err != nil {
+ Skip("freezer controller not available on the current kernel")
+ }
+ }
+
podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.SeedImages()