aboutsummaryrefslogtreecommitdiff
path: root/test/e2e/libpod_suite_test.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-07-08 16:05:12 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-07-09 11:02:28 -0400
commitb020d1ad13267bd71065457f83116af39c77f7e5 (patch)
tree076e8b6dd991ee3c4a50b141dcc2e68198417597 /test/e2e/libpod_suite_test.go
parent5c6002bf9d0c5f8ea0b4231e0d24f8e7a0994b30 (diff)
downloadpodman-b020d1ad13267bd71065457f83116af39c77f7e5.tar.gz
podman-b020d1ad13267bd71065457f83116af39c77f7e5.tar.bz2
podman-b020d1ad13267bd71065457f83116af39c77f7e5.zip
Vendor in new version of Buildah
This also pulls in latest runc and containers/common Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/e2e/libpod_suite_test.go')
-rw-r--r--test/e2e/libpod_suite_test.go26
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")
}
}