mirror of https://github.com/status-im/consul.git
command/members: Remove tests for old role filter
This commit is contained in:
parent
268ded167b
commit
3847db27b5
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue