From 3e210f0fe5e71ea84202042093acd200eb7b3160 Mon Sep 17 00:00:00 2001 From: derailed Date: Fri, 25 Jan 2019 17:53:23 -0700 Subject: [PATCH] fix broken tests --- resource/svc_int_test.go | 4 ++-- resource/svc_test.go | 6 ++++-- views/pod.go | 16 +++++++++------- views/splash.go | 12 ++++++------ 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/resource/svc_int_test.go b/resource/svc_int_test.go index a651946d..2035631c 100644 --- a/resource/svc_int_test.go +++ b/resource/svc_int_test.go @@ -33,11 +33,11 @@ func TestToPorts(t *testing.T) { }{ {[]v1.ServicePort{ v1.ServicePort{Name: "http", Port: 80, NodePort: 90, Protocol: "TCP"}}, - "http:80➔ 90/TCP", + "http:80->90/TCP", }, {[]v1.ServicePort{ v1.ServicePort{Port: 80, NodePort: 30080, Protocol: "UDP"}}, - "80➔ 30080/UDP", + "80->30080/UDP", }, } for _, u := range uu { diff --git a/resource/svc_test.go b/resource/svc_test.go index c5218c71..f6c64e96 100644 --- a/resource/svc_test.go +++ b/resource/svc_test.go @@ -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", } diff --git a/views/pod.go b/views/pod.go index 7996624f..d15bd96b 100644 --- a/views/pod.go +++ b/views/pod.go @@ -23,13 +23,15 @@ 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) - }) - picker.setActions(keyActions{ - tcell.KeyCtrlB: {description: "Back", action: v.back}, - }) + { + picker.SetSelectedFunc(func(i int, t, d string, r rune) { + log.Println("Selected", i, t, d, r) + v.sshInto(v.selectedItem, t) + }) + picker.setActions(keyActions{ + tcell.KeyCtrlB: {description: "Back", action: v.back}, + }) + } v.AddPage("choose", picker, true, false) v.switchPage("po") diff --git a/views/splash.go b/views/splash.go index 75a3acf6..2c23fe87 100644 --- a/views/splash.go +++ b/views/splash.go @@ -14,12 +14,12 @@ const ( ) var logo = []string{ - ` ____ __.________ `, - `| |/ _/ __ \______`, - `| < \____ / ___/`, - `| | \ / /\___ \ `, - `|____|__ \ /____//____ >`, - ` \/ \/`, + ` __ ______ `, + `| | __/ __ \ ______`, + `| |/ /> < / ___/`, + `| `, + ` \/ \/ \/ `, } var co = []string{