Skip to content

Commit a5f08c2

Browse files
committed
Expect exact exit code -1 on Unix for re-raised SIGINT
Since up_test.go has a !windows build constraint, the process will always die from the re-raised signal on this platform. Remove the fallback to exit code 130 and assert -1 directly. Signed-off-by: Artem Lytkin <iprintercanon@gmail.com>
1 parent e08e7de commit a5f08c2

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

pkg/e2e/up_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,8 @@ func TestUpDependenciesNotStopped(t *testing.T) {
9797
if !errors.As(err, &exitErr) {
9898
t.Fatalf("`compose up` failed with non-exit error: %v", err)
9999
}
100-
// Process is expected to die from re-raised SIGINT signal (exit code -1).
101-
// If signal re-raise doesn't terminate the process, the fallback path exits with code 130.
102-
assert.Assert(t, exitErr.ExitCode() == -1 || exitErr.ExitCode() == 130,
100+
// On Unix, process is expected to die from re-raised SIGINT signal (exit code -1).
101+
assert.Equal(t, -1, exitErr.ExitCode(),
103102
"`compose up` exited with unexpected code: %d (%v)", exitErr.ExitCode(), err)
104103
}
105104

0 commit comments

Comments
 (0)