Skip to content

Commit

Permalink
docker: extend restart test case
Browse files Browse the repository at this point in the history
Signed-off-by: Mathieu Tortuyaux <[email protected]>
  • Loading branch information
tormath1 committed Aug 10, 2023
1 parent 6e132c1 commit 6e6a90c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions kola/tests/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand All @@ -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) {
Expand Down

0 comments on commit 6e6a90c

Please sign in to comment.