test: don't panic if there is no error

This commit is contained in:
Frank Schroeder 2017-05-31 08:59:41 +02:00
parent ec729693d7
commit 1b0d58bb22
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ func TestRPC_NoLeader_Fail(t *testing.T) {
// Make sure we eventually fail with a no leader error, which we should
// see given the short timeout.
err := msgpackrpc.CallWithCodec(codec, "Catalog.Register", &arg, &out)
if err.Error() != structs.ErrNoLeader.Error() {
if err == nil || err.Error() != structs.ErrNoLeader.Error() {
t.Fatalf("bad: %v", err)
}