Skip to content

Commit

Permalink
broker: test is controller
Browse files Browse the repository at this point in the history
  • Loading branch information
travisjeffery committed Oct 19, 2017
1 parent da7782b commit 67d809b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion broker/broker_test.go
Expand Up @@ -7,6 +7,7 @@ import (

"github.com/travisjeffery/jocko"
"github.com/travisjeffery/jocko/protocol"
"github.com/travisjeffery/jocko/testutil/mocks"
"github.com/travisjeffery/simplelog"
)

Expand Down Expand Up @@ -553,7 +554,17 @@ func TestBroker_isController(t *testing.T) {
fields fields
want bool
}{
// TODO: Add test cases.
{
name: "is leader",
fields: fields{
raft: &mocks.Raft{
IsLeaderFn: func() bool {
return true
},
},
},
want: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 67d809b

Please sign in to comment.