diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-02-08 21:53:02 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-02-13 20:00:08 +0800 |
commit | c5215fdd48231622dd56aba63a5187c6e42828d4 (patch) | |
tree | 98bdb47dccb9ef3deaa571585c32db9d19166a80 /accounts/keystore/keystore_plain_test.go | |
parent | fad5eb0a87abfc12812647344a26de8a43830182 (diff) | |
download | dexon-c5215fdd48231622dd56aba63a5187c6e42828d4.tar dexon-c5215fdd48231622dd56aba63a5187c6e42828d4.tar.gz dexon-c5215fdd48231622dd56aba63a5187c6e42828d4.tar.bz2 dexon-c5215fdd48231622dd56aba63a5187c6e42828d4.tar.lz dexon-c5215fdd48231622dd56aba63a5187c6e42828d4.tar.xz dexon-c5215fdd48231622dd56aba63a5187c6e42828d4.tar.zst dexon-c5215fdd48231622dd56aba63a5187c6e42828d4.zip |
accounts, cmd, internal, mobile, node: canonical account URLs
Diffstat (limited to 'accounts/keystore/keystore_plain_test.go')
-rw-r--r-- | accounts/keystore/keystore_plain_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/accounts/keystore/keystore_plain_test.go b/accounts/keystore/keystore_plain_test.go index dcb2ab901..8c0eb52ea 100644 --- a/accounts/keystore/keystore_plain_test.go +++ b/accounts/keystore/keystore_plain_test.go @@ -52,7 +52,7 @@ func TestKeyStorePlain(t *testing.T) { if err != nil { t.Fatal(err) } - k2, err := ks.GetKey(k1.Address, account.URL, pass) + k2, err := ks.GetKey(k1.Address, account.URL.Path, pass) if err != nil { t.Fatal(err) } @@ -73,7 +73,7 @@ func TestKeyStorePassphrase(t *testing.T) { if err != nil { t.Fatal(err) } - k2, err := ks.GetKey(k1.Address, account.URL, pass) + k2, err := ks.GetKey(k1.Address, account.URL.Path, pass) if err != nil { t.Fatal(err) } @@ -94,7 +94,7 @@ func TestKeyStorePassphraseDecryptionFail(t *testing.T) { if err != nil { t.Fatal(err) } - if _, err = ks.GetKey(k1.Address, account.URL, "bar"); err != ErrDecrypt { + if _, err = ks.GetKey(k1.Address, account.URL.Path, "bar"); err != ErrDecrypt { t.Fatalf("wrong error for invalid passphrase\ngot %q\nwant %q", err, ErrDecrypt) } } @@ -115,7 +115,7 @@ func TestImportPreSaleKey(t *testing.T) { if account.Address != common.HexToAddress("d4584b5f6229b7be90727b0fc8c6b91bb427821f") { t.Errorf("imported account has wrong address %x", account.Address) } - if !strings.HasPrefix(account.URL, dir) { + if !strings.HasPrefix(account.URL.Path, dir) { t.Errorf("imported account file not in keystore directory: %q", account.URL) } } |