Improved validation error message when env.valueFrom contains no (or misspelled) ref

pull/6/head
Marko Luksa 2016-11-15 10:36:34 +01:00
parent d8ec7181b4
commit 389478f312
1 changed files with 2 additions and 3 deletions

View File

@ -2449,9 +2449,8 @@ func TestValidateEnv(t *testing.T) {
{
name: "valueFrom without a source",
envs: []api.EnvVar{{
Name: "abc",
ValueFrom: &api.EnvVarSource{
},
Name: "abc",
ValueFrom: &api.EnvVarSource{},
}},
expectedError: "[0].valueFrom: Invalid value: \"\": must specify one of: `fieldRef`, `resourceFieldRef`, `configMapKeyRef` or `secretKeyRef`",
},