Add domain check and update registration type extensions

This completes the command extensions for the regType 0.2 extension.
Up next will be the response extensions.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123322887
This commit is contained in:
mcilwain 2016-05-26 08:48:02 -07:00 committed by Ben McIlwain
parent 510da196d7
commit 041b2c4116
11 changed files with 158 additions and 6 deletions

View file

@ -408,4 +408,14 @@ public class DomainCheckFlowTest
setEppInput("domain_check_fee_invalid_command.xml");
runFlow();
}
@Test
public void testSuccess_regTypeExtensionValidates() throws Exception {
setEppInput("domain_check_regtype.xml");
persistActiveDomain("example1.tld");
doCheckTest(
create(false, "example1.tld", "In use"),
create(true, "example2.tld", null),
create(true, "example3.tld", null));
}
}

View file

@ -1108,4 +1108,12 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
.build());
doSuccessfulTest();
}
@Test
public void testSuccess_regTypeExtensionValidates() throws Exception {
setEppInput("domain_update_regtype.xml");
persistReferencedEntities();
persistDomain();
doSuccessfulTest();
}
}

View file

@ -0,0 +1,18 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<check>
<domain:check xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name>example1.tld</domain:name>
<domain:name>example2.tld</domain:name>
<domain:name>example3.tld</domain:name>
</domain:check>
</check>
<extension>
<regtype:check
xmlns:regtype="urn:ietf:params:xml:ns:regtype-0.2">
<regtype:type>foo,bar,baz</regtype:type>
</regtype:check>
</extension>
<clTRID>ABC-12345</clTRID>
</command>
</epp>

View file

@ -0,0 +1,40 @@
<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>sh8013</domain:registrant>
<domain:authInfo>
<domain:pw>2BARfoo</domain:pw>
</domain:authInfo>
</domain:chg>
</domain:update>
</update>
<extension>
<regType:update
xmlns:regType="urn:ietf:params:xml:ns:regtype-0.2">
<regType:chg>
<regType:type>bar,foo</regType:type>
</regType:chg>
</regType:update>
</extension>
<clTRID>ABC-12345</clTRID>
</command>
</epp>