Add flag to delete domain immediately in nomulus too

We've already had the need to do this on a few occasions, so it's best to make
it easy rather than requiring hand-generated XML all the time.

Also normalizes the boolean --registrar_request parameter to not have arity=1.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198093829
This commit is contained in:
mcilwain 2018-05-25 13:26:56 -07:00 committed by jianglai
parent 373b4feeb1
commit 674a914afc
4 changed files with 51 additions and 13 deletions

View file

@ -30,30 +30,31 @@ public class DeleteDomainCommandTest extends EppToolCommandTestCase<DeleteDomain
@Test
public void testSuccess_multipleWordReason() throws Exception {
runCommand(
"--client=NewRegistrar", "--domain_name=example.tld", "--force", "--reason=\"Test test\"");
runCommandForced(
"--client=NewRegistrar", "--domain_name=example.tld", "--reason=\"Test test\"");
eppVerifier.verifySent("domain_delete_multiple_word_reason.xml");
}
@Test
public void testSuccess_immediately() throws Exception {
runCommandForced(
"--client=NewRegistrar", "--domain_name=example.tld", "--immediately", "--reason=Test");
eppVerifier.expectSuperuser().verifySent("domain_delete_immediately.xml");
}
@Test
public void testSuccess_requestedByRegistrarFalse() throws Exception {
runCommand(
"--client=NewRegistrar",
"--domain_name=example.tld",
"--force",
"--reason=Test",
"--registrar_request=false");
runCommandForced("--client=NewRegistrar", "--domain_name=example.tld", "--reason=Test");
eppVerifier.verifySent("domain_delete.xml");
}
@Test
public void testSuccess_requestedByRegistrarTrue() throws Exception {
runCommand(
runCommandForced(
"--client=NewRegistrar",
"--domain_name=example.tld",
"--force",
"--reason=Test",
"--registrar_request=true");
"--registrar_request");
eppVerifier.verifySent("domain_delete_by_registrar.xml");
}