Skip to content

Commit

Permalink
fix minor unreachable code caused by t.Fatal
Browse files Browse the repository at this point in the history
Signed-off-by: Abirdcfly <[email protected]>
  • Loading branch information
Abirdcfly authored Aug 31, 2022
1 parent adc4015 commit 8aa0b87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agent/engine/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,10 @@ func waitForStopEvents(t *testing.T, stateChangeEvents <-chan statechange.Event,

event := <-stateChangeEvents
if cont := event.(api.ContainerStateChange); cont.Status != apicontainerstatus.ContainerStopped {
t.Fatal("Expected container to stop first")
if verifyExitCode {
assert.Equal(t, *cont.ExitCode, 1, "Exit code should be present")
}
t.Fatal("Expected container to stop first")
}
event = <-stateChangeEvents
assert.Equal(t, event.(api.TaskStateChange).Status, apitaskstatus.TaskStopped, "Expected task to be STOPPED")
Expand Down

0 comments on commit 8aa0b87

Please sign in to comment.