From 8f22e61a8bcb40dc6cb196a96efbaa1f7f536646 Mon Sep 17 00:00:00 2001 From: Milos Gajdos Date: Mon, 1 Jul 2019 23:19:35 +0100 Subject: [PATCH] List test function properly named. --- network/router/default_table_test.go | 10 +--------- network/router/route.go | 4 ++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/network/router/default_table_test.go b/network/router/default_table_test.go index b1c16b3a..c9e5a15e 100644 --- a/network/router/default_table_test.go +++ b/network/router/default_table_test.go @@ -16,14 +16,6 @@ func testSetup() (Table, Route) { return table, route } -func TestNewTable(t *testing.T) { - table := NewTable() - - if table.Size() != 0 { - t.Errorf("new table should be empty") - } -} - func TestAdd(t *testing.T) { table, route := testSetup() @@ -170,7 +162,7 @@ func TestUpdate(t *testing.T) { } } -func TestListRoutest(t *testing.T) { +func TestList(t *testing.T) { table, route := testSetup() dest := []string{"one.svc", "two.svc", "three.svc"} diff --git a/network/router/route.go b/network/router/route.go index 50526533..7ee3559c 100644 --- a/network/router/route.go +++ b/network/router/route.go @@ -29,10 +29,10 @@ const ( // String returns human reprensentation of policy func (p RoutePolicy) String() string { switch p { - case OverrideIfExists: - return "OVERRIDE_IF_EXISTS" case AddIfNotExists: return "ADD_IF_NOT_EXISTS" + case OverrideIfExists: + return "OVERRIDE_IF_EXISTS" case IgnoreIfExists: return "IGNORE_IF_EXISTS" default: