1
0
mirror of https://github.com/moby/moby.git synced 2025-08-01 05:47:11 +03:00

waitAndAssert -> poll.WaitOn

go get -d golang.org/x/tools/cmd/eg && \
dir=$(go env GOPATH)/src/golang.org/x/tools && \
git -C "$dir" fetch https://github.com/tiborvass/tools handle-variadic && \
git -C "$dir" checkout 61a94b82347c29b3289e83190aa3dda74d47abbb && \
go install golang.org/x/tools/cmd/eg

eg -w -t template.waitAndAssert.go ./integration-cli 2>&1 \
| awk '{print $2}' | while read file; do
	# removing vendor/ in import paths
	# not sure why eg adds them
	sed -E -i 's#^([\t]+").*/vendor/([^"]+)#\1\2#g' "$file"
	sed -E -i 's#\.\(eg_compareFunc\)##g' "$file"
	goimports -w "$file"
done

Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
Tibor Vass
2019-08-26 15:51:40 +00:00
parent 42599f1cad
commit ac2f24e72a
12 changed files with 223 additions and 224 deletions

View File

@ -40,6 +40,7 @@ import (
"golang.org/x/sys/unix"
"gotest.tools/assert"
"gotest.tools/icmd"
"gotest.tools/poll"
)
const containerdSocket = "/var/run/docker/containerd/containerd.sock"
@ -2071,10 +2072,10 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithUnpausedRunningContainer(t *tes
// Give time to containerd to process the command if we don't
// the resume event might be received after we do the inspect
waitAndAssert(t, defaultReconciliationTimeout, func(*testing.T) (interface{}, string) {
poll.WaitOn(t, pollCheck(t, func(*testing.T) (interface{}, string) {
result := icmd.RunCommand("kill", "-0", strings.TrimSpace(pid))
return result.ExitCode, ""
}, checker.Equals, 0)
}, checker.Equals(0)), poll.WithTimeout(defaultReconciliationTimeout))
// restart the daemon
s.d.Start(t, "--live-restore")