use of org.apache.cassandra.tools.ToolRunner.ToolResult in project cassandra by apache.
the class GetVersionTest method testGetVersion.
@Test
public void testGetVersion() {
ToolResult tool = ToolRunner.invokeClass(GetVersion.class);
tool.assertOnCleanExit();
assertNoUnexpectedThreadsStarted(null);
assertSchemaNotLoaded();
assertCLSMNotLoaded();
assertSystemKSNotLoaded();
assertKeyspaceNotLoaded();
assertServerNotLoaded();
}
use of org.apache.cassandra.tools.ToolRunner.ToolResult in project cassandra by apache.
the class JMXToolTest method cliHelpDump.
@Test
public void cliHelpDump() {
ToolResult result = jmxtool("help", "dump");
result.assertOnCleanExit();
Assertions.assertThat(result.getStdout()).isEqualTo("NAME\n" + " jmxtool dump - Dump the Apache Cassandra JMX objects and metadata.\n" + "\n" + "SYNOPSIS\n" + " jmxtool dump [(-f <format> | --format <format>)] [(-h | --help)]\n" + " [(-u <url> | --url <url>)]\n" + "\n" + "OPTIONS\n" + " -f <format>, --format <format>\n" + " What format to dump content as; supported values are console\n" + " (default), json, and yaml\n" + "\n" + " -h, --help\n" + " Display help information\n" + "\n" + " -u <url>, --url <url>\n" + " JMX url to target\n" + "\n" + "\n");
}
use of org.apache.cassandra.tools.ToolRunner.ToolResult in project cassandra by apache.
the class JMXToolTest method cliHelp.
@Test
public void cliHelp() {
ToolResult result = jmxtool();
result.assertOnCleanExit();
Assertions.assertThat(result.getStdout()).isEqualTo("usage: jmxtool <command> [<args>]\n" + "\n" + "The most commonly used jmxtool commands are:\n" + " diff Diff two jmx dump files and report their differences\n" + " dump Dump the Apache Cassandra JMX objects and metadata.\n" + " help Display help information\n" + "\n" + "See 'jmxtool help <command>' for more information on a specific command.\n" + "\n");
}
use of org.apache.cassandra.tools.ToolRunner.ToolResult in project cassandra by apache.
the class JMXToolTest method cliHelpDiff.
@Test
public void cliHelpDiff() {
ToolResult result = jmxtool("help", "diff");
result.assertOnCleanExit();
Assertions.assertThat(result.getStdout()).isEqualTo("NAME\n" + " jmxtool diff - Diff two jmx dump files and report their differences\n" + "\n" + "SYNOPSIS\n" + " jmxtool diff [--exclude-attribute <exclude attributes>...]\n" + " [--exclude-object <exclude objects>...]\n" + " [--exclude-operation <exclude operations>...]\n" + " [(-f <format> | --format <format>)] [(-h | --help)]\n" + " [--ignore-missing-on-left] [--ignore-missing-on-right] [--] <left>\n" + " <right>\n" + "\n" + "OPTIONS\n" + " --exclude-attribute <exclude attributes>\n" + " Ignores processing specific attributes. Each usage should take a\n" + " single attribute, but can use this flag multiple times.\n" + "\n" + " --exclude-object <exclude objects>\n" + " Ignores processing specific objects. Each usage should take a single\n" + " object, but can use this flag multiple times.\n" + "\n" + " --exclude-operation <exclude operations>\n" + " Ignores processing specific operations. Each usage should take a\n" + " single operation, but can use this flag multiple times.\n" + "\n" + " -f <format>, --format <format>\n" + " What format the files are in; only support json and yaml as format\n" + "\n" + " -h, --help\n" + " Display help information\n" + "\n" + " --ignore-missing-on-left\n" + " Ignore results missing on the left\n" + "\n" + " --ignore-missing-on-right\n" + " Ignore results missing on the right\n" + "\n" + " --\n" + " This option can be used to separate command-line options from the\n" + " list of argument, (useful when arguments might be mistaken for\n" + " command-line options\n" + "\n" + " <left> <right>\n" + " Files to diff\n" + "\n" + "\n");
}
use of org.apache.cassandra.tools.ToolRunner.ToolResult in project cassandra by apache.
the class SSTableExpiredBlockersTest method testMaybeChangeDocs.
@Test
public void testMaybeChangeDocs() {
// If you added, modified options or help, please update docs if necessary
ToolResult tool = ToolRunner.invokeClass(SSTableExpiredBlockers.class);
String help = "Usage: sstableexpiredblockers <keyspace> <table>\n";
Assertions.assertThat(tool.getStdout()).isEqualTo(help);
}
Aggregations