mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-02 13:08:41 +00:00
fix tests
This commit is contained in:
parent
37ff34ea7d
commit
13893feb5c
2 changed files with 3 additions and 9 deletions
|
|
@ -51,10 +51,9 @@ func runMinimalGeth(t *testing.T, args ...string) *testgeth {
|
||||||
// then terminated by closing the input stream.
|
// then terminated by closing the input stream.
|
||||||
func TestConsoleWelcome(t *testing.T) {
|
func TestConsoleWelcome(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
|
|
||||||
|
|
||||||
// Start a geth console, make sure it's cleaned up and terminate the console
|
// Start a geth console, make sure it's cleaned up and terminate the console
|
||||||
geth := runMinimalGeth(t, "--miner.etherbase", coinbase, "console")
|
geth := runMinimalGeth(t, "console")
|
||||||
|
|
||||||
// Gather all the infos the welcome message needs to contain
|
// Gather all the infos the welcome message needs to contain
|
||||||
geth.SetTemplateFunc("goos", func() string { return runtime.GOOS })
|
geth.SetTemplateFunc("goos", func() string { return runtime.GOOS })
|
||||||
|
|
@ -98,7 +97,7 @@ func TestAttachWelcome(t *testing.T) {
|
||||||
p := trulyRandInt(1024, 65533) // Yeah, sometimes this will fail, sorry :P
|
p := trulyRandInt(1024, 65533) // Yeah, sometimes this will fail, sorry :P
|
||||||
httpPort = strconv.Itoa(p)
|
httpPort = strconv.Itoa(p)
|
||||||
wsPort = strconv.Itoa(p + 1)
|
wsPort = strconv.Itoa(p + 1)
|
||||||
geth := runMinimalGeth(t, "--miner.etherbase", "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182",
|
geth := runMinimalGeth(t,
|
||||||
"--ipcpath", ipc,
|
"--ipcpath", ipc,
|
||||||
"--http", "--http.port", httpPort,
|
"--http", "--http.port", httpPort,
|
||||||
"--ws", "--ws.port", wsPort)
|
"--ws", "--ws.port", wsPort)
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,7 @@ type testgeth struct {
|
||||||
*cmdtest.TestCmd
|
*cmdtest.TestCmd
|
||||||
|
|
||||||
// template variables for expect
|
// template variables for expect
|
||||||
Datadir string
|
Datadir string
|
||||||
Etherbase string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
@ -75,10 +74,6 @@ func runGeth(t *testing.T, args ...string) *testgeth {
|
||||||
if i < len(args)-1 {
|
if i < len(args)-1 {
|
||||||
tt.Datadir = args[i+1]
|
tt.Datadir = args[i+1]
|
||||||
}
|
}
|
||||||
case "--miner.etherbase":
|
|
||||||
if i < len(args)-1 {
|
|
||||||
tt.Etherbase = args[i+1]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if tt.Datadir == "" {
|
if tt.Datadir == "" {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue