Browse Source

Fix broken key manager tests

pull/1782/head
Ethan Frey 8 years ago
parent
commit
7108dedc21
4 changed files with 10 additions and 10 deletions
  1. +3
    -3
      keys/cryptostore/holder_test.go
  2. +2
    -2
      keys/tx/multi_test.go
  3. +2
    -2
      keys/tx/one_test.go
  4. +3
    -3
      keys/tx/reader_test.go

+ 3
- 3
keys/cryptostore/holder_test.go View File

@ -32,10 +32,10 @@ func TestKeyManagement(t *testing.T) {
// create some keys
_, err = cstore.Get(n1)
assert.NotNil(err)
i, err := cstore.Create(n1, p1, algo)
i, _, err := cstore.Create(n1, p1, algo)
require.Equal(n1, i.Name)
require.Nil(err)
_, err = cstore.Create(n2, p2, algo)
_, _, err = cstore.Create(n2, p2, algo)
require.Nil(err)
// we can get these keys
@ -161,7 +161,7 @@ func TestAdvancedKeyManagement(t *testing.T) {
p1, p2, p3, pt := "1234", "foobar", "ding booms!", "really-secure!@#$"
// make sure key works with initial password
_, err := cstore.Create(n1, p1, algo)
_, _, err := cstore.Create(n1, p1, algo)
require.Nil(err, "%+v", err)
assertPassword(assert, cstore, n1, p1, p2)


+ 2
- 2
keys/tx/multi_test.go View File

@ -22,9 +22,9 @@ func TestMultiSig(t *testing.T) {
n, p := "foo", "bar"
n2, p2 := "other", "thing"
acct, err := cstore.Create(n, p, algo)
acct, _, err := cstore.Create(n, p, algo)
require.Nil(err, "%+v", err)
acct2, err := cstore.Create(n2, p2, algo)
acct2, _, err := cstore.Create(n2, p2, algo)
require.Nil(err, "%+v", err)
type signer struct {


+ 2
- 2
keys/tx/one_test.go View File

@ -22,9 +22,9 @@ func TestOneSig(t *testing.T) {
n, p := "foo", "bar"
n2, p2 := "other", "thing"
acct, err := cstore.Create(n, p, algo)
acct, _, err := cstore.Create(n, p, algo)
require.Nil(err, "%+v", err)
acct2, err := cstore.Create(n2, p2, algo)
acct2, _, err := cstore.Create(n2, p2, algo)
require.Nil(err, "%+v", err)
cases := []struct {


+ 3
- 3
keys/tx/reader_test.go View File

@ -6,9 +6,9 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
crypto "github.com/tendermint/go-crypto"
data "github.com/tendermint/go-wire/data"
"github.com/tendermint/go-crypto/keys/cryptostore"
"github.com/tendermint/go-crypto/keys/storage/memstorage"
data "github.com/tendermint/go-wire/data"
)
func TestReader(t *testing.T) {
@ -23,9 +23,9 @@ func TestReader(t *testing.T) {
u := sigs{"alice", "1234"}
u2 := sigs{"bob", "foobar"}
_, err := cstore.Create(u.name, u.pass, algo)
_, _, err := cstore.Create(u.name, u.pass, algo)
require.Nil(err, "%+v", err)
_, err = cstore.Create(u2.name, u2.pass, algo)
_, _, err = cstore.Create(u2.name, u2.pass, algo)
require.Nil(err, "%+v", err)
cases := []struct {


Loading…
Cancel
Save