Merge pull request #5807 from pmorie/secret_volume_ref

Change secret volume plugin reference to name
This commit is contained in:
Tim Hockin
2015-03-24 14:18:35 -07:00
13 changed files with 96 additions and 33 deletions

View File

@@ -211,7 +211,7 @@ func TestValidateVolumes(t *testing.T) {
{Name: "empty", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
{Name: "gcepd", VolumeSource: api.VolumeSource{GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{"my-PD", "ext4", 1, false}}},
{Name: "gitrepo", VolumeSource: api.VolumeSource{GitRepo: &api.GitRepoVolumeSource{"my-repo", "hashstring"}}},
{Name: "secret", VolumeSource: api.VolumeSource{Secret: &api.SecretVolumeSource{api.ObjectReference{Namespace: api.NamespaceDefault, Name: "my-secret", Kind: "Secret"}}}},
{Name: "secret", VolumeSource: api.VolumeSource{Secret: &api.SecretVolumeSource{"my-secret"}}},
}
names, errs := validateVolumes(successCase)
if len(errs) != 0 {