not allow backsteps in local volume plugin
This commit is contained in:
@@ -281,6 +281,21 @@ func TestValidatePersistentVolumes(t *testing.T) {
|
||||
StorageClassName: "backstep-hostpath",
|
||||
}),
|
||||
},
|
||||
"bad-local-volume-backsteps": {
|
||||
isExpectedFailure: true,
|
||||
volume: testVolume("foo", "", api.PersistentVolumeSpec{
|
||||
Capacity: api.ResourceList{
|
||||
api.ResourceName(api.ResourceStorage): resource.MustParse("10G"),
|
||||
},
|
||||
AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce},
|
||||
PersistentVolumeSource: api.PersistentVolumeSource{
|
||||
Local: &api.LocalVolumeSource{
|
||||
Path: "/foo/..",
|
||||
},
|
||||
},
|
||||
StorageClassName: "backstep-local",
|
||||
}),
|
||||
},
|
||||
}
|
||||
|
||||
for name, scenario := range scenarios {
|
||||
|
Reference in New Issue
Block a user