Improved validation error message when env.valueFrom contains no (or misspelled) ref
This commit is contained in:
@@ -2450,8 +2450,7 @@ func TestValidateEnv(t *testing.T) {
|
||||
name: "valueFrom without a source",
|
||||
envs: []api.EnvVar{{
|
||||
Name: "abc",
|
||||
ValueFrom: &api.EnvVarSource{
|
||||
},
|
||||
ValueFrom: &api.EnvVarSource{},
|
||||
}},
|
||||
expectedError: "[0].valueFrom: Invalid value: \"\": must specify one of: `fieldRef`, `resourceFieldRef`, `configMapKeyRef` or `secretKeyRef`",
|
||||
},
|
||||
|
Reference in New Issue
Block a user