File tree Expand file tree Collapse file tree
test/openshift/e2e/ginkgo/fixture Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -194,16 +194,15 @@ func EnsureSequentialCleanSlateWithError() error {
194194 // Otherwise, expected error if it doesn't exist.
195195 }
196196
197- // Finally, wait for default openshift-gitops instance to be ready
198- failures := InterceptGomegaFailures (func () { // so we can run diagnostics
199- Eventually (defaultOpenShiftGitOpsArgoCD , "5m" , "5s" ).Should (argocd .BeAvailable ())
200- })
201- if len (failures ) > 0 {
202- OutputDebugOnFail (defaultOpenShiftGitOpsArgoCD .Namespace )
203-
204- Fail (strings .Join (failures , "\n " ))
205- }
206197
198+ // Finally, wait for default openshift-gitops instance to be ready.
199+ // Replace the fail handler for the time we fait for the ArgoCD instance to be ready, so that we can output debug information on failure.
200+ RegisterFailHandler (func (message string , callerSkip ... int ) {
201+ OutputDebugOnFail (defaultOpenShiftGitOpsArgoCD .Namespace )
202+ Fail (message , callerSkip ... )
203+ })
204+ Eventually (defaultOpenShiftGitOpsArgoCD , "5m" , "5s" ).Should (argocd .BeAvailable ())
205+ RegisterFailHandler (Fail ) // Reset handler back
207206 return nil
208207}
209208
You can’t perform that action at this time.
0 commit comments