@@ -18,6 +18,7 @@ import (
18
18
"github.com/openshift/origin/pkg/client"
19
19
deployapi "github.com/openshift/origin/pkg/deploy/api"
20
20
deployutil "github.com/openshift/origin/pkg/deploy/util"
21
+ imageapi "github.com/openshift/origin/pkg/image/api"
21
22
exutil "github.com/openshift/origin/test/extended/util"
22
23
)
23
24
@@ -297,9 +298,9 @@ var _ = g.Describe("deploymentconfigs", func() {
297
298
o .Expect (waitForLatestCondition (oc , name , deploymentRunTimeout , deploymentReachedCompletion )).NotTo (o .HaveOccurred ())
298
299
299
300
g .By ("verifying the post deployment action happened: tag is set" )
300
- var out string
301
+ var istag * imageapi. ImageStreamTag
301
302
pollErr := wait .PollImmediate (100 * time .Millisecond , 1 * time .Minute , func () (bool , error ) {
302
- out , err = oc .Run ( "get" ). Args ( "istag/ sample-stream: deployed"). Output ( )
303
+ istag , err = oc .Client (). ImageStreamTags ( oc . Namespace ()). Get ( " sample-stream" , " deployed" )
303
304
if errors .IsNotFound (err ) {
304
305
return false , nil
305
306
}
@@ -313,8 +314,8 @@ var _ = g.Describe("deploymentconfigs", func() {
313
314
}
314
315
o .Expect (pollErr ).NotTo (o .HaveOccurred ())
315
316
316
- if ! strings . Contains ( out , " origin-pod") {
317
- err = fmt .Errorf ("expected %q to be part of the image reference in %q " , "origin-pod" , out )
317
+ if istag . Tag == nil || istag . Tag . From == nil || istag . Tag . From . Name != "openshift/ origin-pod" {
318
+ err = fmt .Errorf ("expected %q to be part of the image reference in %#v " , "openshift/ origin-pod" , istag )
318
319
o .Expect (err ).NotTo (o .HaveOccurred ())
319
320
}
320
321
})
0 commit comments