@@ -141,7 +141,7 @@ func runKubectlRetryOrDie(args ...string) string {
141
141
// Expect no errors to be present after retries are finished
142
142
// Copied from framework #ExecOrDie
143
143
framework .Logf ("stdout: %q" , output )
144
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
144
+ framework . ExpectNoError (err )
145
145
return output
146
146
}
147
147
@@ -945,7 +945,7 @@ metadata:
945
945
*/
946
946
framework .ConformanceIt ("should check if kubectl describe prints relevant information for rc and pods " , func () {
947
947
kv , err := framework .KubectlVersion ()
948
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
948
+ framework . ExpectNoError (err )
949
949
framework .SkipUnlessServerVersionGTE (kv , c .Discovery ())
950
950
controllerJSON := commonutils .SubstituteImageName (string (readTestFileOrDie (redisControllerFilename )))
951
951
serviceJSON := readTestFileOrDie (redisServiceFilename )
@@ -1011,7 +1011,7 @@ metadata:
1011
1011
// Node
1012
1012
// It should be OK to list unschedulable Nodes here.
1013
1013
nodes , err := c .CoreV1 ().Nodes ().List (metav1.ListOptions {})
1014
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
1014
+ framework . ExpectNoError (err )
1015
1015
node := nodes .Items [0 ]
1016
1016
output = framework .RunKubectlOrDie ("describe" , "node" , node .Name )
1017
1017
requiredStrings = [][]string {
@@ -1100,10 +1100,10 @@ metadata:
1100
1100
}
1101
1101
return true , nil
1102
1102
})
1103
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
1103
+ framework . ExpectNoError (err )
1104
1104
1105
1105
service , err := c .CoreV1 ().Services (ns ).Get (name , metav1.GetOptions {})
1106
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
1106
+ framework . ExpectNoError (err )
1107
1107
1108
1108
if len (service .Spec .Ports ) != 1 {
1109
1109
framework .Failf ("1 port is expected" )
@@ -1247,7 +1247,7 @@ metadata:
1247
1247
forEachPod (func (pod v1.Pod ) {
1248
1248
ginkgo .By ("checking for a matching strings" )
1249
1249
_ , err := framework .LookForStringInLog (ns , pod .Name , containerName , "The server is now ready to accept connections" , framework .PodStartTimeout )
1250
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
1250
+ framework . ExpectNoError (err )
1251
1251
1252
1252
ginkgo .By ("limiting log lines" )
1253
1253
out := framework .RunKubectlOrDie ("log" , pod .Name , containerName , nsFlag , "--tail=1" )
@@ -1495,7 +1495,7 @@ metadata:
1495
1495
}
1496
1496
return true , nil
1497
1497
})
1498
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
1498
+ framework . ExpectNoError (err )
1499
1499
})
1500
1500
1501
1501
/*
@@ -1712,7 +1712,7 @@ metadata:
1712
1712
gomega .Expect (runOutput ).To (gomega .ContainSubstring ("stdin closed" ))
1713
1713
1714
1714
err := jobutil .WaitForJobGone (c , ns , jobName , wait .ForeverTestTimeout )
1715
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
1715
+ framework . ExpectNoError (err )
1716
1716
1717
1717
ginkgo .By ("verifying the job " + jobName + " was deleted" )
1718
1718
_ , err = c .BatchV1 ().Jobs (ns ).Get (jobName , metav1.GetOptions {})
@@ -2073,7 +2073,7 @@ func validateGuestbookApp(c clientset.Interface, ns string) {
2073
2073
framework .Logf ("Waiting for all frontend pods to be Running." )
2074
2074
label := labels .SelectorFromSet (labels .Set (map [string ]string {"tier" : "frontend" , "app" : "guestbook" }))
2075
2075
err := testutils .WaitForPodsWithLabelRunning (c , ns , label )
2076
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
2076
+ framework . ExpectNoError (err )
2077
2077
framework .Logf ("Waiting for frontend to serve content." )
2078
2078
if ! waitForGuestbookResponse (c , "get" , "" , `{"data": ""}` , guestbookStartupTimeout , ns ) {
2079
2079
framework .Failf ("Frontend service did not start serving content in %v seconds." , guestbookStartupTimeout .Seconds ())
@@ -2158,7 +2158,7 @@ func forEachReplicationController(c clientset.Interface, ns, selectorKey, select
2158
2158
label := labels .SelectorFromSet (labels .Set (map [string ]string {selectorKey : selectorValue }))
2159
2159
options := metav1.ListOptions {LabelSelector : label .String ()}
2160
2160
rcs , err = c .CoreV1 ().ReplicationControllers (ns ).List (options )
2161
- gomega . Expect (err ). NotTo ( gomega . HaveOccurred () )
2161
+ framework . ExpectNoError (err )
2162
2162
if len (rcs .Items ) > 0 {
2163
2163
break
2164
2164
}
0 commit comments