From 3847db27b5994e8875dcdfa966555e33f92278be Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Sun, 8 Jun 2014 14:02:24 -0700 Subject: [PATCH] command/members: Remove tests for old role filter --- command/members_test.go | 46 ----------------------------------------- 1 file changed, 46 deletions(-) diff --git a/command/members_test.go b/command/members_test.go index 21a959f3e8..b2ec7e7adb 100644 --- a/command/members_test.go +++ b/command/members_test.go @@ -92,49 +92,3 @@ func TestMembersCommandRun_statusFilter_failed(t *testing.T) { t.Fatalf("bad: %d", code) } } - -func TestMembersCommandRun_roleFilter(t *testing.T) { - a1 := testAgent(t) - defer a1.Shutdown() - - ui := new(cli.MockUi) - c := &MembersCommand{Ui: ui} - args := []string{ - "-rpc-addr=" + a1.addr, - "-role=consul", - } - - code := c.Run(args) - if code != 0 { - t.Fatalf("bad: %d. %#v", code, ui.ErrorWriter.String()) - } - - if !strings.Contains(ui.OutputWriter.String(), a1.config.NodeName) { - t.Fatalf("bad: %#v", ui.OutputWriter.String()) - } -} - -func TestMembersCommandRun_roleFilter_failed(t *testing.T) { - a1 := testAgent(t) - defer a1.Shutdown() - - ui := new(cli.MockUi) - c := &MembersCommand{Ui: ui} - args := []string{ - "-rpc-addr=" + a1.addr, - "-role=primary", - } - - code := c.Run(args) - if code == 1 { - t.Fatalf("bad: %d. %#v", code, ui.ErrorWriter.String()) - } - - if strings.Contains(ui.OutputWriter.String(), a1.config.NodeName) { - t.Fatalf("bad: %#v", ui.OutputWriter.String()) - } - - if code != 2 { - t.Fatalf("bad: %d", code) - } -}