[PAN-2803] Update generate-blockchain-config CLI help (#1587)

* [PAN-2803] Update generate-blockchain-config CLI help

- provide more accurate description of the command
- update help (  FILE ==> DIRECTORY )

* fix unit tests on help command

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
Abdelhamid Bakhta 6 years ago committed by GitHub
parent 013814e4d9
commit 31f243b74d
  1. 1
      pantheon/src/main/java/tech/pegasys/pantheon/cli/DefaultCommandValues.java
  2. 6
      pantheon/src/main/java/tech/pegasys/pantheon/cli/operator/OperatorSubCommand.java
  3. 4
      pantheon/src/test/java/tech/pegasys/pantheon/cli/operator/OperatorSubCommandTest.java

@ -31,6 +31,7 @@ public interface DefaultCommandValues {
String MANDATORY_PATH_FORMAT_HELP = "<PATH>";
String MANDATORY_FILE_FORMAT_HELP = "<FILE>";
String MANDATORY_DIRECTORY_FORMAT_HELP = "<DIRECTORY>";
String PANTHEON_HOME_PROPERTY_NAME = "pantheon.home";
String DEFAULT_DATA_DIR_PATH = "./build/data";
String MANDATORY_INTEGER_FORMAT_HELP = "<INTEGER>";

@ -14,6 +14,7 @@ package tech.pegasys.pantheon.cli.operator;
import static com.google.common.base.Preconditions.checkNotNull;
import static java.nio.charset.StandardCharsets.UTF_8;
import static tech.pegasys.pantheon.cli.DefaultCommandValues.MANDATORY_DIRECTORY_FORMAT_HELP;
import static tech.pegasys.pantheon.cli.DefaultCommandValues.MANDATORY_FILE_FORMAT_HELP;
import static tech.pegasys.pantheon.cli.DefaultCommandValues.MANDATORY_PATH_FORMAT_HELP;
import static tech.pegasys.pantheon.cli.operator.OperatorSubCommand.COMMAND_NAME;
@ -83,7 +84,8 @@ public class OperatorSubCommand implements Runnable {
@Command(
name = "generate-blockchain-config",
description = "This command generates blockchain network configuration files.",
description =
"This command generates node keypairs, genesis file (with RLP encoded IBFT 2.0 extra data).",
mixinStandardHelpOptions = true)
static class GenerateNetworkConfigSubCommand implements Runnable {
@Option(
@ -97,7 +99,7 @@ public class OperatorSubCommand implements Runnable {
@Option(
required = true,
names = "--to",
paramLabel = MANDATORY_FILE_FORMAT_HELP,
paramLabel = MANDATORY_DIRECTORY_FORMAT_HELP,
description = "Directory to write output files to.",
arity = "1..1")
private File outputDirectory = null;

@ -62,9 +62,9 @@ public class OperatorSubCommandTest extends CommandTestAbstract {
+ System.lineSeparator()
+ "Commands:"
+ System.lineSeparator()
+ " generate-blockchain-config This command generates blockchain network"
+ " generate-blockchain-config This command generates node keypairs, genesis"
+ System.lineSeparator()
+ " configuration files.";
+ " file (with RLP encoded IBFT 2.0 extra data).";
private Path tmpOutputDirectoryPath;

Loading…
Cancel
Save