@@ -140,7 +140,7 @@ func runKubectlRetryOrDie(args ...string) string {
140
140
// Expect no errors to be present after retries are finished
141
141
// Copied from framework #ExecOrDie
142
142
framework .Logf ("stdout: %q" , output )
143
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
143
+ framework . ExpectNoError (err )
144
144
return output
145
145
}
146
146
@@ -936,7 +936,7 @@ metadata:
936
936
*/
937
937
framework .ConformanceIt ("should check if kubectl describe prints relevant information for rc and pods " , func () {
938
938
kv , err := framework .KubectlVersion ()
939
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
939
+ framework . ExpectNoError (err )
940
940
framework .SkipUnlessServerVersionGTE (kv , c .Discovery ())
941
941
controllerJSON := commonutils .SubstituteImageName (string (readTestFileOrDie (redisControllerFilename )))
942
942
serviceJSON := readTestFileOrDie (redisServiceFilename )
@@ -1002,7 +1002,7 @@ metadata:
1002
1002
// Node
1003
1003
// It should be OK to list unschedulable Nodes here.
1004
1004
nodes , err := c .CoreV1 ().Nodes ().List (metav1.ListOptions {})
1005
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
1005
+ framework . ExpectNoError (err )
1006
1006
node := nodes .Items [0 ]
1007
1007
output = framework .RunKubectlOrDie ("describe" , "node" , node .Name )
1008
1008
requiredStrings = [][]string {
@@ -1091,10 +1091,10 @@ metadata:
1091
1091
}
1092
1092
return true , nil
1093
1093
})
1094
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
1094
+ framework . ExpectNoError (err )
1095
1095
1096
1096
service , err := c .CoreV1 ().Services (ns ).Get (name , metav1.GetOptions {})
1097
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
1097
+ framework . ExpectNoError (err )
1098
1098
1099
1099
if len (service .Spec .Ports ) != 1 {
1100
1100
framework .Failf ("1 port is expected" )
@@ -1238,7 +1238,7 @@ metadata:
1238
1238
forEachPod (func (pod v1.Pod ) {
1239
1239
ginkgo .By ("checking for a matching strings" )
1240
1240
_ , err := framework .LookForStringInLog (ns , pod .Name , containerName , "The server is now ready to accept connections" , framework .PodStartTimeout )
1241
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
1241
+ framework . ExpectNoError (err )
1242
1242
1243
1243
ginkgo .By ("limiting log lines" )
1244
1244
out := framework .RunKubectlOrDie ("log" , pod .Name , containerName , nsFlag , "--tail=1" )
@@ -1486,7 +1486,7 @@ metadata:
1486
1486
}
1487
1487
return true , nil
1488
1488
})
1489
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
1489
+ framework . ExpectNoError (err )
1490
1490
})
1491
1491
1492
1492
/*
@@ -1703,7 +1703,7 @@ metadata:
1703
1703
gomega .Expect (runOutput ).To (gomega .ContainSubstring ("stdin closed" ))
1704
1704
1705
1705
err := jobutil .WaitForJobGone (c , ns , jobName , wait .ForeverTestTimeout )
1706
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
1706
+ framework . ExpectNoError (err )
1707
1707
1708
1708
ginkgo .By ("verifying the job " + jobName + " was deleted" )
1709
1709
_ , err = c .BatchV1 ().Jobs (ns ).Get (jobName , metav1.GetOptions {})
@@ -2064,7 +2064,7 @@ func validateGuestbookApp(c clientset.Interface, ns string) {
2064
2064
framework .Logf ("Waiting for all frontend pods to be Running." )
2065
2065
label := labels .SelectorFromSet (labels .Set (map [string ]string {"tier" : "frontend" , "app" : "guestbook" }))
2066
2066
err := testutils .WaitForPodsWithLabelRunning (c , ns , label )
2067
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
2067
+ framework . ExpectNoError (err )
2068
2068
framework .Logf ("Waiting for frontend to serve content." )
2069
2069
if ! waitForGuestbookResponse (c , "get" , "" , `{"data": ""}` , guestbookStartupTimeout , ns ) {
2070
2070
framework .Failf ("Frontend service did not start serving content in %v seconds." , guestbookStartupTimeout .Seconds ())
@@ -2149,7 +2149,7 @@ func forEachReplicationController(c clientset.Interface, ns, selectorKey, select
2149
2149
label := labels .SelectorFromSet (labels .Set (map [string ]string {selectorKey : selectorValue }))
2150
2150
options := metav1.ListOptions {LabelSelector : label .String ()}
2151
2151
rcs , err = c .CoreV1 ().ReplicationControllers (ns ).List (options )
2152
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
2152
+ framework . ExpectNoError (err )
2153
2153
if len (rcs .Items ) > 0 {
2154
2154
break
2155
2155
}
0 commit comments