Skip to content

cmd: add tests for init-network#1899

Merged
brilliant-lx merged 2 commits intomasterfrom
initNetworkTests
Sep 29, 2023
Merged

cmd: add tests for init-network#1899
brilliant-lx merged 2 commits intomasterfrom
initNetworkTests

Conversation

@Mister-EA
Copy link
Copy Markdown
Contributor

@Mister-EA Mister-EA commented Sep 26, 2023

Description

This PR adds unit tests for the init-network command.

Additionally the command is modified a bit so that the datadir of a new node is configured before the node is created. This ensures that the empty bsc.log files get created in the node's folder instead of the current directory (which requires a manual cleanup step by the user later).

Rationale

Only two tests are added not to burden the test suite. The two tests cover the two major scenarios: 1. when the nodes in the cluster are all in the same machine, and 2. when the nodes will run in different IPs.

Example

Changes

Notable changes:

  • cmd/geth/chaincmd.go
  • cmd/geth/initnetwork_test.go

@brilliant-lx brilliant-lx merged commit 6932673 into master Sep 29, 2023
@zzzckck zzzckck deleted the initNetworkTests branch August 22, 2024 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants