Skip to content

Commit

Permalink
chore: Fixed error detection in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dploeger committed Jun 1, 2023
1 parent d663a2d commit 15d1ee3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/tests/lib/container/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (d DockerAdapter) RunCommand(containerID string, cmd []string) (string, err
if containerInspect, err := dockerCli.ContainerInspect(context.Background(), containerID); err != nil {
return "", fmt.Errorf("can not inspect container after exec: %w", err)
} else {
if !containerInspect.State.Running {
if !containerInspect.State.Running || containerInspect.State.Restarting || containerInspect.State.Dead {
return "", &RunCommandError{
ReturnCode: 0,
CommandOutput: fmt.Sprintf("container was stopped after exec: %s", commandLogbuf.String()),
Expand Down

0 comments on commit 15d1ee3

Please sign in to comment.