Skip to content

Commit

Permalink
Fail TestRunOneShot if Run returns errors
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Wall <[email protected]>
  • Loading branch information
wallrj committed Nov 6, 2024
1 parent 61d64e4 commit fc1b8a0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/agent/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ func TestRunOneShot(t *testing.T) {
require.NoError(t, err)

logs.Initialize()
Run(c, nil)
klog.Flush()
defer klog.Flush()

runErr := Run(c, nil)
require.NoError(t, runErr, "Run returned an unexpected error")

return
}
t.Log("Running child process")
Expand Down

0 comments on commit fc1b8a0

Please sign in to comment.