From 6e6a90cad1efab2911e519d3d2c5076c3e79d4a9 Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Thu, 10 Aug 2023 14:11:33 +0200 Subject: [PATCH] docker: extend restart test case Signed-off-by: Mathieu Tortuyaux --- kola/tests/docker/docker.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/kola/tests/docker/docker.go b/kola/tests/docker/docker.go index 5698d3e97..b19b87149 100644 --- a/kola/tests/docker/docker.go +++ b/kola/tests/docker/docker.go @@ -511,6 +511,16 @@ func dockerContainerdRestart(c cluster.TestCluster) { testContainerdUp(c) + if err := util.Retry(5, 5*time.Second, func() error { + if _, err := c.SSH(m, "docker run -d ghcr.io/flatcar/busybox sleep infinity"); err != nil { + return fmt.Errorf("running docker container: %w", err) + } + + return nil + }); err != nil { + c.Fatalf("unable to run docker container: %v", err) + } + // kill it c.MustSSH(m, "sudo kill "+string(pid)) @@ -536,6 +546,16 @@ func dockerContainerdRestart(c cluster.TestCluster) { // verify it came back and docker knows about it testContainerdUp(c) + + if err := util.Retry(5, 5*time.Second, func() error { + if _, err := c.SSH(m, "docker run -d ghcr.io/flatcar/busybox sleep infinity"); err != nil { + return fmt.Errorf("running docker container: %w", err) + } + + return nil + }); err != nil { + c.Fatalf("unable to run docker container: %v", err) + } } func testContainerdUp(c cluster.TestCluster) {