More e2e damage from renaming "net" to "POD"

This stops the bleeding.  Will followup with a constant.
This commit is contained in:
Tim Hockin 2015-01-28 09:58:19 -08:00
parent 988d15943f
commit 60119db5d5
4 changed files with 14 additions and 14 deletions

View File

@ -212,10 +212,10 @@ func TestTemplateStrings(t *testing.T) {
},
"false",
},
"netExists": {
"podExists": {
api.Pod{
Status: api.PodStatus{
Info: api.PodInfo{"net": api.ContainerStatus{}},
Info: api.PodInfo{"POD": api.ContainerStatus{}},
},
},
"false",
@ -225,7 +225,7 @@ func TestTemplateStrings(t *testing.T) {
Status: api.PodStatus{
Info: api.PodInfo{
"update-demo": api.ContainerStatus{},
"net": api.ContainerStatus{},
"POD": api.ContainerStatus{},
},
},
},
@ -236,7 +236,7 @@ func TestTemplateStrings(t *testing.T) {
Status: api.PodStatus{
Info: api.PodInfo{
"update-demo": api.ContainerStatus{},
"net": api.ContainerStatus{
"POD": api.ContainerStatus{
State: api.ContainerState{
Running: &api.ContainerStateRunning{
StartedAt: util.Time{},
@ -259,7 +259,7 @@ func TestTemplateStrings(t *testing.T) {
},
},
},
"net": api.ContainerStatus{
"POD": api.ContainerStatus{
State: api.ContainerState{
Running: &api.ContainerStateRunning{
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
// template, you need to update hack/e2e-suite/update.sh.
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 := `
a: {{exists . "currentState"}}
b: {{exists . "currentState" "info"}}

View File

@ -339,7 +339,7 @@ func TestTemplateStrings(t *testing.T) {
"netExists": {
api.Pod{
Status: api.PodStatus{
Info: api.PodInfo{"net": api.ContainerStatus{}},
Info: api.PodInfo{"POD": api.ContainerStatus{}},
},
},
"false",
@ -349,7 +349,7 @@ func TestTemplateStrings(t *testing.T) {
Status: api.PodStatus{
Info: api.PodInfo{
"update-demo": api.ContainerStatus{},
"net": api.ContainerStatus{},
"POD": api.ContainerStatus{},
},
},
},
@ -360,7 +360,7 @@ func TestTemplateStrings(t *testing.T) {
Status: api.PodStatus{
Info: api.PodInfo{
"update-demo": api.ContainerStatus{},
"net": api.ContainerStatus{
"POD": api.ContainerStatus{
State: api.ContainerState{
Running: &api.ContainerStateRunning{
StartedAt: util.Time{},
@ -383,7 +383,7 @@ func TestTemplateStrings(t *testing.T) {
},
},
},
"net": api.ContainerStatus{
"POD": api.ContainerStatus{
State: api.ContainerState{
Running: &api.ContainerStateRunning{
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
// template, you need to update hack/e2e-suite/update.sh.
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 := `
a: {{exists . "currentState"}}
b: {{exists . "currentState" "info"}}

View File

@ -169,7 +169,7 @@ func (p *PodCache) computePodStatus(pod *api.Pod) (api.PodStatus, error) {
} else {
newStatus.Info = result.Status.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 != "" {
newStatus.PodIP = netContainerInfo.PodIP
}

View File

@ -339,7 +339,7 @@ func TestFillPodStatus(t *testing.T) {
HostIP: "ip of machine",
PodIP: expectedIP,
Info: api.PodInfo{
"net": {
"POD": {
State: api.ContainerState{
Running: &api.ContainerStateRunning{
StartedAt: util.NewTime(expectedTime),
@ -374,7 +374,7 @@ func TestFillPodInfoNoData(t *testing.T) {
Host: "machine",
HostIP: "ip of machine",
Info: api.PodInfo{
"net": {},
"POD": {},
},
},
nodes: []api.Node{*makeHealthyNode("machine")},