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