From 2ef758763fdbb6b33250afe5d380a6f01c8ae160 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Fri, 8 May 2020 12:06:41 +0200 Subject: [PATCH] Update build_cancellation_test.go --- command/build_cancellation_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/command/build_cancellation_test.go b/command/build_cancellation_test.go index f1a5959db..8ae637660 100644 --- a/command/build_cancellation_test.go +++ b/command/build_cancellation_test.go @@ -62,7 +62,11 @@ func TestBuildCommand_RunContext_CtxCancel(t *testing.T) { codeC := make(chan int) go func() { defer close(codeC) - codeC <- c.RunContext(ctx, tt.args) + cfg, ret := c.ParseArgs(tt.args) + if ret != 0 { + t.Fatal("ParseArgs failed.") + } + codeC <- c.RunContext(ctx, cfg) }() t.Logf("waiting for passing tests if any") b.wg.Wait() // ran `tt.parallelPassingTests` times