fix testSupport in downwardapi_test

This commit is contained in:
linyouchong 2017-10-31 23:20:21 +08:00
parent d118e44320
commit 341052be7a

View File

@ -63,6 +63,12 @@ func TestCanSupport(t *testing.T) {
if plugin.GetPluginName() != downwardAPIPluginName {
t.Errorf("Wrong name: %s", plugin.GetPluginName())
}
if !plugin.CanSupport(&volume.Spec{Volume: &v1.Volume{VolumeSource: v1.VolumeSource{DownwardAPI: &v1.DownwardAPIVolumeSource{}}}}) {
t.Errorf("Expected true")
}
if plugin.CanSupport(&volume.Spec{Volume: &v1.Volume{VolumeSource: v1.VolumeSource{}}}) {
t.Errorf("Expected false")
}
}
func TestDownwardAPI(t *testing.T) {