mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Change EnvVarSource.FieldPath -> FieldRef and add example
This commit is contained in:
@@ -322,7 +322,7 @@ func TestSetDefaultObjectFieldSelectorAPIVersion(t *testing.T) {
|
||||
Env: []current.EnvVar{
|
||||
{
|
||||
ValueFrom: ¤t.EnvVarSource{
|
||||
FieldPath: ¤t.ObjectFieldSelector{},
|
||||
FieldRef: ¤t.ObjectFieldSelector{},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -335,7 +335,7 @@ func TestSetDefaultObjectFieldSelectorAPIVersion(t *testing.T) {
|
||||
sList2 := obj2.(*current.ContainerManifestList)
|
||||
s2 := sList2.Items[0]
|
||||
|
||||
apiVersion := s2.Containers[0].Env[0].ValueFrom.FieldPath.APIVersion
|
||||
apiVersion := s2.Containers[0].Env[0].ValueFrom.FieldRef.APIVersion
|
||||
if apiVersion != "v1beta1" {
|
||||
t.Errorf("Expected default APIVersion v1beta1, got: %v", apiVersion)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user