|
@@ -30,7 +30,7 @@ import (
|
|
|
|
|
|
|
|
type fakeDoer struct{}
|
|
type fakeDoer struct{}
|
|
|
|
|
|
|
|
-func (_ fakeDoer) Do(context.Context, etcdserverpb.Request) (etcdserver.Response, error) {
|
|
|
|
|
|
|
+func (fakeDoer) Do(context.Context, etcdserverpb.Request) (etcdserver.Response, error) {
|
|
|
return etcdserver.Response{}, nil
|
|
return etcdserver.Response{}, nil
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -372,11 +372,11 @@ func TestEnsure(t *testing.T) {
|
|
|
type fastPasswordStore struct {
|
|
type fastPasswordStore struct {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-func (_ fastPasswordStore) CheckPassword(user User, password string) bool {
|
|
|
|
|
|
|
+func (fastPasswordStore) CheckPassword(user User, password string) bool {
|
|
|
return user.Password == password
|
|
return user.Password == password
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-func (_ fastPasswordStore) HashPassword(password string) (string, error) { return password, nil }
|
|
|
|
|
|
|
+func (fastPasswordStore) HashPassword(password string) (string, error) { return password, nil }
|
|
|
|
|
|
|
|
func TestCreateAndUpdateUser(t *testing.T) {
|
|
func TestCreateAndUpdateUser(t *testing.T) {
|
|
|
olduser := `{"user": "cat", "roles" : ["animal"]}`
|
|
olduser := `{"user": "cat", "roles" : ["animal"]}`
|