@@ -35,7 +35,6 @@ import (
35
35
"k8s.io/kubernetes/test/e2e/framework/testfiles"
36
36
37
37
. "github.com/onsi/ginkgo"
38
- . "github.com/onsi/gomega"
39
38
)
40
39
41
40
const (
@@ -78,7 +77,7 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
78
77
passed := true
79
78
checkRestart := func (podName string , timeout time.Duration ) {
80
79
err := framework .WaitForPodNameRunningInNamespace (c , podName , ns )
81
- Expect ( err ). NotTo ( HaveOccurred () )
80
+ framework . ExpectNoError ( err )
82
81
for t := time .Now (); time .Since (t ) < timeout ; time .Sleep (framework .Poll ) {
83
82
pod , err := c .CoreV1 ().Pods (ns ).Get (podName , metav1.GetOptions {})
84
83
framework .ExpectNoError (err , fmt .Sprintf ("getting pod %s" , podName ))
@@ -124,11 +123,11 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
124
123
framework .RunKubectlOrDieInput (secretYaml , "create" , "-f" , "-" , nsFlag )
125
124
framework .RunKubectlOrDieInput (podYaml , "create" , "-f" , "-" , nsFlag )
126
125
err := framework .WaitForPodNoLongerRunningInNamespace (c , podName , ns )
127
- Expect ( err ). NotTo ( HaveOccurred () )
126
+ framework . ExpectNoError ( err )
128
127
129
128
By ("checking if secret was read correctly" )
130
129
_ , err = framework .LookForStringInLog (ns , "secret-test-pod" , "test-container" , "value-1" , serverStartTimeout )
131
- Expect ( err ). NotTo ( HaveOccurred () )
130
+ framework . ExpectNoError ( err )
132
131
})
133
132
})
134
133
@@ -142,13 +141,13 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
142
141
By ("creating the pod" )
143
142
framework .RunKubectlOrDieInput (podYaml , "create" , "-f" , "-" , nsFlag )
144
143
err := framework .WaitForPodNoLongerRunningInNamespace (c , podName , ns )
145
- Expect ( err ). NotTo ( HaveOccurred () )
144
+ framework . ExpectNoError ( err )
146
145
147
146
By ("checking if name and namespace were passed correctly" )
148
147
_ , err = framework .LookForStringInLog (ns , podName , "test-container" , fmt .Sprintf ("MY_POD_NAMESPACE=%v" , ns ), serverStartTimeout )
149
- Expect ( err ). NotTo ( HaveOccurred () )
148
+ framework . ExpectNoError ( err )
150
149
_ , err = framework .LookForStringInLog (ns , podName , "test-container" , fmt .Sprintf ("MY_POD_NAME=%v" , podName ), serverStartTimeout )
151
- Expect ( err ). NotTo ( HaveOccurred () )
150
+ framework . ExpectNoError ( err )
152
151
})
153
152
})
154
153
})
0 commit comments