Merge pull request #8732 from markturansky/missing_pv_support

Fixed CanSupport func across all volumes (for PV)
This commit is contained in:
Tim Hockin
2015-05-27 08:45:47 -07:00
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{Glusterfs: &api.GlusterfsVolumeSource{}}}) {
t.Errorf("Expected true")
}
if !plug.CanSupport(&volume.Spec{Name: "foo", PersistentVolumeSource: api.PersistentVolumeSource{Glusterfs: &api.GlusterfsVolumeSource{}}}) {
t.Errorf("Expected true")
}
if plug.CanSupport(&volume.Spec{Name: "foo", VolumeSource: api.VolumeSource{}}) {
t.Errorf("Expected false")
}