lease/leasehttp: remove "strings.Compare != 0"

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
release-3.4
Gyuho Lee 2018-04-30 15:11:26 -07:00
parent 86cee93d6b
commit 48f28b9d27
1 changed files with 1 additions and 2 deletions

View File

@ -19,7 +19,6 @@ import (
"net/http"
"net/http/httptest"
"os"
"strings"
"testing"
"time"
@ -110,7 +109,7 @@ func testApplyTimeout(t *testing.T, f func(*lease.Lease, string) error) {
if err == nil {
t.Fatalf("expected timeout error, got nil")
}
if strings.Compare(err.Error(), ErrLeaseHTTPTimeout.Error()) != 0 {
if err.Error() != ErrLeaseHTTPTimeout.Error() {
t.Fatalf("expected (%v), got (%v)", ErrLeaseHTTPTimeout.Error(), err.Error())
}
}