mirror of https://github.com/containers/podman.git
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>
This commit is contained in:
parent
cc846a8cd9
commit
46385dd609
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue