Skip to content

Commit

Permalink
broker: test cluster members
Browse files Browse the repository at this point in the history
  • Loading branch information
travisjeffery committed Oct 19, 2017
1 parent b3ee3c6 commit 916dbfb
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion broker/broker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,12 +508,23 @@ func TestBroker_clusterMembers(t *testing.T) {
shutdownCh chan struct{}
shutdown bool
}
members := []*jocko.ClusterMember{{ID: 1}}
tests := []struct {
name string
fields fields
want []*jocko.ClusterMember
}{
// TODO: Add test cases.
{
name: "found members ok",
fields: fields{
serf: &mock.Serf{
ClusterFn: func() []*jocko.ClusterMember {
return members
},
},
},
want: members,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 916dbfb

Please sign in to comment.