@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
14
14
limitations under the License.
15
15
*/
16
16
17
- package e2e_node
17
+ package e2enode
18
18
19
19
import (
20
20
"path/filepath"
@@ -96,8 +96,8 @@ func testDevicePlugin(f *framework.Framework, pluginSockDir string) {
96
96
podRECMD := "devs=$(ls /tmp/ | egrep '^Dev-[0-9]+$') && echo stub devices: $devs"
97
97
pod1 := f .PodClient ().CreateSync (makeBusyboxPod (resourceName , podRECMD ))
98
98
deviceIDRE := "stub devices: (Dev-[0-9]+)"
99
- devId1 := parseLog (f , pod1 .Name , pod1 .Name , deviceIDRE )
100
- gomega .Expect (devId1 ).To (gomega .Not (gomega .Equal ("" )))
99
+ devID1 := parseLog (f , pod1 .Name , pod1 .Name , deviceIDRE )
100
+ gomega .Expect (devID1 ).To (gomega .Not (gomega .Equal ("" )))
101
101
102
102
podResources , err := getNodeDevices ()
103
103
var resourcesForOurPod * kubeletpodresourcesv1alpha1.PodResources
@@ -125,8 +125,8 @@ func testDevicePlugin(f *framework.Framework, pluginSockDir string) {
125
125
ensurePodContainerRestart (f , pod1 .Name , pod1 .Name )
126
126
127
127
ginkgo .By ("Confirming that device assignment persists even after container restart" )
128
- devIdAfterRestart := parseLog (f , pod1 .Name , pod1 .Name , deviceIDRE )
129
- framework .ExpectEqual (devIdAfterRestart , devId1 )
128
+ devIDAfterRestart := parseLog (f , pod1 .Name , pod1 .Name , deviceIDRE )
129
+ framework .ExpectEqual (devIDAfterRestart , devID1 )
130
130
131
131
restartTime := time .Now ()
132
132
ginkgo .By ("Restarting Kubelet" )
@@ -164,8 +164,8 @@ func testDevicePlugin(f *framework.Framework, pluginSockDir string) {
164
164
165
165
ensurePodContainerRestart (f , pod1 .Name , pod1 .Name )
166
166
ginkgo .By ("Confirming that after a kubelet restart, fake-device assignement is kept" )
167
- devIdRestart1 := parseLog (f , pod1 .Name , pod1 .Name , deviceIDRE )
168
- framework .ExpectEqual (devIdRestart1 , devId1 )
167
+ devIDRestart1 := parseLog (f , pod1 .Name , pod1 .Name , deviceIDRE )
168
+ framework .ExpectEqual (devIDRestart1 , devID1 )
169
169
170
170
ginkgo .By ("Waiting for resource to become available on the local node after re-registration" )
171
171
gomega .Eventually (func () bool {
@@ -179,9 +179,9 @@ func testDevicePlugin(f *framework.Framework, pluginSockDir string) {
179
179
pod2 := f .PodClient ().CreateSync (makeBusyboxPod (resourceName , podRECMD ))
180
180
181
181
ginkgo .By ("Checking that pod got a different fake device" )
182
- devId2 := parseLog (f , pod2 .Name , pod2 .Name , deviceIDRE )
182
+ devID2 := parseLog (f , pod2 .Name , pod2 .Name , deviceIDRE )
183
183
184
- gomega .Expect (devId1 ).To (gomega .Not (gomega .Equal (devId2 )))
184
+ gomega .Expect (devID1 ).To (gomega .Not (gomega .Equal (devID2 )))
185
185
186
186
ginkgo .By ("By deleting the pods and waiting for container removal" )
187
187
err = f .ClientSet .CoreV1 ().Pods (metav1 .NamespaceSystem ).Delete (dp .Name , & deleteOptions )
@@ -197,12 +197,12 @@ func testDevicePlugin(f *framework.Framework, pluginSockDir string) {
197
197
198
198
ginkgo .By ("Checking that scheduled pods can continue to run even after we delete device plugin." )
199
199
ensurePodContainerRestart (f , pod1 .Name , pod1 .Name )
200
- devIdRestart1 = parseLog (f , pod1 .Name , pod1 .Name , deviceIDRE )
201
- framework .ExpectEqual (devIdRestart1 , devId1 )
200
+ devIDRestart1 = parseLog (f , pod1 .Name , pod1 .Name , deviceIDRE )
201
+ framework .ExpectEqual (devIDRestart1 , devID1 )
202
202
203
203
ensurePodContainerRestart (f , pod2 .Name , pod2 .Name )
204
- devIdRestart2 := parseLog (f , pod2 .Name , pod2 .Name , deviceIDRE )
205
- framework .ExpectEqual (devIdRestart2 , devId2 )
204
+ devIDRestart2 := parseLog (f , pod2 .Name , pod2 .Name , deviceIDRE )
205
+ framework .ExpectEqual (devIDRestart2 , devID2 )
206
206
207
207
ginkgo .By ("Re-register resources" )
208
208
devicePluginPod , err = f .ClientSet .CoreV1 ().Pods (metav1 .NamespaceSystem ).Create (dp )
0 commit comments