Skip to content

Commit

Permalink
etcd-runner: update election command to use new Leader() interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Romano committed Apr 4, 2017
1 parent 8c60a06 commit c2553d6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func runElectionFunc(cmd *cobra.Command, args []string) {
}
}
rcs[i].validate = func() error {
if l, err := e.Leader(context.TODO()); err == nil && l != observedLeader {
if l, err := e.Leader(context.TODO()); err == nil && string(l.Kvs[0].Value) != observedLeader {
return fmt.Errorf("expected leader %q, got %q", observedLeader, l)
}
validatec <- struct{}{}
Expand Down

0 comments on commit c2553d6

Please sign in to comment.