Skip to content

Commit 15d1ee3

Browse files
dploegerDennis Ploeger
authored andcommitted
chore: Fixed error detection in tests
1 parent d663a2d commit 15d1ee3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/tests/lib/container/docker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func (d DockerAdapter) RunCommand(containerID string, cmd []string) (string, err
188188
if containerInspect, err := dockerCli.ContainerInspect(context.Background(), containerID); err != nil {
189189
return "", fmt.Errorf("can not inspect container after exec: %w", err)
190190
} else {
191-
if !containerInspect.State.Running {
191+
if !containerInspect.State.Running || containerInspect.State.Restarting || containerInspect.State.Dead {
192192
return "", &RunCommandError{
193193
ReturnCode: 0,
194194
CommandOutput: fmt.Sprintf("container was stopped after exec: %s", commandLogbuf.String()),

0 commit comments

Comments
 (0)