mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 15:58:37 +00:00
Remove val and ok in Storageos
This commit is contained in:
parent
43559fe9df
commit
2522b04698
@ -181,9 +181,9 @@ func TestCreateVolume(t *testing.T) {
|
|||||||
if len(vol.Labels) == 0 {
|
if len(vol.Labels) == 0 {
|
||||||
t.Error("CreateVolume() Labels are empty")
|
t.Error("CreateVolume() Labels are empty")
|
||||||
} else {
|
} else {
|
||||||
|
var val string
|
||||||
|
var ok bool
|
||||||
for k, v := range labels {
|
for k, v := range labels {
|
||||||
var val string
|
|
||||||
var ok bool
|
|
||||||
if val, ok = vol.Labels[k]; !ok {
|
if val, ok = vol.Labels[k]; !ok {
|
||||||
t.Errorf("CreateVolume() Label %s not set", k)
|
t.Errorf("CreateVolume() Label %s not set", k)
|
||||||
}
|
}
|
||||||
@ -191,8 +191,6 @@ func TestCreateVolume(t *testing.T) {
|
|||||||
t.Errorf("CreateVolume() returned unexpected Label value %s", val)
|
t.Errorf("CreateVolume() returned unexpected Label value %s", val)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var val string
|
|
||||||
var ok bool
|
|
||||||
if val, ok = vol.Labels["labelfromapi"]; !ok {
|
if val, ok = vol.Labels["labelfromapi"]; !ok {
|
||||||
t.Error("CreateVolume() Label from api not set")
|
t.Error("CreateVolume() Label from api not set")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user