mirror of
https://github.com/google/nomulus
synced 2026-07-30 20:12:48 +00:00
Automated g4 rollback of changelist 212879670.
*** Reason for rollback *** Automated tools sometimes don't have default credentials, and can't set them up. We should redo this CL once we figure out the credential thing. *** Original change description *** Add metrics for the command used in the registry CLI tool Puts the metric in <project>/tools/commands_called It counts the use of the tool, with the following labels: - environment - tool (nomulus/gtech) - command called (class name) - success true/false - from the shell true/false *** ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=214048616
This commit is contained in:
@@ -152,7 +152,6 @@ public class ShellCommandTest {
|
||||
public void testMultipleCommandInvocations() throws Exception {
|
||||
try (RegistryCli cli =
|
||||
new RegistryCli("unittest", ImmutableMap.of("test_command", TestCommand.class))) {
|
||||
cli.uploadMetrics = false;
|
||||
RegistryToolEnvironment.UNITTEST.setup();
|
||||
cli.setEnvironment(RegistryToolEnvironment.UNITTEST);
|
||||
cli.run(new String[] {"test_command", "-x", "xval", "arg1", "arg2"});
|
||||
@@ -170,7 +169,7 @@ public class ShellCommandTest {
|
||||
public void testNonExistentCommand() {
|
||||
try (RegistryCli cli =
|
||||
new RegistryCli("unittest", ImmutableMap.of("test_command", TestCommand.class))) {
|
||||
cli.uploadMetrics = false;
|
||||
|
||||
cli.setEnvironment(RegistryToolEnvironment.UNITTEST);
|
||||
assertThrows(MissingCommandException.class, () -> cli.run(new String[] {"bad_command"}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user