mirror of https://github.com/k3s-io/k3s
Merge pull request #54843 from linyouchong/linyouchong-20171031
Automatic merge from submit-queue (batch tested with PRs 54843, 55810). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. fix testSupport in downwardapi_test add some code to test plugin.CanSupport function /sig storagepull/6/head
commit
fb70e82ec6
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue