diff --git a/pantheon/src/main/java/tech/pegasys/pantheon/cli/subcommands/blocks/BlocksSubCommand.java b/pantheon/src/main/java/tech/pegasys/pantheon/cli/subcommands/blocks/BlocksSubCommand.java index 685214381f..0753abf698 100644 --- a/pantheon/src/main/java/tech/pegasys/pantheon/cli/subcommands/blocks/BlocksSubCommand.java +++ b/pantheon/src/main/java/tech/pegasys/pantheon/cli/subcommands/blocks/BlocksSubCommand.java @@ -218,7 +218,7 @@ public class BlocksSubCommand implements Runnable { */ @Command( name = "export", - description = "This command export a specific block from storage", + description = "This command exports a specific block, or list of blocks from storage.", mixinStandardHelpOptions = true) static class ExportSubCommand implements Runnable { @SuppressWarnings("unused") @@ -228,7 +228,7 @@ public class BlocksSubCommand implements Runnable { @Option( names = "--start-block", paramLabel = MANDATORY_LONG_FORMAT_HELP, - description = "the starting index of the block list to export (inclusive)", + description = "The starting index of the block, or block list to export.", arity = "1..1") private final Long startBlock = null; @@ -236,8 +236,7 @@ public class BlocksSubCommand implements Runnable { names = "--end-block", paramLabel = MANDATORY_LONG_FORMAT_HELP, description = - "the ending index of the block list to export (exclusive), " - + "if not specified a single block will be export", + "The ending index of the block list to export (exclusive). If not specified a single block will be exported.", arity = "1..1") private final Long endBlock = null; @@ -253,7 +252,7 @@ public class BlocksSubCommand implements Runnable { names = "--to", required = true, paramLabel = MANDATORY_FILE_FORMAT_HELP, - description = "File to write the block list instead of standard output", + description = "File to write the block list to.", arity = "1..1") private File blocksExportFile = null; diff --git a/pantheon/src/test/java/tech/pegasys/pantheon/cli/subcommands/blocks/BlocksSubCommandTest.java b/pantheon/src/test/java/tech/pegasys/pantheon/cli/subcommands/blocks/BlocksSubCommandTest.java index 6f745283e2..7aabcb0a32 100644 --- a/pantheon/src/test/java/tech/pegasys/pantheon/cli/subcommands/blocks/BlocksSubCommandTest.java +++ b/pantheon/src/test/java/tech/pegasys/pantheon/cli/subcommands/blocks/BlocksSubCommandTest.java @@ -76,19 +76,19 @@ public class BlocksSubCommandTest extends CommandTestAbstract { + System.lineSeparator() + " --to=" + System.lineSeparator() - + "This command export a specific block from storage" + + "This command exports a specific block, or list of blocks from storage." + System.lineSeparator() - + " --end-block= the ending index of the block list to export" + + " --end-block= The ending index of the block list to export" + System.lineSeparator() - + " (exclusive), if not specified a single block will be" + + " (exclusive). If not specified a single block will be" + System.lineSeparator() - + " export" + + " exported." + System.lineSeparator() - + " --start-block= the starting index of the block list to export" + + " --start-block= The starting index of the block, or block list to" + System.lineSeparator() - + " (inclusive)" + + " export." + System.lineSeparator() - + " --to= File to write the block list instead of standard output" + + " --to= File to write the block list to." + System.lineSeparator() + " -h, --help Show this help message and exit." + System.lineSeparator() @@ -223,7 +223,7 @@ public class BlocksSubCommandTest extends CommandTestAbstract { final String expectedErrorOutputStart = "Chain is empty. Unable to export blocks from specified data directory: " + folder.getRoot().getAbsolutePath() - + "/" + + File.separator + PantheonController.DATABASE_PATH; assertThat(commandOutput.toString()).isEmpty(); assertThat(commandErrorOutput.toString()).startsWith(expectedErrorOutputStart); @@ -244,7 +244,7 @@ public class BlocksSubCommandTest extends CommandTestAbstract { final String expectedErrorOutputStart = "Chain is empty. Unable to export blocks from specified data directory: " + folder.getRoot().getAbsolutePath() - + "/" + + File.separator + PantheonController.DATABASE_PATH; assertThat(commandOutput.toString()).isEmpty(); assertThat(commandErrorOutput.toString()).startsWith(expectedErrorOutputStart);