@@ -34,7 +34,7 @@ import (
34
34
e2elog "k8s.io/kubernetes/test/e2e/framework/log"
35
35
"k8s.io/kubernetes/test/e2e/framework/testfiles"
36
36
37
- . "github.com/onsi/ginkgo"
37
+ "github.com/onsi/ginkgo"
38
38
)
39
39
40
40
const (
@@ -46,7 +46,7 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
46
46
47
47
var c clientset.Interface
48
48
var ns string
49
- BeforeEach (func () {
49
+ ginkgo . BeforeEach (func () {
50
50
c = f .ClientSet
51
51
ns = f .Namespace .Name
52
52
@@ -63,7 +63,7 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
63
63
})
64
64
65
65
framework .KubeDescribe ("Liveness" , func () {
66
- It ("liveness pods should be automatically restarted" , func () {
66
+ ginkgo . It ("liveness pods should be automatically restarted" , func () {
67
67
test := "test/fixtures/doc-yaml/user-guide/liveness"
68
68
execYaml := readFile (test , "exec-liveness.yaml.in" )
69
69
httpYaml := readFile (test , "http-liveness.yaml.in" )
@@ -94,7 +94,7 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
94
94
wg .Done ()
95
95
}
96
96
97
- By ("Check restarts" )
97
+ ginkgo . By ("Check restarts" )
98
98
99
99
// Start the "actual test", and wait for both pods to complete.
100
100
// If 2 fail: Something is broken with the test (or maybe even with liveness).
@@ -111,39 +111,39 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
111
111
})
112
112
113
113
framework .KubeDescribe ("Secret" , func () {
114
- It ("should create a pod that reads a secret" , func () {
114
+ ginkgo . It ("should create a pod that reads a secret" , func () {
115
115
test := "test/fixtures/doc-yaml/user-guide/secrets"
116
116
secretYaml := readFile (test , "secret.yaml" )
117
117
podYaml := readFile (test , "secret-pod.yaml.in" )
118
118
119
119
nsFlag := fmt .Sprintf ("--namespace=%v" , ns )
120
120
podName := "secret-test-pod"
121
121
122
- By ("creating secret and pod" )
122
+ ginkgo . By ("creating secret and pod" )
123
123
framework .RunKubectlOrDieInput (secretYaml , "create" , "-f" , "-" , nsFlag )
124
124
framework .RunKubectlOrDieInput (podYaml , "create" , "-f" , "-" , nsFlag )
125
125
err := framework .WaitForPodNoLongerRunningInNamespace (c , podName , ns )
126
126
framework .ExpectNoError (err )
127
127
128
- By ("checking if secret was read correctly" )
128
+ ginkgo . By ("checking if secret was read correctly" )
129
129
_ , err = framework .LookForStringInLog (ns , "secret-test-pod" , "test-container" , "value-1" , serverStartTimeout )
130
130
framework .ExpectNoError (err )
131
131
})
132
132
})
133
133
134
134
framework .KubeDescribe ("Downward API" , func () {
135
- It ("should create a pod that prints his name and namespace" , func () {
135
+ ginkgo . It ("should create a pod that prints his name and namespace" , func () {
136
136
test := "test/fixtures/doc-yaml/user-guide/downward-api"
137
137
podYaml := readFile (test , "dapi-pod.yaml.in" )
138
138
nsFlag := fmt .Sprintf ("--namespace=%v" , ns )
139
139
podName := "dapi-test-pod"
140
140
141
- By ("creating the pod" )
141
+ ginkgo . By ("creating the pod" )
142
142
framework .RunKubectlOrDieInput (podYaml , "create" , "-f" , "-" , nsFlag )
143
143
err := framework .WaitForPodNoLongerRunningInNamespace (c , podName , ns )
144
144
framework .ExpectNoError (err )
145
145
146
- By ("checking if name and namespace were passed correctly" )
146
+ ginkgo . By ("checking if name and namespace were passed correctly" )
147
147
_ , err = framework .LookForStringInLog (ns , podName , "test-container" , fmt .Sprintf ("MY_POD_NAMESPACE=%v" , ns ), serverStartTimeout )
148
148
framework .ExpectNoError (err )
149
149
_ , err = framework .LookForStringInLog (ns , podName , "test-container" , fmt .Sprintf ("MY_POD_NAME=%v" , podName ), serverStartTimeout )
@@ -154,5 +154,5 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
154
154
155
155
func readFile (test , file string ) string {
156
156
from := filepath .Join (test , file )
157
- return commonutils .SubstituteImageName (string (testfiles .ReadOrDie (from , Fail )))
157
+ return commonutils .SubstituteImageName (string (testfiles .ReadOrDie (from , ginkgo . Fail )))
158
158
}
0 commit comments