aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/run_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-05-06 17:40:23 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-05-30 22:25:23 +0800
commitffaf58f0a98bd987bbe76e8669bb22c405dcd62a (patch)
tree4cd484504d4a7089cfd85d22a2a9fa62c79abb7d /cmd/geth/run_test.go
parentab664c7e17009729d1083d8d4f7c37eb387012d3 (diff)
downloadgo-tangerine-ffaf58f0a98bd987bbe76e8669bb22c405dcd62a.tar
go-tangerine-ffaf58f0a98bd987bbe76e8669bb22c405dcd62a.tar.gz
go-tangerine-ffaf58f0a98bd987bbe76e8669bb22c405dcd62a.tar.bz2
go-tangerine-ffaf58f0a98bd987bbe76e8669bb22c405dcd62a.tar.lz
go-tangerine-ffaf58f0a98bd987bbe76e8669bb22c405dcd62a.tar.xz
go-tangerine-ffaf58f0a98bd987bbe76e8669bb22c405dcd62a.tar.zst
go-tangerine-ffaf58f0a98bd987bbe76e8669bb22c405dcd62a.zip
cmd, console: split off the console into a reusable package
Diffstat (limited to 'cmd/geth/run_test.go')
-rw-r--r--cmd/geth/run_test.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/geth/run_test.go b/cmd/geth/run_test.go
index ba4ce0c60..f6bc3f869 100644
--- a/cmd/geth/run_test.go
+++ b/cmd/geth/run_test.go
@@ -45,6 +45,7 @@ type testgeth struct {
// template variables for expect
Datadir string
Executable string
+ Etherbase string
Func template.FuncMap
removeDatadir bool
@@ -67,11 +68,15 @@ func init() {
func runGeth(t *testing.T, args ...string) *testgeth {
tt := &testgeth{T: t, Executable: os.Args[0]}
for i, arg := range args {
- if arg == "-datadir" || arg == "--datadir" {
+ switch {
+ case arg == "-datadir" || arg == "--datadir":
if i < len(args)-1 {
tt.Datadir = args[i+1]
}
- break
+ case arg == "-etherbase" || arg == "--etherbase":
+ if i < len(args)-1 {
+ tt.Etherbase = args[i+1]
+ }
}
}
if tt.Datadir == "" {