Fixed spotty CanSupport for PV and added more unit tests for same

This commit is contained in:
markturansky
2015-05-23 09:53:33 -04:00
parent fe84643ccd
commit 3ad583cf2d
7 changed files with 19 additions and 1 deletions

View File

@@ -40,6 +40,9 @@ func TestCanSupport(t *testing.T) {
if !plug.CanSupport(&volume.Spec{Name: "foo", VolumeSource: api.VolumeSource{GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{}}}) {
t.Errorf("Expected true")
}
if !plug.CanSupport(&volume.Spec{Name: "foo", PersistentVolumeSource: api.PersistentVolumeSource{GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{}}}) {
t.Errorf("Expected true")
}
}
func TestGetAccessModes(t *testing.T) {