Skip to content

Commit

Permalink
Wait for kubectl to complete before returning in tests
Browse files Browse the repository at this point in the history
This was covering up an error during test development.

Signed-off-by: mprahl <[email protected]>
  • Loading branch information
mprahl committed Aug 1, 2024
1 parent 3cd15d7 commit f51d7b3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,11 @@ func Kubectl(args ...string) {
if err != nil {
Fail(fmt.Sprintf("Error: %v", err))
}

err = cmd.Wait()
if err != nil {
Fail(fmt.Sprintf("`kubctl %s` failed: %v", strings.Join(args, " "), err))
}
}

// KubectlWithOutput execute kubectl cli and return output and error
Expand Down

0 comments on commit f51d7b3

Please sign in to comment.