mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 08:27:14 +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
|
@ -24,55 +24,57 @@ public class DomainCheckCommandTest extends EppToolCommandTestCase<DomainCheckCo
|
|||
|
||||
@Test
|
||||
public void testSuccess() throws Exception {
|
||||
runCommandForced("--client=NewRegistrar", "example.tld");
|
||||
eppVerifier.verifySent("domain_check.xml");
|
||||
runCommand("--client=NewRegistrar", "example.tld");
|
||||
eppVerifier.expectDryRun().verifySent("domain_check.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_multipleTlds() throws Exception {
|
||||
runCommandForced("--client=NewRegistrar", "example.tld", "example.tld2");
|
||||
runCommand("--client=NewRegistrar", "example.tld", "example.tld2");
|
||||
eppVerifier
|
||||
.expectDryRun()
|
||||
.verifySent("domain_check.xml")
|
||||
.verifySent("domain_check_second_tld.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_multipleDomains() throws Exception {
|
||||
runCommandForced(
|
||||
runCommand(
|
||||
"--client=NewRegistrar",
|
||||
"example.tld",
|
||||
"example2.tld",
|
||||
"example3.tld");
|
||||
eppVerifier.verifySent("domain_check_multiple.xml");
|
||||
eppVerifier.expectDryRun().verifySent("domain_check_multiple.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_multipleDomainsAndTlds() throws Exception {
|
||||
runCommandForced(
|
||||
runCommand(
|
||||
"--client=NewRegistrar",
|
||||
"example.tld",
|
||||
"example2.tld",
|
||||
"example3.tld",
|
||||
"example.tld2");
|
||||
eppVerifier
|
||||
.expectDryRun()
|
||||
.verifySent("domain_check_multiple.xml")
|
||||
.verifySent("domain_check_second_tld.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_missingClientId() throws Exception {
|
||||
assertThrows(ParameterException.class, () -> runCommandForced("example.tld"));
|
||||
assertThrows(ParameterException.class, () -> runCommand("example.tld"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_NoMainParameter() throws Exception {
|
||||
assertThrows(ParameterException.class, () -> runCommandForced("--client=NewRegistrar"));
|
||||
assertThrows(ParameterException.class, () -> runCommand("--client=NewRegistrar"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_unknownFlag() throws Exception {
|
||||
assertThrows(
|
||||
ParameterException.class,
|
||||
() -> runCommandForced("--client=NewRegistrar", "--unrecognized=foo", "example.tld"));
|
||||
() -> runCommand("--client=NewRegistrar", "--unrecognized=foo", "example.tld"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue