Skip to content

Commit

Permalink
Merge pull request #1959 from CortexFoundation/dev
Browse files Browse the repository at this point in the history
console: fix the wrong error msg of datadir testcase
  • Loading branch information
ucwong authored Mar 31, 2024
2 parents b45feba + 3793419 commit 8969061
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions console/console_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,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)
Expand All @@ -166,7 +165,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)
}
}

Expand Down

0 comments on commit 8969061

Please sign in to comment.