mirror of https://github.com/k3s-io/k3s
Improved validation error message when env.valueFrom contains no (or misspelled) ref
parent
d8ec7181b4
commit
389478f312
|
@ -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`",
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue