aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/accountcmd_test.go
diff options
context:
space:
mode:
authorBas van Kervel <basvankervel@gmail.com>2017-04-28 18:38:49 +0800
committerBas van Kervel <basvankervel@gmail.com>2017-04-28 20:01:54 +0800
commitf6c0f76cc56e98ac564dd523569b03468a387ef7 (patch)
treea516a68d267950b4237e8f70bafb08ebbbdff768 /cmd/geth/accountcmd_test.go
parentf9be9a2302dd73fe3cc792167d65f24c7b7d35c4 (diff)
downloaddexon-f6c0f76cc56e98ac564dd523569b03468a387ef7.tar
dexon-f6c0f76cc56e98ac564dd523569b03468a387ef7.tar.gz
dexon-f6c0f76cc56e98ac564dd523569b03468a387ef7.tar.bz2
dexon-f6c0f76cc56e98ac564dd523569b03468a387ef7.tar.lz
dexon-f6c0f76cc56e98ac564dd523569b03468a387ef7.tar.xz
dexon-f6c0f76cc56e98ac564dd523569b03468a387ef7.tar.zst
dexon-f6c0f76cc56e98ac564dd523569b03468a387ef7.zip
cmd/geth: reorganise account/wallet command/flags
Diffstat (limited to 'cmd/geth/accountcmd_test.go')
-rw-r--r--cmd/geth/accountcmd_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/cmd/geth/accountcmd_test.go b/cmd/geth/accountcmd_test.go
index adcb72454..5f9f67677 100644
--- a/cmd/geth/accountcmd_test.go
+++ b/cmd/geth/accountcmd_test.go
@@ -43,13 +43,13 @@ func tmpDatadirWithKeystore(t *testing.T) string {
}
func TestAccountListEmpty(t *testing.T) {
- geth := runGeth(t, "account")
+ geth := runGeth(t, "account", "list")
geth.expectExit()
}
func TestAccountList(t *testing.T) {
datadir := tmpDatadirWithKeystore(t)
- geth := runGeth(t, "--datadir", datadir, "account")
+ geth := runGeth(t, "account", "list", "--datadir", datadir)
defer geth.expectExit()
if runtime.GOOS == "windows" {
geth.expect(`
@@ -67,7 +67,7 @@ Account #2: {289d485d9771714cce91d3393d764e1311907acc} keystore://{{.Datadir}}/k
}
func TestAccountNew(t *testing.T) {
- geth := runGeth(t, "--lightkdf", "account", "new")
+ geth := runGeth(t, "account", "new", "--lightkdf")
defer geth.expectExit()
geth.expect(`
Your new account is locked with a password. Please give a password. Do not forget this password.
@@ -79,7 +79,7 @@ Repeat passphrase: {{.InputLine "foobar"}}
}
func TestAccountNewBadRepeat(t *testing.T) {
- geth := runGeth(t, "--lightkdf", "account", "new")
+ geth := runGeth(t, "account", "new", "--lightkdf")
defer geth.expectExit()
geth.expect(`
Your new account is locked with a password. Please give a password. Do not forget this password.
@@ -92,9 +92,9 @@ Fatal: Passphrases do not match
func TestAccountUpdate(t *testing.T) {
datadir := tmpDatadirWithKeystore(t)
- geth := runGeth(t,
+ geth := runGeth(t, "account", "update",
"--datadir", datadir, "--lightkdf",
- "account", "update", "f466859ead1932d743d622cb74fc058882e8648a")
+ "f466859ead1932d743d622cb74fc058882e8648a")
defer geth.expectExit()
geth.expect(`
Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3
@@ -107,7 +107,7 @@ Repeat passphrase: {{.InputLine "foobar2"}}
}
func TestWalletImport(t *testing.T) {
- geth := runGeth(t, "--lightkdf", "wallet", "import", "testdata/guswallet.json")
+ geth := runGeth(t, "wallet", "import", "--lightkdf", "testdata/guswallet.json")
defer geth.expectExit()
geth.expect(`
!! Unsupported terminal, password will be echoed.
@@ -122,7 +122,7 @@ Address: {d4584b5f6229b7be90727b0fc8c6b91bb427821f}
}
func TestWalletImportBadPassword(t *testing.T) {
- geth := runGeth(t, "--lightkdf", "wallet", "import", "testdata/guswallet.json")
+ geth := runGeth(t, "wallet", "import", "--lightkdf", "testdata/guswallet.json")
defer geth.expectExit()
geth.expect(`
!! Unsupported terminal, password will be echoed.