command/members: Remove tests for old role filter

This commit is contained in:
Armon Dadgar 2014-06-08 14:02:24 -07:00
parent 268ded167b
commit 3847db27b5
1 changed files with 0 additions and 46 deletions

View File

@ -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)
}
}