Skip to content

Commit

Permalink
Merge pull request shipwright-io#49 from gabemontero/more-build-run-u…
Browse files Browse the repository at this point in the history
…nit-test-panics

more RunCommand initialization verification for TestStartBuildRunFollowLogs
  • Loading branch information
openshift-merge-robot committed Sep 28, 2021
2 parents 0ee0295 + 5f40421 commit 14e977b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/shp/cmd/build/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ func TestStartBuildRunFollowLog(t *testing.T) {
// the init to occur.
cmd.watchLock.Lock()
err := wait.PollImmediate(1*time.Second, 3*time.Second, func() (done bool, err error) {
if cmd.pw != nil {
// check any of the vars on RunCommand that are used in onEvent and make sure they are set;
// we are verifying the initialization done in Run() on RunCommand is complete
if cmd.pw != nil && cmd.ioStreams != nil && cmd.shpClientset != nil {
cmd.watchLock.Unlock()
return true, nil
}
Expand Down

0 comments on commit 14e977b

Please sign in to comment.