From 1fb659b1e61bfe67217df0b6aad759132c10575b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0trauch?= Date: Sun, 6 Feb 2022 01:40:04 +0100 Subject: [PATCH] Wait for the container --- containers/docker_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/containers/docker_test.go b/containers/docker_test.go index ed32330..38f985c 100644 --- a/containers/docker_test.go +++ b/containers/docker_test.go @@ -2,6 +2,7 @@ package containers import ( "testing" + "time" "github.com/stretchr/testify/assert" ) @@ -22,6 +23,8 @@ func TestGetProcesses(t *testing.T) { err = driver.Start("test") assert.Nil(t, err) + time.Sleep(5 * time.Second) + processes, err := driver.GetProcesses("test") assert.Nil(t, err) assert.Contains(t, processes, "sleep 3600")