mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
More e2e damage from renaming "net" to "POD"
This stops the bleeding. Will followup with a constant.
This commit is contained in:
parent
988d15943f
commit
60119db5d5
@ -212,10 +212,10 @@ func TestTemplateStrings(t *testing.T) {
|
|||||||
},
|
},
|
||||||
"false",
|
"false",
|
||||||
},
|
},
|
||||||
"netExists": {
|
"podExists": {
|
||||||
api.Pod{
|
api.Pod{
|
||||||
Status: api.PodStatus{
|
Status: api.PodStatus{
|
||||||
Info: api.PodInfo{"net": api.ContainerStatus{}},
|
Info: api.PodInfo{"POD": api.ContainerStatus{}},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"false",
|
"false",
|
||||||
@ -225,7 +225,7 @@ func TestTemplateStrings(t *testing.T) {
|
|||||||
Status: api.PodStatus{
|
Status: api.PodStatus{
|
||||||
Info: api.PodInfo{
|
Info: api.PodInfo{
|
||||||
"update-demo": api.ContainerStatus{},
|
"update-demo": api.ContainerStatus{},
|
||||||
"net": api.ContainerStatus{},
|
"POD": api.ContainerStatus{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -236,7 +236,7 @@ func TestTemplateStrings(t *testing.T) {
|
|||||||
Status: api.PodStatus{
|
Status: api.PodStatus{
|
||||||
Info: api.PodInfo{
|
Info: api.PodInfo{
|
||||||
"update-demo": api.ContainerStatus{},
|
"update-demo": api.ContainerStatus{},
|
||||||
"net": api.ContainerStatus{
|
"POD": api.ContainerStatus{
|
||||||
State: api.ContainerState{
|
State: api.ContainerState{
|
||||||
Running: &api.ContainerStateRunning{
|
Running: &api.ContainerStateRunning{
|
||||||
StartedAt: util.Time{},
|
StartedAt: util.Time{},
|
||||||
@ -259,7 +259,7 @@ func TestTemplateStrings(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"net": api.ContainerStatus{
|
"POD": api.ContainerStatus{
|
||||||
State: api.ContainerState{
|
State: api.ContainerState{
|
||||||
Running: &api.ContainerStateRunning{
|
Running: &api.ContainerStateRunning{
|
||||||
StartedAt: util.Time{},
|
StartedAt: util.Time{},
|
||||||
@ -276,7 +276,7 @@ func TestTemplateStrings(t *testing.T) {
|
|||||||
// The point of this test is to verify that the below template works. If you change this
|
// The point of this test is to verify that the below template works. If you change this
|
||||||
// template, you need to update hack/e2e-suite/update.sh.
|
// template, you need to update hack/e2e-suite/update.sh.
|
||||||
tmpl :=
|
tmpl :=
|
||||||
`{{and (exists . "currentState" "info" "update-demo" "state" "running") (exists . "currentState" "info" "net" "state" "running")}}`
|
`{{and (exists . "currentState" "info" "update-demo" "state" "running") (exists . "currentState" "info" "POD" "state" "running")}}`
|
||||||
useThisToDebug := `
|
useThisToDebug := `
|
||||||
a: {{exists . "currentState"}}
|
a: {{exists . "currentState"}}
|
||||||
b: {{exists . "currentState" "info"}}
|
b: {{exists . "currentState" "info"}}
|
||||||
|
@ -339,7 +339,7 @@ func TestTemplateStrings(t *testing.T) {
|
|||||||
"netExists": {
|
"netExists": {
|
||||||
api.Pod{
|
api.Pod{
|
||||||
Status: api.PodStatus{
|
Status: api.PodStatus{
|
||||||
Info: api.PodInfo{"net": api.ContainerStatus{}},
|
Info: api.PodInfo{"POD": api.ContainerStatus{}},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"false",
|
"false",
|
||||||
@ -349,7 +349,7 @@ func TestTemplateStrings(t *testing.T) {
|
|||||||
Status: api.PodStatus{
|
Status: api.PodStatus{
|
||||||
Info: api.PodInfo{
|
Info: api.PodInfo{
|
||||||
"update-demo": api.ContainerStatus{},
|
"update-demo": api.ContainerStatus{},
|
||||||
"net": api.ContainerStatus{},
|
"POD": api.ContainerStatus{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -360,7 +360,7 @@ func TestTemplateStrings(t *testing.T) {
|
|||||||
Status: api.PodStatus{
|
Status: api.PodStatus{
|
||||||
Info: api.PodInfo{
|
Info: api.PodInfo{
|
||||||
"update-demo": api.ContainerStatus{},
|
"update-demo": api.ContainerStatus{},
|
||||||
"net": api.ContainerStatus{
|
"POD": api.ContainerStatus{
|
||||||
State: api.ContainerState{
|
State: api.ContainerState{
|
||||||
Running: &api.ContainerStateRunning{
|
Running: &api.ContainerStateRunning{
|
||||||
StartedAt: util.Time{},
|
StartedAt: util.Time{},
|
||||||
@ -383,7 +383,7 @@ func TestTemplateStrings(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"net": api.ContainerStatus{
|
"POD": api.ContainerStatus{
|
||||||
State: api.ContainerState{
|
State: api.ContainerState{
|
||||||
Running: &api.ContainerStateRunning{
|
Running: &api.ContainerStateRunning{
|
||||||
StartedAt: util.Time{},
|
StartedAt: util.Time{},
|
||||||
@ -400,7 +400,7 @@ func TestTemplateStrings(t *testing.T) {
|
|||||||
// The point of this test is to verify that the below template works. If you change this
|
// The point of this test is to verify that the below template works. If you change this
|
||||||
// template, you need to update hack/e2e-suite/update.sh.
|
// template, you need to update hack/e2e-suite/update.sh.
|
||||||
tmpl :=
|
tmpl :=
|
||||||
`{{and (exists . "currentState" "info" "update-demo" "state" "running") (exists . "currentState" "info" "net" "state" "running")}}`
|
`{{and (exists . "currentState" "info" "update-demo" "state" "running") (exists . "currentState" "info" "POD" "state" "running")}}`
|
||||||
useThisToDebug := `
|
useThisToDebug := `
|
||||||
a: {{exists . "currentState"}}
|
a: {{exists . "currentState"}}
|
||||||
b: {{exists . "currentState" "info"}}
|
b: {{exists . "currentState" "info"}}
|
||||||
|
@ -169,7 +169,7 @@ func (p *PodCache) computePodStatus(pod *api.Pod) (api.PodStatus, error) {
|
|||||||
} else {
|
} else {
|
||||||
newStatus.Info = result.Status.Info
|
newStatus.Info = result.Status.Info
|
||||||
newStatus.Phase = getPhase(&pod.Spec, newStatus.Info)
|
newStatus.Phase = getPhase(&pod.Spec, newStatus.Info)
|
||||||
if netContainerInfo, ok := newStatus.Info["net"]; ok {
|
if netContainerInfo, ok := newStatus.Info["POD"]; ok {
|
||||||
if netContainerInfo.PodIP != "" {
|
if netContainerInfo.PodIP != "" {
|
||||||
newStatus.PodIP = netContainerInfo.PodIP
|
newStatus.PodIP = netContainerInfo.PodIP
|
||||||
}
|
}
|
||||||
|
@ -339,7 +339,7 @@ func TestFillPodStatus(t *testing.T) {
|
|||||||
HostIP: "ip of machine",
|
HostIP: "ip of machine",
|
||||||
PodIP: expectedIP,
|
PodIP: expectedIP,
|
||||||
Info: api.PodInfo{
|
Info: api.PodInfo{
|
||||||
"net": {
|
"POD": {
|
||||||
State: api.ContainerState{
|
State: api.ContainerState{
|
||||||
Running: &api.ContainerStateRunning{
|
Running: &api.ContainerStateRunning{
|
||||||
StartedAt: util.NewTime(expectedTime),
|
StartedAt: util.NewTime(expectedTime),
|
||||||
@ -374,7 +374,7 @@ func TestFillPodInfoNoData(t *testing.T) {
|
|||||||
Host: "machine",
|
Host: "machine",
|
||||||
HostIP: "ip of machine",
|
HostIP: "ip of machine",
|
||||||
Info: api.PodInfo{
|
Info: api.PodInfo{
|
||||||
"net": {},
|
"POD": {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
nodes: []api.Node{*makeHealthyNode("machine")},
|
nodes: []api.Node{*makeHealthyNode("machine")},
|
||||||
|
Loading…
Reference in New Issue
Block a user