1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #41855 from cpuguy83/root_fix_test_restarting_container

Make test work with rootless mode
This commit is contained in:
Sebastiaan van Stijn 2021-01-08 17:30:08 +01:00 committed by GitHub
commit e5275087b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -193,7 +193,7 @@ func TestRestartDaemonWithRestartingContainer(t *testing.T) {
defer d.Cleanup(t)
d.StartWithBusybox(t, "--iptables=false")
defer d.Kill()
defer d.Stop(t)
ctx := context.Background()
client := d.NewClientT(t)
@ -203,8 +203,7 @@ func TestRestartDaemonWithRestartingContainer(t *testing.T) {
// We will manipulate the on disk state later
id := container.Create(ctx, t, client, container.WithRestartPolicy("always"), container.WithCmd("/bin/sh", "-c", "exit 1"))
// SIGKILL the daemon
assert.NilError(t, d.Kill())
d.Stop(t)
configPath := filepath.Join(d.Root, "containers", id, "config.v2.json")
configBytes, err := ioutil.ReadFile(configPath)