Meow! fix broken tests

mine
derailed 2019-02-01 18:33:40 -07:00
parent 508d1f318e
commit 48fbb3c1f3
2 changed files with 6 additions and 8 deletions

View File

@ -4,7 +4,7 @@ import (
"testing"
"github.com/stretchr/testify/assert"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
)
func TestToIPs(t *testing.T) {
@ -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",
},
{[]v1.ServicePort{
v1.ServicePort{Port: 80, NodePort: 30080, Protocol: "UDP"}},
"80->30080/UDP",
"80►30080UDP",
},
}
for _, u := range uu {

View File

@ -7,7 +7,7 @@ import (
"github.com/derailed/k9s/resource/k8s"
m "github.com/petergtz/pegomock"
"github.com/stretchr/testify/assert"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
@ -44,8 +44,7 @@ func TestSvcFields(t *testing.T) {
"ClusterIP",
"1.1.1.1",
"2.2.2.2",
"fred=blee",
"http:90->0/TCP",
"http:90►0",
},
},
}
@ -89,7 +88,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, 7, len(row.Deltas))
assert.Equal(t, 6, len(row.Deltas))
for _, d := range row.Deltas {
assert.Equal(t, "", d)
}
@ -144,7 +143,6 @@ func svcHeader() resource.Row {
"TYPE",
"CLUSTER-IP",
"EXTERNAL-IP",
"SELECTOR",
"PORT(S)",
"AGE",
}