summaryrefslogtreecommitdiff
path: root/test/e2e/systemd_test.go
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2021-08-17 12:35:29 -0400
committerChris Evich <cevich@redhat.com>2021-08-18 12:04:06 -0400
commit5c837fe5b0409593176b3f185c5f4a59545a423b (patch)
tree8d1822acf2b90c522cbcb0343f097300ee7c77bf /test/e2e/systemd_test.go
parentdc70382886c9ae14c57277eabe3d2ce552c618fd (diff)
downloadpodman-5c837fe5b0409593176b3f185c5f4a59545a423b.tar.gz
podman-5c837fe5b0409593176b3f185c5f4a59545a423b.tar.bz2
podman-5c837fe5b0409593176b3f185c5f4a59545a423b.zip
Skip stats test in CGv1 container environments
These tests were originally enabled in a situation where CI provided false-positive results. Now that has been corrected, these tests all fail under a CGv1 container environment with the error: ``` Error: unable to load cgroup at /machine.slice/libpod-e4f...086.scope/libpod_parent/libpod-fbd...425: cgroup deleted ``` This commit simply disables the tests under this specific environment. Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'test/e2e/systemd_test.go')
-rw-r--r--test/e2e/systemd_test.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/e2e/systemd_test.go b/test/e2e/systemd_test.go
index bb51d6ac2..3213a839a 100644
--- a/test/e2e/systemd_test.go
+++ b/test/e2e/systemd_test.go
@@ -6,7 +6,6 @@ import (
"strings"
"time"
- "github.com/containers/podman/v3/pkg/rootless"
. "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
@@ -118,11 +117,13 @@ WantedBy=multi-user.target
Expect(len(conData)).To(Equal(1))
Expect(conData[0].Config.SystemdMode).To(BeTrue())
- if CGROUPSV2 || !rootless.IsRootless() {
- stats := podmanTest.Podman([]string{"stats", "--no-stream", ctrName})
- stats.WaitWithDefaultTimeout()
- Expect(stats).Should(Exit(0))
+ // stats not supported w/ CGv1 rootless or containerized
+ if isCgroupsV1() && (isRootless() || isContainerized()) {
+ return
}
+ stats := podmanTest.Podman([]string{"stats", "--no-stream", ctrName})
+ stats.WaitWithDefaultTimeout()
+ Expect(stats).Should(Exit(0))
})
It("podman create container with systemd entrypoint triggers systemd mode", func() {