1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/testutil/daemon
Sebastiaan van Stijn b843b1ffe3
testutil/daemon: store pidfile-path, and ignore errors when removing
This patch stores the location of the pidfile, so that we can use the
same path that was set to create it. If no pidfile was created, we'll
not try to remove it.

We're now also ignoring errors when removing the pidfile, as they should
not fail the test (especialy if no pidfile was created in the first place,
as that could potentially hide the actual failure).

This may help with "failures" such as the one below:

```
FAIL: check_test.go:347: DockerSwarmSuite.TearDownTest

check_test.go:352:
    d.Stop(c)
/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:414:
    t.Fatalf("Error while stopping the daemon %s : %v", d.id, err)
... Error: Error while stopping the daemon d1512c423813a : remove /go/src/github.com/docker/docker/bundles/test-integration/DockerSwarmSuite.TestServiceLogs/d1512c423813a/docker.pid: no such file or directory
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-11 00:38:02 +02:00
..
config.go testutil: use testing.TB instead of assert.TestingT 2019-09-23 14:23:01 +02:00
container.go testutil: use testing.TB instead of assert.TestingT 2019-09-23 14:23:01 +02:00
daemon.go testutil/daemon: store pidfile-path, and ignore errors when removing 2019-10-11 00:38:02 +02:00
daemon_unix.go testutil/daemon: prefix all logs with daemon-id 2019-10-11 00:37:49 +02:00
daemon_windows.go testutil/daemon: prefix all logs with daemon-id 2019-10-11 00:37:49 +02:00
doc.go
node.go testutil: use testing.TB instead of assert.TestingT 2019-09-23 14:23:01 +02:00
ops.go testutil: update WithInitsignature to be a daemon.Option 2019-09-30 17:38:26 +02:00
plugin.go testutil: use testing.TB instead of assert.TestingT 2019-09-23 14:23:01 +02:00
secret.go testutil: use testing.TB instead of assert.TestingT 2019-09-23 14:23:01 +02:00
service.go testutil: use testing.TB instead of assert.TestingT 2019-09-23 14:23:01 +02:00
swarm.go testutil: use testing.TB instead of assert.TestingT 2019-09-23 14:23:01 +02:00