@@ -244,7 +244,7 @@ func TestPersistentVolumeBindRace(t *testing.T) {
244
244
maxClaims := 100
245
245
claims := []* v1.PersistentVolumeClaim {}
246
246
for counter <= maxClaims {
247
- counter += 1
247
+ counter ++
248
248
newPvc := pvc .DeepCopy ()
249
249
newPvc .ObjectMeta = metav1.ObjectMeta {Name : fmt .Sprintf ("fake-pvc-race-%d" , counter )}
250
250
claim , err := testClient .CoreV1 ().PersistentVolumeClaims (ns .Name ).Create (newPvc )
@@ -313,19 +313,19 @@ func TestPersistentVolumeClaimLabelSelector(t *testing.T) {
313
313
modes = []v1.PersistentVolumeAccessMode {v1 .ReadWriteOnce }
314
314
reclaim = v1 .PersistentVolumeReclaimRetain
315
315
316
- pv_true = createPV ("pv-true" , "/tmp/foo-label" , "1G" , modes , reclaim )
317
- pv_false = createPV ("pv-false" , "/tmp/foo-label" , "1G" , modes , reclaim )
318
- pvc = createPVC ("pvc-ls-1" , ns .Name , "1G" , modes , "" )
316
+ pvTrue = createPV ("pv-true" , "/tmp/foo-label" , "1G" , modes , reclaim )
317
+ pvFalse = createPV ("pv-false" , "/tmp/foo-label" , "1G" , modes , reclaim )
318
+ pvc = createPVC ("pvc-ls-1" , ns .Name , "1G" , modes , "" )
319
319
)
320
320
321
- pv_true .ObjectMeta .SetLabels (map [string ]string {"foo" : "true" })
322
- pv_false .ObjectMeta .SetLabels (map [string ]string {"foo" : "false" })
321
+ pvTrue .ObjectMeta .SetLabels (map [string ]string {"foo" : "true" })
322
+ pvFalse .ObjectMeta .SetLabels (map [string ]string {"foo" : "false" })
323
323
324
- _ , err = testClient .CoreV1 ().PersistentVolumes ().Create (pv_true )
324
+ _ , err = testClient .CoreV1 ().PersistentVolumes ().Create (pvTrue )
325
325
if err != nil {
326
326
t .Fatalf ("Failed to create PersistentVolume: %v" , err )
327
327
}
328
- _ , err = testClient .CoreV1 ().PersistentVolumes ().Create (pv_false )
328
+ _ , err = testClient .CoreV1 ().PersistentVolumes ().Create (pvFalse )
329
329
if err != nil {
330
330
t .Fatalf ("Failed to create PersistentVolume: %v" , err )
331
331
}
@@ -394,19 +394,19 @@ func TestPersistentVolumeClaimLabelSelectorMatchExpressions(t *testing.T) {
394
394
modes = []v1.PersistentVolumeAccessMode {v1 .ReadWriteOnce }
395
395
reclaim = v1 .PersistentVolumeReclaimRetain
396
396
397
- pv_true = createPV ("pv-true" , "/tmp/foo-label" , "1G" , modes , reclaim )
398
- pv_false = createPV ("pv-false" , "/tmp/foo-label" , "1G" , modes , reclaim )
399
- pvc = createPVC ("pvc-ls-1" , ns .Name , "1G" , modes , "" )
397
+ pvTrue = createPV ("pv-true" , "/tmp/foo-label" , "1G" , modes , reclaim )
398
+ pvFalse = createPV ("pv-false" , "/tmp/foo-label" , "1G" , modes , reclaim )
399
+ pvc = createPVC ("pvc-ls-1" , ns .Name , "1G" , modes , "" )
400
400
)
401
401
402
- pv_true .ObjectMeta .SetLabels (map [string ]string {"foo" : "valA" , "bar" : "" })
403
- pv_false .ObjectMeta .SetLabels (map [string ]string {"foo" : "valB" , "baz" : "" })
402
+ pvTrue .ObjectMeta .SetLabels (map [string ]string {"foo" : "valA" , "bar" : "" })
403
+ pvFalse .ObjectMeta .SetLabels (map [string ]string {"foo" : "valB" , "baz" : "" })
404
404
405
- _ , err = testClient .CoreV1 ().PersistentVolumes ().Create (pv_true )
405
+ _ , err = testClient .CoreV1 ().PersistentVolumes ().Create (pvTrue )
406
406
if err != nil {
407
407
t .Fatalf ("Failed to create PersistentVolume: %v" , err )
408
408
}
409
- _ , err = testClient .CoreV1 ().PersistentVolumes ().Create (pv_false )
409
+ _ , err = testClient .CoreV1 ().PersistentVolumes ().Create (pvFalse )
410
410
if err != nil {
411
411
t .Fatalf ("Failed to create PersistentVolume: %v" , err )
412
412
}
@@ -539,7 +539,7 @@ func TestPersistentVolumeMultiPVs(t *testing.T) {
539
539
t .Fatalf ("Bind mismatch! Expected %s capacity %d but got %s capacity %d" , pvc .Name , expectedCapVal , pv .Spec .ClaimRef .Name , pvCap )
540
540
}
541
541
t .Logf ("claim bounded to %s capacity %v" , pv .Name , pv .Spec .Capacity [v1 .ResourceStorage ])
542
- bound += 1
542
+ bound ++
543
543
}
544
544
t .Log ("volumes checked" )
545
545
@@ -965,18 +965,18 @@ func TestPersistentVolumeMultiPVsDiffAccessModes(t *testing.T) {
965
965
defer close (stopCh )
966
966
967
967
// This PV will be claimed, released, and deleted
968
- pv_rwo := createPV ("pv-rwo" , "/tmp/foo" , "10G" ,
968
+ pvRwo := createPV ("pv-rwo" , "/tmp/foo" , "10G" ,
969
969
[]v1.PersistentVolumeAccessMode {v1 .ReadWriteOnce }, v1 .PersistentVolumeReclaimRetain )
970
- pv_rwm := createPV ("pv-rwm" , "/tmp/bar" , "10G" ,
970
+ pvRwm := createPV ("pv-rwm" , "/tmp/bar" , "10G" ,
971
971
[]v1.PersistentVolumeAccessMode {v1 .ReadWriteMany }, v1 .PersistentVolumeReclaimRetain )
972
972
973
973
pvc := createPVC ("pvc-rwm" , ns .Name , "5G" , []v1.PersistentVolumeAccessMode {v1 .ReadWriteMany }, "" )
974
974
975
- _ , err := testClient .CoreV1 ().PersistentVolumes ().Create (pv_rwm )
975
+ _ , err := testClient .CoreV1 ().PersistentVolumes ().Create (pvRwm )
976
976
if err != nil {
977
977
t .Errorf ("Failed to create PersistentVolume: %v" , err )
978
978
}
979
- _ , err = testClient .CoreV1 ().PersistentVolumes ().Create (pv_rwo )
979
+ _ , err = testClient .CoreV1 ().PersistentVolumes ().Create (pvRwo )
980
980
if err != nil {
981
981
t .Errorf ("Failed to create PersistentVolume: %v" , err )
982
982
}
0 commit comments