Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd: add tests for init-network #1899

Merged
merged 2 commits into from
Sep 29, 2023
Merged

cmd: add tests for init-network #1899

merged 2 commits into from
Sep 29, 2023

Conversation

Mister-EA
Copy link
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