fix broken tests

mine
derailed 2019-01-25 17:53:23 -07:00
parent 04544efc1b
commit 3e210f0fe5
4 changed files with 21 additions and 17 deletions

View File

@ -33,11 +33,11 @@ func TestToPorts(t *testing.T) {
}{
{[]v1.ServicePort{
v1.ServicePort{Name: "http", Port: 80, NodePort: 90, Protocol: "TCP"}},
"http:8090/TCP",
"http:80->90/TCP",
},
{[]v1.ServicePort{
v1.ServicePort{Port: 80, NodePort: 30080, Protocol: "UDP"}},
"8030080/UDP",
"80->30080/UDP",
},
}
for _, u := range uu {

View File

@ -44,7 +44,8 @@ func TestSvcFields(t *testing.T) {
"ClusterIP",
"1.1.1.1",
"2.2.2.2",
"http:90➔ 0/TCP",
"fred=blee",
"http:90->0/TCP",
},
},
}
@ -88,7 +89,7 @@ func TestSVCListData(t *testing.T) {
assert.Equal(t, "blee", l.GetNamespace())
assert.False(t, l.HasXRay())
row := td.Rows["blee/fred"]
assert.Equal(t, 6, len(row.Deltas))
assert.Equal(t, 7, len(row.Deltas))
for _, d := range row.Deltas {
assert.Equal(t, "", d)
}
@ -143,6 +144,7 @@ func svcHeader() resource.Row {
"TYPE",
"CLUSTER-IP",
"EXTERNAL-IP",
"SELECTOR",
"PORT(S)",
"AGE",
}

View File

@ -23,6 +23,7 @@ func newPodView(t string, app *appView, list resource.List, c colorerFn) resourc
v.AddPage("logs", logs, true, false)
picker := newSelectList()
{
picker.SetSelectedFunc(func(i int, t, d string, r rune) {
log.Println("Selected", i, t, d, r)
v.sshInto(v.selectedItem, t)
@ -30,6 +31,7 @@ func newPodView(t string, app *appView, list resource.List, c colorerFn) resourc
picker.setActions(keyActions{
tcell.KeyCtrlB: {description: "Back", action: v.back},
})
}
v.AddPage("choose", picker, true, false)
v.switchPage("po")

View File

@ -14,12 +14,12 @@ const (
)
var logo = []string{
` ____ __.________ `,
`| |/ _/ __ \______`,
`| < \____ / ___/`,
`| | \ / /\___ \ `,
`|____|__ \ /____//____ >`,
` \/ \/`,
` __ ______ `,
`| | __/ __ \ ______`,
`| |/ /> < / ___/`,
`| </ -- \\___ \ `,
`|__|_ \______ /____ >`,
` \/ \/ \/ `,
}
var co = []string{