|
|
|
@ -489,6 +489,7 @@ public class PantheonCommandTest extends CommandTestAbstract { |
|
|
|
|
assertThat(commandErrorOutput.toString()).isEmpty(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Ignore("NC-2015 - Temporarily enabling zero-arg --bootnodes to permit 'bootnode' configuration") |
|
|
|
|
@Test |
|
|
|
|
public void callingWithBootnodesOptionButNoValueMustDisplayErrorAndUsage() { |
|
|
|
|
parseCommand("--bootnodes"); |
|
|
|
@ -498,6 +499,21 @@ public class PantheonCommandTest extends CommandTestAbstract { |
|
|
|
|
assertThat(commandErrorOutput.toString()).startsWith(expectedErrorOutputStart); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void callingWithBootnodesOptionButNoValueMustPassEmptyBootnodeList() { |
|
|
|
|
parseCommand("--bootnodes"); |
|
|
|
|
|
|
|
|
|
verify(mockRunnerBuilder).bootstrapPeers(uriListArgumentCaptor.capture()); |
|
|
|
|
verify(mockRunnerBuilder).build(); |
|
|
|
|
|
|
|
|
|
assertThat(uriListArgumentCaptor.getValue()).isEmpty(); |
|
|
|
|
|
|
|
|
|
assertThat(commandOutput.toString()).isEmpty(); |
|
|
|
|
assertThat(commandErrorOutput.toString()).isEmpty(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Ignore( |
|
|
|
|
"NC-2015 - Temporarily enabling zero-arg --bootnodes to permit 'bootnode' configuration, which changes the error.") |
|
|
|
|
@Test |
|
|
|
|
public void callingWithInvalidBootnodesMustDisplayErrorAndUsage() { |
|
|
|
|
parseCommand("--bootnodes", "invalid_enode_url"); |
|
|
|
@ -507,6 +523,14 @@ public class PantheonCommandTest extends CommandTestAbstract { |
|
|
|
|
assertThat(commandErrorOutput.toString()).startsWith(expectedErrorOutputStart); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void callingWithInvalidBootnodesAndZeroArityMustDisplayAlternateErrorAndUsage() { |
|
|
|
|
parseCommand("--bootnodes", "invalid_enode_url"); |
|
|
|
|
assertThat(commandOutput.toString()).isEmpty(); |
|
|
|
|
final String expectedErrorOutputStart = "Unmatched argument: invalid_enode_url"; |
|
|
|
|
assertThat(commandErrorOutput.toString()).startsWith(expectedErrorOutputStart); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void callingWithBannedNodeidsOptionButNoValueMustDisplayErrorAndUsage() { |
|
|
|
|
parseCommand("--banned-nodeids"); |
|
|
|
|