mirror of
https://github.com/google/nomulus.git
synced 2025-07-25 12:08:36 +02:00
Improve the error when trying to delete the registrant contact
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=196708902
This commit is contained in:
parent
25d03f239c
commit
e4f25c08e8
5 changed files with 55 additions and 1 deletions
|
@ -63,6 +63,7 @@ import google.registry.flows.domain.DomainFlowUtils.LinkedResourcesDoNotExistExc
|
|||
import google.registry.flows.domain.DomainFlowUtils.MaxSigLifeChangeNotSupportedException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.MissingAdminContactException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.MissingContactTypeException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.MissingRegistrantException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.MissingTechnicalContactException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.NameserversNotAllowedForDomainException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.NameserversNotAllowedForTldException;
|
||||
|
@ -185,6 +186,16 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
|
|||
doSuccessfulTest();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_emptyRegistrant() throws Exception {
|
||||
setEppInput("domain_update_empty_registrant.xml");
|
||||
persistReferencedEntities();
|
||||
persistDomain();
|
||||
MissingRegistrantException thrown =
|
||||
assertThrows(MissingRegistrantException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
private void doSunrushAddTest(
|
||||
BillingEvent.OneTime sunrushAddBillingEvent,
|
||||
UserPrivileges userPrivileges,
|
||||
|
|
32
javatests/google/registry/flows/domain/testdata/domain_update_empty_registrant.xml
vendored
Normal file
32
javatests/google/registry/flows/domain/testdata/domain_update_empty_registrant.xml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<update>
|
||||
<domain:update
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.tld</domain:name>
|
||||
<domain:add>
|
||||
<domain:ns>
|
||||
<domain:hostObj>ns2.example.foo</domain:hostObj>
|
||||
</domain:ns>
|
||||
<domain:contact type="tech">mak21</domain:contact>
|
||||
<domain:status s="clientHold"
|
||||
lang="en">Payment overdue.</domain:status>
|
||||
</domain:add>
|
||||
<domain:rem>
|
||||
<domain:ns>
|
||||
<domain:hostObj>ns1.example.foo</domain:hostObj>
|
||||
</domain:ns>
|
||||
<domain:contact type="tech">sh8013</domain:contact>
|
||||
<domain:status s="clientUpdateProhibited"/>
|
||||
</domain:rem>
|
||||
<domain:chg>
|
||||
<domain:registrant/>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2BARfoo</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:chg>
|
||||
</domain:update>
|
||||
</update>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
Loading…
Add table
Add a link
Reference in a new issue