@@ -129,8 +129,7 @@ var _ = Describe("GitOpsServiceController", func() {
129
129
ocPath , err := exec .LookPath ("oc" )
130
130
Expect (err ).NotTo (HaveOccurred ())
131
131
132
- cmd := exec .Command (ocPath , "apply" , "-f" , imageYAML )
133
- err = cmd .Run ()
132
+ _ , _ , err = runCommandWithOutput (ocPath , "apply" , "-f" , imageYAML )
134
133
Expect (err ).NotTo (HaveOccurred ())
135
134
})
136
135
@@ -191,8 +190,7 @@ var _ = Describe("GitOpsServiceController", func() {
191
190
nonDefaultAppCR := filepath .Join (".." , "appcrs" , "non_default_appcr.yaml" )
192
191
ocPath , err := exec .LookPath ("oc" )
193
192
Expect (err ).NotTo (HaveOccurred ())
194
- cmd := exec .Command (ocPath , "apply" , "-f" , nonDefaultAppCR )
195
- _ , err = cmd .CombinedOutput ()
193
+ _ , _ , err = runCommandWithOutput (ocPath , "apply" , "-f" , nonDefaultAppCR )
196
194
if err != nil {
197
195
Expect (err ).NotTo (HaveOccurred ())
198
196
}
@@ -321,8 +319,7 @@ var _ = Describe("GitOpsServiceController", func() {
321
319
ocPath , err := exec .LookPath ("oc" )
322
320
Expect (err ).NotTo (HaveOccurred ())
323
321
schedulerYAML := filepath .Join (".." , "appcrs" , "scheduler_appcr.yaml" )
324
- cmd := exec .Command (ocPath , "apply" , "-f" , schedulerYAML )
325
- _ , err = cmd .CombinedOutput ()
322
+ _ , _ , err = runCommandWithOutput (ocPath , "apply" , "-f" , schedulerYAML )
326
323
Expect (err ).NotTo (HaveOccurred ())
327
324
328
325
Eventually (func () error {
@@ -420,8 +417,7 @@ var _ = Describe("GitOpsServiceController", func() {
420
417
nginxAppCr := filepath .Join (".." , "appcrs" , "nginx_appcr.yaml" )
421
418
ocPath , err := exec .LookPath ("oc" )
422
419
Expect (err ).NotTo (HaveOccurred ())
423
- cmd := exec .Command (ocPath , "apply" , "-f" , nginxAppCr )
424
- err = cmd .Run ()
420
+ _ , _ , err = runCommandWithOutput (ocPath , "apply" , "-f" , nginxAppCr )
425
421
Expect (err ).NotTo (HaveOccurred ())
426
422
427
423
Eventually (func () error {
@@ -487,8 +483,7 @@ var _ = Describe("GitOpsServiceController", func() {
487
483
nginxAppCr := filepath .Join (".." , "appcrs" , "nginx_default_ns_appcr.yaml" )
488
484
ocPath , err := exec .LookPath ("oc" )
489
485
Expect (err ).NotTo (HaveOccurred ())
490
- cmd := exec .Command (ocPath , "apply" , "-f" , nginxAppCr )
491
- err = cmd .Run ()
486
+ _ , _ , err = runCommandWithOutput (ocPath , "apply" , "-f" , nginxAppCr )
492
487
Expect (err ).NotTo (HaveOccurred ())
493
488
494
489
Eventually (func () error {
0 commit comments