open-consul/command/operator_raft_test.go
Frank Schroeder 846fe5d630
test: use cli.NewMockUi instead of new(cli.MockUi)
Use the constructor function to prevent a nil panic
if there was no write to the output buffers.
2017-05-31 00:29:26 +02:00

24 lines
439 B
Go

package command
import (
"testing"
"github.com/hashicorp/consul/command/base"
"github.com/mitchellh/cli"
)
func testOperatorRaftCommand(t *testing.T) (*cli.MockUi, *OperatorRaftCommand) {
ui := cli.NewMockUi()
return ui, &OperatorRaftCommand{
Command: base.Command{
UI: ui,
Flags: base.FlagSetHTTP,
},
}
}
func TestOperator_Raft_Implements(t *testing.T) {
t.Parallel()
var _ cli.Command = &OperatorRaftCommand{}
}