From e31709db6570e302557a9bccd681034ea0dcc246 Mon Sep 17 00:00:00 2001 From: Haotian <51777534+tmelhao@users.noreply.github.com> Date: Fri, 8 Mar 2024 19:15:52 +0800 Subject: [PATCH] console: fix the wrong error msg of datadir testcase (#29183) --- console/console_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/console/console_test.go b/console/console_test.go index 4c30c1b49c..d210a993c2 100644 --- a/console/console_test.go +++ b/console/console_test.go @@ -152,8 +152,7 @@ func (env *tester) Close(t *testing.T) { } // Tests that the node lists the correct welcome message, notably that it contains -// the instance name, coinbase account, block number, data directory and supported -// console modules. +// the instance name, block number, data directory and supported console modules. func TestWelcome(t *testing.T) { tester := newTester(t, nil) defer tester.Close(t) @@ -171,7 +170,10 @@ func TestWelcome(t *testing.T) { t.Fatalf("console output missing sync status: have\n%s\nwant also %s", output, want) } if want := fmt.Sprintf("datadir: %s", tester.workspace); !strings.Contains(output, want) { - t.Fatalf("console output missing coinbase: have\n%s\nwant also %s", output, want) + t.Fatalf("console output missing datadir: have\n%s\nwant also %s", output, want) + } + if want := "modules: "; !strings.Contains(output, want) { + t.Fatalf("console output missing modules: have\n%s\nwant also %s", output, want) } }