From b710000dbf79b159b1a81804ec6004dc00a92e36 Mon Sep 17 00:00:00 2001 From: Mihail Stoykov Date: Fri, 8 Apr 2022 12:45:15 +0300 Subject: [PATCH] Always cancel context in integration tests even on wrong exit code --- cmd/root_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/root_test.go b/cmd/root_test.go index 2c3a7f25659..846b5413ad9 100644 --- a/cmd/root_test.go +++ b/cmd/root_test.go @@ -53,8 +53,8 @@ func newGlobalTestState(t *testing.T) *globalTestState { } defaultOsExitHandle := func(exitCode int) { - require.Equal(t, ts.expectedExitCode, exitCode) cancel() + require.Equal(t, ts.expectedExitCode, exitCode) } outMutex := &sync.Mutex{}