summaryrefslogtreecommitdiff
path: root/test/e2e/run_test.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-02-09 11:42:30 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2021-02-09 13:18:18 -0500
commit46385dd609efb3ab36d326f9e32b6e04f31d8867 (patch)
tree7dcdcda15625282e84206a7622c323322f2479eb /test/e2e/run_test.go
parentcc846a8cd901705316e2b06013beb5c6bde44bfc (diff)
downloadpodman-46385dd609efb3ab36d326f9e32b6e04f31d8867.tar.gz
podman-46385dd609efb3ab36d326f9e32b6e04f31d8867.tar.bz2
podman-46385dd609efb3ab36d326f9e32b6e04f31d8867.zip
Restart service when CONTAINERS_CONF changes
Service needs to be restarted in order to read the CONTAINERS_CONF file. Not resetting this can lead to lots of flakes, since the test will use whatever the host system has to be set in it's containers.conf. Fixes: https://github.com/containers/podman/issues/9286 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/e2e/run_test.go')
-rw-r--r--test/e2e/run_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 76d362288..934b78202 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -332,6 +332,9 @@ var _ = Describe("Podman run", func() {
It("podman run user capabilities test", func() {
// We need to ignore the containers.conf on the test distribution for this test
os.Setenv("CONTAINERS_CONF", "/dev/null")
+ if IsRemote() {
+ podmanTest.RestartRemoteService()
+ }
session := podmanTest.Podman([]string{"run", "--rm", "--user", "bin", ALPINE, "grep", "CapBnd", "/proc/self/status"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -424,6 +427,9 @@ var _ = Describe("Podman run", func() {
It("podman run user capabilities test with image", func() {
// We need to ignore the containers.conf on the test distribution for this test
os.Setenv("CONTAINERS_CONF", "/dev/null")
+ if IsRemote() {
+ podmanTest.RestartRemoteService()
+ }
dockerfile := `FROM busybox
USER bin`
podmanTest.BuildImage(dockerfile, "test", "false")