Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jan 28, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions pkg/kubecfg/resource_printer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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{},
},
},
},
Expand All @@ -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{},
Expand All @@ -259,7 +259,7 @@ func TestTemplateStrings(t *testing.T) {
},
},
},
"net": api.ContainerStatus{
"POD": api.ContainerStatus{
State: api.ContainerState{
Running: &api.ContainerStateRunning{
StartedAt: util.Time{},
Expand All @@ -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"}}
Expand Down
10 changes: 5 additions & 5 deletions pkg/kubectl/resource_printer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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{},
},
},
},
Expand All @@ -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{},
Expand All @@ -383,7 +383,7 @@ func TestTemplateStrings(t *testing.T) {
},
},
},
"net": api.ContainerStatus{
"POD": api.ContainerStatus{
State: api.ContainerState{
Running: &api.ContainerStateRunning{
StartedAt: util.Time{},
Expand All @@ -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"}}
Expand Down
2 changes: 1 addition & 1 deletion pkg/master/pod_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/master/pod_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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")},
Expand Down