mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 00:47:11 +02:00
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:
parent
013558c814
commit
3bbaf585e5
15 changed files with 248 additions and 48 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue