Skip to content

Commit fc1b8a0

Browse files
committed
Fail TestRunOneShot if Run returns errors
Signed-off-by: Richard Wall <[email protected]>
1 parent 61d64e4 commit fc1b8a0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pkg/agent/run_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@ func TestRunOneShot(t *testing.T) {
4444
require.NoError(t, err)
4545

4646
logs.Initialize()
47-
Run(c, nil)
48-
klog.Flush()
47+
defer klog.Flush()
48+
49+
runErr := Run(c, nil)
50+
require.NoError(t, runErr, "Run returned an unexpected error")
51+
4952
return
5053
}
5154
t.Log("Running child process")

0 commit comments

Comments
 (0)