Skip to content

Commit

Permalink
Merge pull request #162 from etclabscore/fix/consolecmd-test-networking
Browse files Browse the repository at this point in the history
main: disable networking for console cmd tests
  • Loading branch information
meowsbits authored Jul 30, 2020
2 parents 361ef38 + ab6620e commit 4bbe6b4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/geth/consolecmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ func TestConsoleCmdNetworkIdentities(t *testing.T) {
{[]string{"--yolov1"}, 133519467574833, 133519467574833, params.YoloV1GenesisHash.Hex()},
}
for i, p := range chainIdentityCases {

// Disable networking, preventing false-negatives if in an environment without networking service
// or collisions with an existing geth service.
p.flags = append(p.flags, "--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none")

t.Run(fmt.Sprintf("%d/%v/networkid", i, p.flags),
consoleCmdStdoutTest(p.flags, "admin.nodeInfo.protocols.eth.network", p.networkId))
t.Run(fmt.Sprintf("%d/%v/chainid", i, p.flags),
Expand Down

0 comments on commit 4bbe6b4

Please sign in to comment.