From 3d48091ce80e7971cc3a30d00b9c63f1101d967d Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 25 May 2017 11:47:12 -0400 Subject: [PATCH 1/2] Fix ebtables_test.go to actually get run, and to pass --- pkg/util/ebtables/ebtables_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/util/ebtables/ebtables_test.go b/pkg/util/ebtables/ebtables_test.go index 37d5b5ad654..91f6feeb652 100644 --- a/pkg/util/ebtables/ebtables_test.go +++ b/pkg/util/ebtables/ebtables_test.go @@ -23,7 +23,7 @@ import ( "k8s.io/kubernetes/pkg/util/exec" ) -func testEnsureChain(t *testing.T) { +func TestEnsureChain(t *testing.T) { fcmd := exec.FakeCmd{ CombinedOutputScript: []exec.FakeCombinedOutputAction{ // Does not Exists @@ -75,7 +75,7 @@ func testEnsureChain(t *testing.T) { } } -func testEnsureRule(t *testing.T) { +func TestEnsureRule(t *testing.T) { fcmd := exec.FakeCmd{ CombinedOutputScript: []exec.FakeCombinedOutputAction{ // Exists @@ -118,7 +118,7 @@ Bridge chain: TEST, entries: 0, policy: ACCEPT`), nil if exists { t.Errorf("expected exists = false") } - errStr := "Failed to ensure rule: exist 2, output: " + errStr := "Failed to ensure rule: exit 2, output: " if err == nil || err.Error() != errStr { t.Errorf("expected error: %q", errStr) } From 127eb53d4de1928251b9a00b4351fc789f877d7b Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 26 May 2017 14:43:24 -0400 Subject: [PATCH 2/2] Fix the names of some iptables tests The delete tests were copy+pasted from the create tests, and the names not fully updated to match. --- pkg/util/iptables/iptables_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/util/iptables/iptables_test.go b/pkg/util/iptables/iptables_test.go index 824cede9127..c7b3fbb5981 100644 --- a/pkg/util/iptables/iptables_test.go +++ b/pkg/util/iptables/iptables_test.go @@ -333,7 +333,7 @@ func TestEnsureRuleErrorCreating(t *testing.T) { } } -func TestDeleteRuleAlreadyExists(t *testing.T) { +func TestDeleteRuleDoesNotExist(t *testing.T) { fcmd := exec.FakeCmd{ CombinedOutputScript: []exec.FakeCombinedOutputAction{ // iptables version check @@ -368,7 +368,7 @@ func TestDeleteRuleAlreadyExists(t *testing.T) { } } -func TestDeleteRuleNew(t *testing.T) { +func TestDeleteRuleExists(t *testing.T) { fcmd := exec.FakeCmd{ CombinedOutputScript: []exec.FakeCombinedOutputAction{ // iptables version check @@ -438,7 +438,7 @@ func TestDeleteRuleErrorChecking(t *testing.T) { } } -func TestDeleteRuleErrorCreating(t *testing.T) { +func TestDeleteRuleErrorDeleting(t *testing.T) { fcmd := exec.FakeCmd{ CombinedOutputScript: []exec.FakeCombinedOutputAction{ // iptables version check