fix tests

This commit is contained in:
Guillaume Ballet 2026-05-21 15:38:45 +02:00
parent 37ff34ea7d
commit 13893feb5c
2 changed files with 3 additions and 9 deletions

View file

@ -51,10 +51,9 @@ func runMinimalGeth(t *testing.T, args ...string) *testgeth {
// then terminated by closing the input stream.
func TestConsoleWelcome(t *testing.T) {
t.Parallel()
coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
// 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
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
httpPort = strconv.Itoa(p)
wsPort = strconv.Itoa(p + 1)
geth := runMinimalGeth(t, "--miner.etherbase", "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182",
geth := runMinimalGeth(t,
"--ipcpath", ipc,
"--http", "--http.port", httpPort,
"--ws", "--ws.port", wsPort)

View file

@ -32,8 +32,7 @@ type testgeth struct {
*cmdtest.TestCmd
// template variables for expect
Datadir string
Etherbase string
Datadir string
}
func init() {
@ -75,10 +74,6 @@ func runGeth(t *testing.T, args ...string) *testgeth {
if i < len(args)-1 {
tt.Datadir = args[i+1]
}
case "--miner.etherbase":
if i < len(args)-1 {
tt.Etherbase = args[i+1]
}
}
}
if tt.Datadir == "" {