Don't prompt to confirm non-mutating nomulus EPP tool commands

This is accomplished by making all non-mutating commands function with dry run set
to true, which also has the pleasurable side effect of not prompting for dry-run
mutating commands either, which also do nothing different/special on the second
run.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192149150
This commit is contained in:
mcilwain 2018-04-09 10:40:20 -07:00 committed by Ben McIlwain
parent 013558c814
commit 3bbaf585e5
15 changed files with 248 additions and 48 deletions

View file

@ -25,17 +25,17 @@ public class DomainApplicationInfoCommandTest
@Test
public void testSuccess() throws Exception {
runCommandForced("--client=NewRegistrar", "--domain_name=example.tld",
runCommand("--client=NewRegistrar", "--domain_name=example.tld",
"--phase=landrush", "--id=123");
eppVerifier.verifySent("domain_info_landrush.xml");
eppVerifier.expectDryRun().verifySent("domain_info_landrush.xml");
}
@Test
public void testSuccess_subphase() throws Exception {
// Sunrush: phase=sunrise, subphase=landrush
runCommandForced("--client=NewRegistrar", "--domain_name=example.tld",
runCommand("--client=NewRegistrar", "--domain_name=example.tld",
"--phase=sunrush", "--id=123");
eppVerifier.verifySent("domain_info_sunrush.xml");
eppVerifier.expectDryRun().verifySent("domain_info_sunrush.xml");
}
@Test
@ -43,7 +43,7 @@ public class DomainApplicationInfoCommandTest
assertThrows(
IllegalArgumentException.class,
() ->
runCommandForced(
runCommand(
"--client=NewRegistrar",
"--domain_name=example.tld",
"--phase=landrise",
@ -54,14 +54,14 @@ public class DomainApplicationInfoCommandTest
public void testFailure_missingClientId() throws Exception {
assertThrows(
ParameterException.class,
() -> runCommandForced("--domain_name=example.tld", "--phase=sunrush", "--id=123"));
() -> runCommand("--domain_name=example.tld", "--phase=sunrush", "--id=123"));
}
@Test
public void testFailure_missingPhase() throws Exception {
assertThrows(
ParameterException.class,
() -> runCommandForced("--client=NewRegistrar", "--domain_name=example.tld", "--id=123"));
() -> runCommand("--client=NewRegistrar", "--domain_name=example.tld", "--id=123"));
}
@Test
@ -69,7 +69,7 @@ public class DomainApplicationInfoCommandTest
assertThrows(
ParameterException.class,
() ->
runCommandForced(
runCommand(
"--client=NewRegistrar", "--domain_name=example.tld", "--phase=landrush"));
}
@ -78,7 +78,7 @@ public class DomainApplicationInfoCommandTest
assertThrows(
ParameterException.class,
() ->
runCommandForced(
runCommand(
"--client=NewRegistrar",
"--domain_name=example.tld",
"--phase=landrush",
@ -91,7 +91,7 @@ public class DomainApplicationInfoCommandTest
assertThrows(
ParameterException.class,
() ->
runCommandForced(
runCommand(
"--client=NewRegistrar",
"--domain_name=example.tld",
"--phase=landrush",