diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-07-09 19:59:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-09 19:59:58 +0200 |
commit | d9cd0032f7478e625329326d7593162a9f1e8c1e (patch) | |
tree | 7479f96d73dae9dc186bffbb3cb203a3f1ae7558 /test/e2e/libpod_suite_test.go | |
parent | 059bd37511e917f860e784307ee1f2766d8d4ec3 (diff) | |
parent | b020d1ad13267bd71065457f83116af39c77f7e5 (diff) | |
download | podman-d9cd0032f7478e625329326d7593162a9f1e8c1e.tar.gz podman-d9cd0032f7478e625329326d7593162a9f1e8c1e.tar.bz2 podman-d9cd0032f7478e625329326d7593162a9f1e8c1e.zip |
Merge pull request #6906 from rhatdan/VENDOR
Vendor in new version of Buildah
Diffstat (limited to 'test/e2e/libpod_suite_test.go')
-rw-r--r-- | test/e2e/libpod_suite_test.go | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go index 3543bd110..105fcf6a8 100644 --- a/test/e2e/libpod_suite_test.go +++ b/test/e2e/libpod_suite_test.go @@ -9,21 +9,41 @@ import ( "path/filepath" "strings" - "github.com/onsi/ginkgo" + "github.com/containers/libpod/v2/pkg/cgroups" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" ) func SkipIfRemote() { } +func SkipIfCgroupV1() { + cgroupsv2, err := cgroups.IsCgroup2UnifiedMode() + Expect(err).To(BeNil()) + + if !cgroupsv2 { + Skip("Skip on systems with cgroup V1 systems") + } +} + +func SkipIfCgroupV2() { + cgroupsv2, err := cgroups.IsCgroup2UnifiedMode() + Expect(err).To(BeNil()) + + if cgroupsv2 { + Skip("Skip on systems with cgroup V2 systems") + } +} + func SkipIfRootless() { if os.Geteuid() != 0 { - ginkgo.Skip("This function is not enabled for rootless podman") + Skip("This function is not enabled for rootless podman") } } func SkipIfRootlessV2() { if os.Geteuid() != 0 { - ginkgo.Skip("This function is not enabled for v2 rootless podman") + Skip("This function is not enabled for v2 rootless podman") } } |