mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-15 14:21:22 +00:00
linter: last fixes & add to circle
This commit is contained in:
2
Makefile
2
Makefile
@ -7,7 +7,7 @@ GOTOOLS = \
|
|||||||
|
|
||||||
REPO:=github.com/tendermint/go-crypto
|
REPO:=github.com/tendermint/go-crypto
|
||||||
|
|
||||||
all: get_vendor_deps test
|
all: get_vendor_deps metalinter_test test
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test `glide novendor`
|
go test `glide novendor`
|
||||||
|
@ -144,6 +144,7 @@ func TestKeyManagement(t *testing.T) {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
// nolint: unparam
|
||||||
func assertPassword(assert *assert.Assertions, cstore cryptostore.Manager, name, pass, badpass string) {
|
func assertPassword(assert *assert.Assertions, cstore cryptostore.Manager, name, pass, badpass string) {
|
||||||
err := cstore.Update(name, badpass, pass)
|
err := cstore.Update(name, badpass, pass)
|
||||||
assert.NotNil(err)
|
assert.NotNil(err)
|
||||||
|
@ -52,6 +52,7 @@ func (k Keys) GetKey(w http.ResponseWriter, r *http.Request) {
|
|||||||
writeSuccess(w, &key)
|
writeSuccess(w, &key)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// nolint: unparam
|
||||||
func (k Keys) ListKeys(w http.ResponseWriter, r *http.Request) {
|
func (k Keys) ListKeys(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
keys, err := k.manager.List()
|
keys, err := k.manager.List()
|
||||||
|
@ -120,6 +120,7 @@ func listKeys(h http.Handler) (keys.Infos, int, error) {
|
|||||||
return data, rr.Code, err
|
return data, rr.Code, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// nolint: unparam
|
||||||
func getKey(h http.Handler, name string) (*keys.Info, int, error) {
|
func getKey(h http.Handler, name string) (*keys.Info, int, error) {
|
||||||
rr := httptest.NewRecorder()
|
rr := httptest.NewRecorder()
|
||||||
req, err := http.NewRequest("GET", "/keys/"+name, nil)
|
req, err := http.NewRequest("GET", "/keys/"+name, nil)
|
||||||
@ -137,6 +138,7 @@ func getKey(h http.Handler, name string) (*keys.Info, int, error) {
|
|||||||
return &data, rr.Code, err
|
return &data, rr.Code, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// nolint: unparam
|
||||||
func createKey(h http.Handler, name, passphrase, algo string) (*types.CreateKeyResponse, int, error) {
|
func createKey(h http.Handler, name, passphrase, algo string) (*types.CreateKeyResponse, int, error) {
|
||||||
rr := httptest.NewRecorder()
|
rr := httptest.NewRecorder()
|
||||||
post := types.CreateKeyRequest{
|
post := types.CreateKeyRequest{
|
||||||
@ -165,6 +167,7 @@ func createKey(h http.Handler, name, passphrase, algo string) (*types.CreateKeyR
|
|||||||
return data, rr.Code, err
|
return data, rr.Code, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// nolint: unparam
|
||||||
func deleteKey(h http.Handler, name, passphrase string) (*types.ErrorResponse, int, error) {
|
func deleteKey(h http.Handler, name, passphrase string) (*types.ErrorResponse, int, error) {
|
||||||
rr := httptest.NewRecorder()
|
rr := httptest.NewRecorder()
|
||||||
post := types.DeleteKeyRequest{
|
post := types.DeleteKeyRequest{
|
||||||
|
Reference in New Issue
Block a user