Consolidate some domain creation / deletion EPPs in testdata

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183847223
This commit is contained in:
guyben 2018-01-30 09:58:48 -08:00 committed by Ben McIlwain
parent 169fd62da7
commit 4b23523d74
32 changed files with 266 additions and 316 deletions

View file

@ -24,6 +24,7 @@ import static java.nio.charset.StandardCharsets.UTF_8;
import static org.joda.time.DateTimeZone.UTC; import static org.joda.time.DateTimeZone.UTC;
import static org.joda.time.Duration.standardDays; import static org.joda.time.Duration.standardDays;
import com.google.common.collect.ImmutableMap;
import com.googlecode.objectify.Key; import com.googlecode.objectify.Key;
import google.registry.flows.EppTestComponent.FakesAndMocksModule; import google.registry.flows.EppTestComponent.FakesAndMocksModule;
import google.registry.model.domain.DomainResource; import google.registry.model.domain.DomainResource;
@ -125,7 +126,7 @@ public class EppCommitLogsTest extends ShardableTestCase {
clock.advanceBy(standardDays(2)); clock.advanceBy(standardDays(2));
DateTime timeAtDelete = clock.nowUtc(); // before 'add' grace period ends DateTime timeAtDelete = clock.nowUtc(); // before 'add' grace period ends
eppLoader = new EppLoader(this, "domain_delete.xml"); eppLoader = new EppLoader(this, "domain_delete.xml", ImmutableMap.of("NAME", "example.tld"));
runFlow(); runFlow();
ofy().clearSessionCache(); ofy().clearSessionCache();

View file

@ -43,7 +43,7 @@ public class EppLifecycleContactTest extends EppTestCase {
assertCommandAndResponse("login_valid.xml", "login_response.xml"); assertCommandAndResponse("login_valid.xml", "login_response.xml");
assertCommandAndResponse( assertCommandAndResponse(
"contact_create_sh8013.xml", "contact_create_sh8013.xml",
null, ImmutableMap.of(),
"contact_create_response_sh8013.xml", "contact_create_response_sh8013.xml",
ImmutableMap.of("CRDATE", "2000-06-01T00:00:00Z"), ImmutableMap.of("CRDATE", "2000-06-01T00:00:00Z"),
DateTime.parse("2000-06-01T00:00:00Z")); DateTime.parse("2000-06-01T00:00:00Z"));
@ -116,7 +116,7 @@ public class EppLifecycleContactTest extends EppTestCase {
"poll_ack.xml", "poll_ack.xml",
ImmutableMap.of("ID", "2-1-ROID-3-6-2000"), ImmutableMap.of("ID", "2-1-ROID-3-6-2000"),
"poll_ack_response_empty.xml", "poll_ack_response_empty.xml",
null, ImmutableMap.of(),
DateTime.parse("2000-06-08T22:02:00Z")); DateTime.parse("2000-06-08T22:02:00Z"));
assertThat(getRecordedEppMetric()) assertThat(getRecordedEppMetric())
.hasClientId("NewRegistrar") .hasClientId("NewRegistrar")

View file

@ -87,7 +87,11 @@ public class EppLifecycleDomainApplicationTest extends EppTestCase {
DateTime.parse("2014-01-01T00:00:00Z")); DateTime.parse("2014-01-01T00:00:00Z"));
assertCommandAndResponse( assertCommandAndResponse(
"domain_info_testvalidate.xml", "domain_info_testvalidate.xml",
"domain_info_response_testvalidate_doesnt_exist.xml", ImmutableMap.of(),
"response_error.xml",
ImmutableMap.of(
"MSG", "The domain with given ID (test-validate.example) doesn't exist.",
"CODE", "2303"),
DateTime.parse("2014-01-01T00:01:00Z")); DateTime.parse("2014-01-01T00:01:00Z"));
assertCommandAndResponse("logout.xml", "logout_response.xml"); assertCommandAndResponse("logout.xml", "logout_response.xml");
} }
@ -102,11 +106,17 @@ public class EppLifecycleDomainApplicationTest extends EppTestCase {
DateTime.parse("2014-01-01T00:00:00Z")); DateTime.parse("2014-01-01T00:00:00Z"));
assertCommandAndResponse( assertCommandAndResponse(
"domain_info_testvalidate.xml", "domain_info_testvalidate.xml",
"domain_info_response_testvalidate_doesnt_exist.xml", ImmutableMap.of(),
"response_error.xml",
ImmutableMap.of(
"MSG", "The domain with given ID (test-validate.example) doesn't exist.",
"CODE", "2303"),
DateTime.parse("2014-01-01T00:01:00Z")); DateTime.parse("2014-01-01T00:01:00Z"));
assertCommandAndResponse( assertCommandAndResponse(
"domain_allocate_testvalidate.xml", "domain_allocate_testvalidate.xml",
"domain_allocate_response_testvalidate_only_superuser.xml", ImmutableMap.of(),
"response_error.xml",
ImmutableMap.of("MSG", "Only a superuser can allocate domains", "CODE", "2201"),
START_OF_GA.plusDays(1)); START_OF_GA.plusDays(1));
setIsSuperuser(true); setIsSuperuser(true);
assertCommandAndResponse( assertCommandAndResponse(

View file

@ -108,7 +108,12 @@ public class EppLifecycleDomainTest extends EppTestCase {
createContactsAndHosts(); createContactsAndHosts();
assertCommandAndResponse( assertCommandAndResponse(
"domain_create_fakesite.xml", "domain_create_fakesite.xml",
"domain_create_response_fakesite.xml", ImmutableMap.of(),
"domain_create_response.xml",
ImmutableMap.of(
"NAME", "fakesite.example",
"CRDATE", "2000-06-01T00:04:00.0Z",
"EXDATE", "2002-06-01T00:04:00.0Z"),
DateTime.parse("2000-06-01T00:04:00Z")); DateTime.parse("2000-06-01T00:04:00Z"));
assertCommandAndResponse( assertCommandAndResponse(
"domain_info_fakesite.xml", "domain_info_fakesite.xml",
@ -148,13 +153,18 @@ public class EppLifecycleDomainTest extends EppTestCase {
// Create domain example.tld // Create domain example.tld
assertCommandAndResponse( assertCommandAndResponse(
"domain_create_no_hosts_or_dsdata.xml", "domain_create_no_hosts_or_dsdata.xml",
ImmutableMap.of(),
"domain_create_response.xml", "domain_create_response.xml",
ImmutableMap.of(
"NAME", "example.tld",
"CRDATE", "2000-06-01T00:02:00.0Z",
"EXDATE", "2002-06-01T00:02:00.0Z"),
DateTime.parse("2000-06-01T00:02:00Z")); DateTime.parse("2000-06-01T00:02:00Z"));
// Delete domain example.tld after its add grace period has expired. // Delete domain example.tld after its add grace period has expired.
assertCommandAndResponse( assertCommandAndResponse(
"domain_delete.xml", "domain_delete.xml", ImmutableMap.of("NAME", "example.tld"),
"generic_success_action_pending_response.xml", "generic_success_action_pending_response.xml", ImmutableMap.of(),
DateTime.parse("2000-07-01T00:02:00Z")); DateTime.parse("2000-07-01T00:02:00Z"));
// Restore the domain. // Restore the domain.
@ -175,7 +185,12 @@ public class EppLifecycleDomainTest extends EppTestCase {
DateTime createTime = DateTime.parse("2000-06-01T00:02:00Z"); DateTime createTime = DateTime.parse("2000-06-01T00:02:00Z");
assertCommandAndResponse( assertCommandAndResponse(
"domain_create_no_hosts_or_dsdata.xml", "domain_create_no_hosts_or_dsdata.xml",
ImmutableMap.of(),
"domain_create_response.xml", "domain_create_response.xml",
ImmutableMap.of(
"NAME", "example.tld",
"CRDATE", "2000-06-01T00:02:00.0Z",
"EXDATE", "2002-06-01T00:02:00.0Z"),
createTime); createTime);
DomainResource domain = DomainResource domain =
@ -184,14 +199,17 @@ public class EppLifecycleDomainTest extends EppTestCase {
// Delete domain example.tld within the add grace period. // Delete domain example.tld within the add grace period.
DateTime deleteTime = createTime.plusDays(1); DateTime deleteTime = createTime.plusDays(1);
assertCommandAndResponse( assertCommandAndResponse(
"domain_delete.xml", "domain_delete.xml", ImmutableMap.of("NAME", "example.tld"),
"generic_success_response.xml", "generic_success_response.xml", ImmutableMap.of(),
deleteTime); deleteTime);
// Verify that it is immediately non-existent. // Verify that it is immediately non-existent.
assertCommandAndResponse( assertCommandAndResponse(
"domain_info.xml", "domain_info.xml",
"domain_info_response_nonexistent.xml", ImmutableMap.of(),
"response_error.xml",
ImmutableMap.of(
"MSG", "The domain with given ID (example.tld) doesn't exist.", "CODE", "2303"),
deleteTime.plusSeconds(1)); deleteTime.plusSeconds(1));
// The expected one-time billing event, that should have an associated Cancellation. // The expected one-time billing event, that should have an associated Cancellation.
@ -218,14 +236,19 @@ public class EppLifecycleDomainTest extends EppTestCase {
// Create domain example.tld // Create domain example.tld
assertCommandAndResponse( assertCommandAndResponse(
"domain_create_no_hosts_or_dsdata.xml", "domain_create_no_hosts_or_dsdata.xml",
ImmutableMap.of(),
"domain_create_response.xml", "domain_create_response.xml",
ImmutableMap.of(
"NAME", "example.tld",
"CRDATE", "2000-06-01T00:02:00.0Z",
"EXDATE", "2002-06-01T00:02:00.0Z"),
createTime); createTime);
DateTime deleteTime = DateTime.parse("2000-07-07T00:02:00Z"); // 1 month and 6 days after DateTime deleteTime = DateTime.parse("2000-07-07T00:02:00Z"); // 1 month and 6 days after
// Delete domain example.tld after its add grace period has expired. // Delete domain example.tld after its add grace period has expired.
assertCommandAndResponse( assertCommandAndResponse(
"domain_delete.xml", "domain_delete.xml", ImmutableMap.of("NAME", "example.tld"),
"generic_success_action_pending_response.xml", "generic_success_action_pending_response.xml", ImmutableMap.of(),
deleteTime); deleteTime);
// Verify that domain shows redemptionPeriod soon after deletion. // Verify that domain shows redemptionPeriod soon after deletion.
@ -247,7 +270,10 @@ public class EppLifecycleDomainTest extends EppTestCase {
// Verify that the domain is non-existent (available for registration) later. // Verify that the domain is non-existent (available for registration) later.
assertCommandAndResponse( assertCommandAndResponse(
"domain_info.xml", "domain_info.xml",
"domain_info_response_nonexistent.xml", ImmutableMap.of(),
"response_error.xml",
ImmutableMap.of(
"MSG", "The domain with given ID (example.tld) doesn't exist.", "CODE", "2303"),
DateTime.parse("2000-09-01T00:00:00Z")); DateTime.parse("2000-09-01T00:00:00Z"));
DomainResource domain = DomainResource domain =
@ -292,8 +318,8 @@ public class EppLifecycleDomainTest extends EppTestCase {
// Delete domain example.tld within the add grade period. // Delete domain example.tld within the add grade period.
DateTime deleteTime = createTime.plusDays(1); DateTime deleteTime = createTime.plusDays(1);
assertCommandAndResponse( assertCommandAndResponse(
"domain_delete.xml", "domain_delete.xml", ImmutableMap.of("NAME", "example.tld"),
"domain_delete_response_fee.xml", "domain_delete_response_fee.xml", ImmutableMap.of(),
deleteTime); deleteTime);
// Verify that the OneTime billing event associated with the base fee of domain registration and // Verify that the OneTime billing event associated with the base fee of domain registration and
@ -404,8 +430,10 @@ public class EppLifecycleDomainTest extends EppTestCase {
createFakesite(); createFakesite();
createSubordinateHost(); createSubordinateHost();
assertCommandAndResponse( assertCommandAndResponse(
"domain_delete_fakesite.xml", "domain_delete.xml",
"domain_delete_response_prohibited.xml", ImmutableMap.of("NAME", "fakesite.example"),
"response_error.xml",
ImmutableMap.of("MSG", "Domain to be deleted has subordinate hosts", "CODE", "2305"),
DateTime.parse("2002-05-30T01:01:00Z")); DateTime.parse("2002-05-30T01:01:00Z"));
assertCommandAndResponse("logout.xml", "logout_response.xml"); assertCommandAndResponse("logout.xml", "logout_response.xml");
} }
@ -439,8 +467,8 @@ public class EppLifecycleDomainTest extends EppTestCase {
.hasStatus(SUCCESS); .hasStatus(SUCCESS);
// Delete the fakesite.example domain (which should succeed since it no longer has subords). // Delete the fakesite.example domain (which should succeed since it no longer has subords).
assertCommandAndResponse( assertCommandAndResponse(
"domain_delete_fakesite.xml", "domain_delete.xml", ImmutableMap.of("NAME", "fakesite.example"),
"generic_success_action_pending_response.xml", "generic_success_action_pending_response.xml", ImmutableMap.of(),
DateTime.parse("2002-05-30T01:02:00Z")); DateTime.parse("2002-05-30T01:02:00Z"));
assertThat(getRecordedEppMetric()) assertThat(getRecordedEppMetric())
.hasClientId("NewRegistrar") .hasClientId("NewRegistrar")
@ -482,7 +510,12 @@ public class EppLifecycleDomainTest extends EppTestCase {
// Create domain example.tld // Create domain example.tld
assertCommandAndResponse( assertCommandAndResponse(
"domain_create_no_hosts_or_dsdata.xml", "domain_create_no_hosts_or_dsdata.xml",
"domain_create_response_superordinate.xml", ImmutableMap.of(),
"domain_create_response.xml",
ImmutableMap.of(
"NAME", "example.tld",
"CRDATE", "2000-06-02T00:00:00.0Z",
"EXDATE", "2002-06-02T00:00:00.0Z"),
DateTime.parse("2000-06-02T00:00:00Z")); DateTime.parse("2000-06-02T00:00:00Z"));
// Create nameserver ns1.example.tld // Create nameserver ns1.example.tld
@ -499,8 +532,10 @@ public class EppLifecycleDomainTest extends EppTestCase {
// Attempt to delete the fakesite.example domain (which should fail since it now has a // Attempt to delete the fakesite.example domain (which should fail since it now has a
// subordinate host). // subordinate host).
assertCommandAndResponse( assertCommandAndResponse(
"domain_delete_fakesite.xml", "domain_delete.xml",
"domain_delete_response_prohibited.xml", ImmutableMap.of("NAME", "fakesite.example"),
"response_error.xml",
ImmutableMap.of("MSG", "Domain to be deleted has subordinate hosts", "CODE", "2305"),
DateTime.parse("2002-05-30T01:02:00Z")); DateTime.parse("2002-05-30T01:02:00Z"));
// Check info on the renamed host and verify that it's still around and wasn't deleted. // Check info on the renamed host and verify that it's still around and wasn't deleted.
assertCommandAndResponse( assertCommandAndResponse(
@ -534,12 +569,19 @@ public class EppLifecycleDomainTest extends EppTestCase {
assertCommandAndResponse( assertCommandAndResponse(
"domain_create_sunrise_encoded_mark.xml", "domain_create_sunrise_encoded_mark.xml",
"domain_create_testvalidate_invalid_phase.xml", ImmutableMap.of(),
"response_error.xml",
ImmutableMap.of(
"MSG", "Command is not allowed in the current registry phase", "CODE", "2002"),
sunriseDate.minusDays(1)); sunriseDate.minusDays(1));
assertCommandAndResponse( assertCommandAndResponse(
"domain_info_testvalidate.xml", "domain_info_testvalidate.xml",
"domain_info_response_testvalidate_doesnt_exist.xml", ImmutableMap.of(),
"response_error.xml",
ImmutableMap.of(
"MSG", "The domain with given ID (test-validate.example) doesn't exist.",
"CODE", "2303"),
sunriseDate.plusDays(1)); sunriseDate.plusDays(1));
assertCommandAndResponse("logout.xml", "logout_response.xml"); assertCommandAndResponse("logout.xml", "logout_response.xml");
@ -598,7 +640,7 @@ public class EppLifecycleDomainTest extends EppTestCase {
"poll_ack.xml", "poll_ack.xml",
ImmutableMap.of("ID", "1-C-EXAMPLE-13-16-2002"), ImmutableMap.of("ID", "1-C-EXAMPLE-13-16-2002"),
"poll_ack_response_empty.xml", "poll_ack_response_empty.xml",
null, ImmutableMap.of(),
DateTime.parse("2002-07-01T00:02:00Z")); DateTime.parse("2002-07-01T00:02:00Z"));
// The second autorenew poll message isn't seen until after another year, and it should have a // The second autorenew poll message isn't seen until after another year, and it should have a
@ -621,7 +663,7 @@ public class EppLifecycleDomainTest extends EppTestCase {
"poll_ack.xml", "poll_ack.xml",
ImmutableMap.of("ID", "1-C-EXAMPLE-13-16-2003"), ImmutableMap.of("ID", "1-C-EXAMPLE-13-16-2003"),
"poll_ack_response_empty.xml", "poll_ack_response_empty.xml",
null, ImmutableMap.of(),
DateTime.parse("2003-07-01T00:05:05Z")); DateTime.parse("2003-07-01T00:05:05Z"));
assertCommandAndResponse( assertCommandAndResponse(
"poll.xml", "poll_response_empty.xml", DateTime.parse("2003-07-01T00:05:10Z")); "poll.xml", "poll_response_empty.xml", DateTime.parse("2003-07-01T00:05:10Z"));
@ -658,7 +700,7 @@ public class EppLifecycleDomainTest extends EppTestCase {
"poll_ack.xml", "poll_ack.xml",
ImmutableMap.of("ID", "1-C-EXAMPLE-17-23-2001"), ImmutableMap.of("ID", "1-C-EXAMPLE-17-23-2001"),
"poll_ack_response_empty.xml", "poll_ack_response_empty.xml",
null, ImmutableMap.of(),
DateTime.parse("2001-01-01T00:01:00Z")); DateTime.parse("2001-01-01T00:01:00Z"));
// Five days in the future, expect a server approval poll message to the loser, and ack it. // Five days in the future, expect a server approval poll message to the loser, and ack it.
@ -670,7 +712,7 @@ public class EppLifecycleDomainTest extends EppTestCase {
"poll_ack.xml", "poll_ack.xml",
ImmutableMap.of("ID", "1-C-EXAMPLE-17-22-2001"), ImmutableMap.of("ID", "1-C-EXAMPLE-17-22-2001"),
"poll_ack_response_empty.xml", "poll_ack_response_empty.xml",
null, ImmutableMap.of(),
DateTime.parse("2001-01-06T00:01:00Z")); DateTime.parse("2001-01-06T00:01:00Z"));
assertCommandAndResponse("logout.xml", "logout_response.xml"); assertCommandAndResponse("logout.xml", "logout_response.xml");
@ -678,7 +720,7 @@ public class EppLifecycleDomainTest extends EppTestCase {
assertCommandAndResponse("login2_valid.xml", "login_response.xml"); assertCommandAndResponse("login2_valid.xml", "login_response.xml");
assertCommandAndResponse( assertCommandAndResponse(
"poll.xml", "poll.xml",
null, ImmutableMap.of(),
"poll_response_domain_transfer_server_approve_winner.xml", "poll_response_domain_transfer_server_approve_winner.xml",
ImmutableMap.of("SERVER_TRID", transferRequestTrid), ImmutableMap.of("SERVER_TRID", transferRequestTrid),
DateTime.parse("2001-01-06T00:02:00Z")); DateTime.parse("2001-01-06T00:02:00Z"));
@ -686,7 +728,7 @@ public class EppLifecycleDomainTest extends EppTestCase {
"poll_ack.xml", "poll_ack.xml",
ImmutableMap.of("ID", "1-C-EXAMPLE-17-21-2001"), ImmutableMap.of("ID", "1-C-EXAMPLE-17-21-2001"),
"poll_ack_response_empty.xml", "poll_ack_response_empty.xml",
null, ImmutableMap.of(),
DateTime.parse("2001-01-06T00:02:00Z")); DateTime.parse("2001-01-06T00:02:00Z"));
assertCommandAndResponse("logout.xml", "logout_response.xml"); assertCommandAndResponse("logout.xml", "logout_response.xml");
} }
@ -768,7 +810,7 @@ public class EppLifecycleDomainTest extends EppTestCase {
// Verify that host's client ID was set to the new registrar and has the transfer date set. // Verify that host's client ID was set to the new registrar and has the transfer date set.
assertCommandAndResponse( assertCommandAndResponse(
"host_info_fakesite.xml", "host_info_fakesite.xml",
null, ImmutableMap.of(),
"host_info_response_fakesite_post_transfer.xml", "host_info_response_fakesite_post_transfer.xml",
ImmutableMap.of("TRDATE", "2002-06-04T00:00:00Z"), ImmutableMap.of("TRDATE", "2002-06-04T00:00:00Z"),
DateTime.parse("2002-06-09T00:01:00Z")); DateTime.parse("2002-06-09T00:01:00Z"));
@ -798,8 +840,8 @@ public class EppLifecycleDomainTest extends EppTestCase {
"domain_info_response_fakesite_pending_transfer.xml", "domain_info_response_fakesite_pending_transfer.xml",
DateTime.parse("2002-05-30T01:00:00Z")); DateTime.parse("2002-05-30T01:00:00Z"));
assertCommandAndResponse( assertCommandAndResponse(
"domain_delete_fakesite.xml", "domain_delete.xml", ImmutableMap.of("NAME", "fakesite.example"),
"generic_success_action_pending_response.xml", "generic_success_action_pending_response.xml", ImmutableMap.of(),
DateTime.parse("2002-05-30T01:01:00Z")); DateTime.parse("2002-05-30T01:01:00Z"));
assertCommandAndResponse( assertCommandAndResponse(
"domain_info_fakesite.xml", "domain_info_fakesite.xml",
@ -826,7 +868,9 @@ public class EppLifecycleDomainTest extends EppTestCase {
createSubordinateHost(); createSubordinateHost();
assertCommandAndResponse( assertCommandAndResponse(
"domain_transfer_query_fakesite.xml", "domain_transfer_query_fakesite.xml",
"domain_transfer_query_response_no_transfer_history.xml", ImmutableMap.of(),
"response_error.xml",
ImmutableMap.of("MSG", "Object has no transfer history", "CODE", "2002"),
DateTime.parse("2000-09-02T00:00:00Z")); DateTime.parse("2000-09-02T00:00:00Z"));
assertCommandAndResponse("logout.xml", "logout_response.xml"); assertCommandAndResponse("logout.xml", "logout_response.xml");
@ -866,7 +910,9 @@ public class EppLifecycleDomainTest extends EppTestCase {
createSubordinateHost(); createSubordinateHost();
assertCommandAndResponse( assertCommandAndResponse(
"domain_transfer_query_fakesite.xml", "domain_transfer_query_fakesite.xml",
"domain_transfer_query_response_no_transfer_history.xml", ImmutableMap.of(),
"response_error.xml",
ImmutableMap.of("MSG", "Object has no transfer history", "CODE", "2002"),
DateTime.parse("2000-09-02T00:00:00Z")); DateTime.parse("2000-09-02T00:00:00Z"));
assertCommandAndResponse("logout.xml", "logout_response.xml"); assertCommandAndResponse("logout.xml", "logout_response.xml");
// Request a transfer of the domain to the second registrar. // Request a transfer of the domain to the second registrar.
@ -884,7 +930,12 @@ public class EppLifecycleDomainTest extends EppTestCase {
DateTime.parse("2001-01-07T00:00:00Z")); DateTime.parse("2001-01-07T00:00:00Z"));
assertCommandAndResponse( assertCommandAndResponse(
"domain_create_secondsite.xml", "domain_create_secondsite.xml",
"domain_create_response_secondsite.xml", ImmutableMap.of(),
"domain_create_response.xml",
ImmutableMap.of(
"NAME", "secondsite.example",
"CRDATE", "2001-01-08T00:00:00.0Z",
"EXDATE", "2003-01-08T00:00:00.0Z"),
DateTime.parse("2001-01-08T00:00:00Z")); DateTime.parse("2001-01-08T00:00:00Z"));
// Update the host to be subordinate to a different domain by renaming it to // Update the host to be subordinate to a different domain by renaming it to
// ns3.secondsite.example // ns3.secondsite.example
@ -892,7 +943,7 @@ public class EppLifecycleDomainTest extends EppTestCase {
"host_update_rename_only.xml", "host_update_rename_only.xml",
ImmutableMap.of("oldName", "ns3.fakesite.example", "newName", "ns3.secondsite.example"), ImmutableMap.of("oldName", "ns3.fakesite.example", "newName", "ns3.secondsite.example"),
"generic_success_response.xml", "generic_success_response.xml",
null, ImmutableMap.of(),
DateTime.parse("2002-05-30T01:01:00Z")); DateTime.parse("2002-05-30T01:01:00Z"));
// The last transfer time on the host should still be what it was from the transfer. // The last transfer time on the host should still be what it was from the transfer.
assertCommandAndResponse( assertCommandAndResponse(
@ -919,7 +970,9 @@ public class EppLifecycleDomainTest extends EppTestCase {
createSubordinateHost(); createSubordinateHost();
assertCommandAndResponse( assertCommandAndResponse(
"domain_transfer_query_fakesite.xml", "domain_transfer_query_fakesite.xml",
"domain_transfer_query_response_no_transfer_history.xml", ImmutableMap.of(),
"response_error.xml",
ImmutableMap.of("MSG", "Object has no transfer history", "CODE", "2002"),
DateTime.parse("2000-09-02T00:00:00Z")); DateTime.parse("2000-09-02T00:00:00Z"));
assertCommandAndResponse("logout.xml", "logout_response.xml"); assertCommandAndResponse("logout.xml", "logout_response.xml");
// Request a transfer of the domain to the second registrar. // Request a transfer of the domain to the second registrar.
@ -931,7 +984,7 @@ public class EppLifecycleDomainTest extends EppTestCase {
// Verify that the lastTransferTime now reflects the superordinate domain's transfer. // Verify that the lastTransferTime now reflects the superordinate domain's transfer.
assertCommandAndResponse( assertCommandAndResponse(
"host_info_fakesite.xml", "host_info_fakesite.xml",
null, ImmutableMap.of(),
"host_info_response_fakesite_post_transfer.xml", "host_info_response_fakesite_post_transfer.xml",
ImmutableMap.of("TRDATE", "2001-01-06T00:00:00.000Z"), ImmutableMap.of("TRDATE", "2001-01-06T00:00:00.000Z"),
DateTime.parse("2001-01-07T00:00:00Z")); DateTime.parse("2001-01-07T00:00:00Z"));
@ -942,7 +995,7 @@ public class EppLifecycleDomainTest extends EppTestCase {
"oldName", "ns3.fakesite.example", "oldName", "ns3.fakesite.example",
"newName", "ns3.notarealsite.external"), "newName", "ns3.notarealsite.external"),
"generic_success_response.xml", "generic_success_response.xml",
null, ImmutableMap.of(),
DateTime.parse("2002-05-30T01:01:00Z")); DateTime.parse("2002-05-30T01:01:00Z"));
// The last transfer time on the host should still be what it was from the transfer. // The last transfer time on the host should still be what it was from the transfer.
assertCommandAndResponse( assertCommandAndResponse(
@ -967,24 +1020,33 @@ public class EppLifecycleDomainTest extends EppTestCase {
assertCommandAndResponse( assertCommandAndResponse(
"domain_create_wildcard.xml", "domain_create_wildcard.xml",
ImmutableMap.of("HOSTNAME", "example.bar.foo.tld"), ImmutableMap.of("HOSTNAME", "example.bar.foo.tld"),
"domain_create_response_wildcard.xml", "domain_create_response.xml",
ImmutableMap.of("DOMAIN", "example.bar.foo.tld"), ImmutableMap.of(
"NAME", "example.bar.foo.tld",
"CRDATE", "2000-06-01T00:02:00.0Z",
"EXDATE", "2002-06-01T00:02:00.0Z"),
DateTime.parse("2000-06-01T00:02:00Z")); DateTime.parse("2000-06-01T00:02:00Z"));
// Create domain example.foo.tld // Create domain example.foo.tld
assertCommandAndResponse( assertCommandAndResponse(
"domain_create_wildcard.xml", "domain_create_wildcard.xml",
ImmutableMap.of("HOSTNAME", "example.foo.tld"), ImmutableMap.of("HOSTNAME", "example.foo.tld"),
"domain_create_response_wildcard.xml", "domain_create_response.xml",
ImmutableMap.of("DOMAIN", "example.foo.tld"), ImmutableMap.of(
"NAME", "example.foo.tld",
"CRDATE", "2000-06-01T00:02:00.0Z",
"EXDATE", "2002-06-01T00:02:00.0Z"),
DateTime.parse("2000-06-01T00:02:00Z")); DateTime.parse("2000-06-01T00:02:00Z"));
// Create domain example.tld // Create domain example.tld
assertCommandAndResponse( assertCommandAndResponse(
"domain_create_wildcard.xml", "domain_create_wildcard.xml",
ImmutableMap.of("HOSTNAME", "example.tld"), ImmutableMap.of("HOSTNAME", "example.tld"),
"domain_create_response_wildcard.xml", "domain_create_response.xml",
ImmutableMap.of("DOMAIN", "example.tld"), ImmutableMap.of(
"NAME", "example.tld",
"CRDATE", "2000-06-01T00:02:00.0Z",
"EXDATE", "2002-06-01T00:02:00.0Z"),
DateTime.parse("2000-06-01T00:02:00Z")); DateTime.parse("2000-06-01T00:02:00Z"));
assertCommandAndResponse("logout.xml", "logout_response.xml"); assertCommandAndResponse("logout.xml", "logout_response.xml");
@ -1001,16 +1063,22 @@ public class EppLifecycleDomainTest extends EppTestCase {
assertCommandAndResponse( assertCommandAndResponse(
"domain_create_wildcard.xml", "domain_create_wildcard.xml",
ImmutableMap.of("HOSTNAME", "example.tld.foo"), ImmutableMap.of("HOSTNAME", "example.tld.foo"),
"domain_create_response_wildcard.xml", "domain_create_response.xml",
ImmutableMap.of("DOMAIN", "example.tld.foo"), ImmutableMap.of(
"NAME", "example.tld.foo",
"CRDATE", "2000-06-01T00:02:00.0Z",
"EXDATE", "2002-06-01T00:02:00.0Z"),
DateTime.parse("2000-06-01T00:02:00Z")); DateTime.parse("2000-06-01T00:02:00Z"));
// Create domain example.tld // Create domain example.tld
assertCommandAndResponse( assertCommandAndResponse(
"domain_create_wildcard.xml", "domain_create_wildcard.xml",
ImmutableMap.of("HOSTNAME", "example.tld"), ImmutableMap.of("HOSTNAME", "example.tld"),
"domain_create_response_wildcard.xml", "domain_create_response.xml",
ImmutableMap.of("DOMAIN", "example.tld"), ImmutableMap.of(
"NAME", "example.tld",
"CRDATE", "2000-06-01T00:02:00.0Z",
"EXDATE", "2002-06-01T00:02:00.0Z"),
DateTime.parse("2000-06-01T00:02:00Z")); DateTime.parse("2000-06-01T00:02:00Z"));
assertCommandAndResponse("logout.xml", "logout_response.xml"); assertCommandAndResponse("logout.xml", "logout_response.xml");

View file

@ -123,7 +123,12 @@ public class EppLifecycleHostTest extends EppTestCase {
DateTime.parse("2000-06-01T00:01:00Z")); DateTime.parse("2000-06-01T00:01:00Z"));
assertCommandAndResponse( assertCommandAndResponse(
"domain_create_fakesite_no_nameservers.xml", "domain_create_fakesite_no_nameservers.xml",
"domain_create_response_fakesite.xml", ImmutableMap.of(),
"domain_create_response.xml",
ImmutableMap.of(
"NAME", "fakesite.example",
"CRDATE", "2000-06-01T00:04:00.0Z",
"EXDATE", "2002-06-01T00:04:00.0Z"),
DateTime.parse("2000-06-01T00:04:00Z")); DateTime.parse("2000-06-01T00:04:00Z"));
assertCommandAndResponse( assertCommandAndResponse(
"domain_info_fakesite.xml", "domain_info_fakesite.xml",
@ -142,7 +147,10 @@ public class EppLifecycleHostTest extends EppTestCase {
// Attempt overwriting of 2nd fakesite subordinate host with the 1st. // Attempt overwriting of 2nd fakesite subordinate host with the 1st.
assertCommandAndResponse( assertCommandAndResponse(
"host_update_fakesite1_to_fakesite2.xml", "host_update_fakesite1_to_fakesite2.xml",
"host_update_failed_response.xml", ImmutableMap.of(),
"response_error.xml",
ImmutableMap.of(
"MSG", "Object with given ID (ns4.fakesite.example) already exists", "CODE", "2302"),
DateTime.parse("2000-06-10T00:01:00Z")); DateTime.parse("2000-06-10T00:01:00Z"));
// Verify that fakesite hosts still exist in their unmodified states. // Verify that fakesite hosts still exist in their unmodified states.
assertCommandAndResponse( assertCommandAndResponse(
@ -177,24 +185,33 @@ public class EppLifecycleHostTest extends EppTestCase {
assertCommandAndResponse( assertCommandAndResponse(
"domain_create_wildcard.xml", "domain_create_wildcard.xml",
ImmutableMap.of("HOSTNAME", "example.bar.foo.tld"), ImmutableMap.of("HOSTNAME", "example.bar.foo.tld"),
"domain_create_response_wildcard.xml", "domain_create_response.xml",
ImmutableMap.of("DOMAIN", "example.bar.foo.tld"), ImmutableMap.of(
"NAME", "example.bar.foo.tld",
"CRDATE", "2000-06-01T00:02:00.0Z",
"EXDATE", "2002-06-01T00:02:00.0Z"),
DateTime.parse("2000-06-01T00:02:00Z")); DateTime.parse("2000-06-01T00:02:00Z"));
// Create domain example.foo.tld // Create domain example.foo.tld
assertCommandAndResponse( assertCommandAndResponse(
"domain_create_wildcard.xml", "domain_create_wildcard.xml",
ImmutableMap.of("HOSTNAME", "example.foo.tld"), ImmutableMap.of("HOSTNAME", "example.foo.tld"),
"domain_create_response_wildcard.xml", "domain_create_response.xml",
ImmutableMap.of("DOMAIN", "example.foo.tld"), ImmutableMap.of(
"NAME", "example.foo.tld",
"CRDATE", "2000-06-01T00:02:00.0Z",
"EXDATE", "2002-06-01T00:02:00.0Z"),
DateTime.parse("2000-06-01T00:02:00Z")); DateTime.parse("2000-06-01T00:02:00Z"));
// Create domain example.tld // Create domain example.tld
assertCommandAndResponse( assertCommandAndResponse(
"domain_create_wildcard.xml", "domain_create_wildcard.xml",
ImmutableMap.of("HOSTNAME", "example.tld"), ImmutableMap.of("HOSTNAME", "example.tld"),
"domain_create_response_wildcard.xml", "domain_create_response.xml",
ImmutableMap.of("DOMAIN", "example.tld"), ImmutableMap.of(
"NAME", "example.tld",
"CRDATE", "2000-06-01T00:02:00.0Z",
"EXDATE", "2002-06-01T00:02:00.0Z"),
DateTime.parse("2000-06-01T00:02:00Z")); DateTime.parse("2000-06-01T00:02:00Z"));
// Create host ns1.example.bar.foo.tld // Create host ns1.example.bar.foo.tld

View file

@ -47,6 +47,15 @@ public class EppLoggedOutTest extends EppTestCase {
@Test @Test
public void testSyntaxError() throws Exception { public void testSyntaxError() throws Exception {
assertCommandAndResponse("syntax_error.xml", "syntax_error_response.xml"); assertCommandAndResponse(
"syntax_error.xml",
ImmutableMap.of(),
"response_error_no_cltrid.xml",
ImmutableMap.of(
"MSG",
"Syntax error at line 4, column 65: cvc-complex-type.3.2.2: "
+ "Attribute 'xsi:schemaLocation' is not allowed to appear in element 'epp'.",
"CODE",
"2001"));
} }
} }

View file

@ -18,6 +18,7 @@ import static google.registry.testing.DatastoreHelper.loadRegistrar;
import static google.registry.testing.DatastoreHelper.persistResource; import static google.registry.testing.DatastoreHelper.persistResource;
import static org.joda.time.DateTimeZone.UTC; import static org.joda.time.DateTimeZone.UTC;
import com.google.common.collect.ImmutableMap;
import google.registry.testing.AppEngineRule; import google.registry.testing.AppEngineRule;
import google.registry.testing.CertificateSamples; import google.registry.testing.CertificateSamples;
import java.util.Optional; import java.util.Optional;
@ -70,7 +71,10 @@ public class EppLoginTlsTest extends EppTestCase {
setClientCertificateHash(CertificateSamples.SAMPLE_CERT_HASH); setClientCertificateHash(CertificateSamples.SAMPLE_CERT_HASH);
// For TLS login, we also check the epp xml password. // For TLS login, we also check the epp xml password.
assertCommandAndResponse( assertCommandAndResponse(
"login_invalid_wrong_password.xml", "login_response_wrong_password.xml"); "login_invalid_wrong_password.xml",
ImmutableMap.of(),
"response_error.xml",
ImmutableMap.of("MSG", "Registrar password is incorrect", "CODE", "2200"));
} }
@Test @Test
@ -80,26 +84,45 @@ public class EppLoginTlsTest extends EppTestCase {
assertCommandAndResponse("logout.xml", "logout_response.xml"); assertCommandAndResponse("logout.xml", "logout_response.xml");
assertCommandAndResponse("login_valid.xml", "login_response.xml"); assertCommandAndResponse("login_valid.xml", "login_response.xml");
assertCommandAndResponse("logout.xml", "logout_response.xml"); assertCommandAndResponse("logout.xml", "logout_response.xml");
assertCommandAndResponse("login2_valid.xml", "login_response_bad_certificate.xml"); assertCommandAndResponse(
"login2_valid.xml",
ImmutableMap.of(),
"response_error.xml",
ImmutableMap.of(
"MSG", "Registrar certificate does not match stored certificate", "CODE", "2200"));
} }
@Test @Test
public void testNonAuthedLogin_fails() throws Exception { public void testNonAuthedLogin_fails() throws Exception {
setClientCertificateHash(CertificateSamples.SAMPLE_CERT_HASH); setClientCertificateHash(CertificateSamples.SAMPLE_CERT_HASH);
assertCommandAndResponse("login2_valid.xml", "login_response_bad_certificate.xml"); assertCommandAndResponse(
"login2_valid.xml",
ImmutableMap.of(),
"response_error.xml",
ImmutableMap.of(
"MSG", "Registrar certificate does not match stored certificate", "CODE", "2200"));
} }
@Test @Test
public void testBadCertificate_failsBadCertificate2200() throws Exception { public void testBadCertificate_failsBadCertificate2200() throws Exception {
setClientCertificateHash("laffo"); setClientCertificateHash("laffo");
assertCommandAndResponse("login_valid.xml", "login_response_bad_certificate.xml"); assertCommandAndResponse(
"login_valid.xml",
ImmutableMap.of(),
"response_error.xml",
ImmutableMap.of(
"MSG", "Registrar certificate does not match stored certificate", "CODE", "2200"));
} }
@Test @Test
public void testGfeDidntProvideClientCertificate_failsMissingCertificate2200() throws Exception { public void testGfeDidntProvideClientCertificate_failsMissingCertificate2200() throws Exception {
setClientCertificateHash(""); setClientCertificateHash("");
assertCommandAndResponse("login_valid.xml", "login_response_missing_certificate.xml"); assertCommandAndResponse(
"login_valid.xml",
ImmutableMap.of(),
"response_error.xml",
ImmutableMap.of("MSG", "Registrar certificate not present", "CODE", "2200"));
} }
@Test @Test

View file

@ -19,6 +19,7 @@ import static google.registry.testing.DatastoreHelper.loadRegistrar;
import static google.registry.testing.DatastoreHelper.persistResource; import static google.registry.testing.DatastoreHelper.persistResource;
import com.google.appengine.api.users.User; import com.google.appengine.api.users.User;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import google.registry.model.registrar.RegistrarContact; import google.registry.model.registrar.RegistrarContact;
import google.registry.testing.AppEngineRule; import google.registry.testing.AppEngineRule;
@ -60,7 +61,13 @@ public class EppLoginUserTest extends EppTestCase {
@Test @Test
public void testNonAuthedLogin_fails() throws Exception { public void testNonAuthedLogin_fails() throws Exception {
assertCommandAndResponse("login2_valid.xml", "login_response_unauthorized_role.xml"); assertCommandAndResponse(
"login2_valid.xml",
ImmutableMap.of(),
"response_error.xml",
ImmutableMap.of(
"MSG", "User id is not allowed to login as requested registrar: person@example.com",
"CODE", "2200"));
} }
@Test @Test
@ -69,7 +76,13 @@ public class EppLoginUserTest extends EppTestCase {
assertCommandAndResponse("logout.xml", "logout_response.xml"); assertCommandAndResponse("logout.xml", "logout_response.xml");
assertCommandAndResponse("login_valid.xml", "login_response.xml"); assertCommandAndResponse("login_valid.xml", "login_response.xml");
assertCommandAndResponse("logout.xml", "logout_response.xml"); assertCommandAndResponse("logout.xml", "logout_response.xml");
assertCommandAndResponse("login2_valid.xml", "login_response_unauthorized_role.xml"); assertCommandAndResponse(
"login2_valid.xml",
ImmutableMap.of(),
"response_error.xml",
ImmutableMap.of(
"MSG", "User id is not allowed to login as requested registrar: person@example.com",
"CODE", "2200"));
} }
@Test @Test

View file

@ -73,7 +73,7 @@ public class EppTestCase extends ShardableTestCase {
} }
String assertCommandAndResponse(String inputFilename, String outputFilename) throws Exception { String assertCommandAndResponse(String inputFilename, String outputFilename) throws Exception {
return assertCommandAndResponse(inputFilename, outputFilename, DateTime.now(UTC)); return assertCommandAndResponse(inputFilename, null, outputFilename, null);
} }
String assertCommandAndResponse(String inputFilename, String outputFilename, DateTime now) String assertCommandAndResponse(String inputFilename, String outputFilename, DateTime now)
@ -81,23 +81,36 @@ public class EppTestCase extends ShardableTestCase {
return assertCommandAndResponse(inputFilename, null, outputFilename, null, now); return assertCommandAndResponse(inputFilename, null, outputFilename, null, now);
} }
String assertCommandAndResponse(
String inputFilename,
Map<String, String> inputSubstitutions,
String outputFilename,
Map<String, String> outputSubstitutions)
throws Exception {
return assertCommandAndResponse(
inputFilename, inputSubstitutions, outputFilename, outputSubstitutions, DateTime.now(UTC));
}
String assertCommandAndResponse( String assertCommandAndResponse(
String inputFilename, String inputFilename,
Map<String, String> inputSubstitutions, Map<String, String> inputSubstitutions,
String outputFilename, String outputFilename,
Map<String, String> outputSubstitutions, Map<String, String> outputSubstitutions,
DateTime now) throws Exception { DateTime now)
throws Exception {
clock.setTo(now); clock.setTo(now);
String input = loadFile(getClass(), inputFilename, inputSubstitutions); String input = loadFile(getClass(), inputFilename, inputSubstitutions);
String expectedOutput = loadFile(getClass(), outputFilename, outputSubstitutions); String expectedOutput = loadFile(getClass(), outputFilename, outputSubstitutions);
if (sessionMetadata == null) { if (sessionMetadata == null) {
sessionMetadata = new HttpSessionMetadata(new FakeHttpSession()) { sessionMetadata =
new HttpSessionMetadata(new FakeHttpSession()) {
@Override @Override
public void invalidate() { public void invalidate() {
// When a session is invalidated, reset the sessionMetadata field. // When a session is invalidated, reset the sessionMetadata field.
super.invalidate(); super.invalidate();
EppTestCase.this.sessionMetadata = null; EppTestCase.this.sessionMetadata = null;
}}; }
};
} }
String actualOutput = executeXmlCommand(input); String actualOutput = executeXmlCommand(input);
assertXmlEqualsWithMessage( assertXmlEqualsWithMessage(

View file

@ -14,6 +14,7 @@
package google.registry.flows; package google.registry.flows;
import com.google.common.collect.ImmutableMap;
import google.registry.testing.AppEngineRule; import google.registry.testing.AppEngineRule;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
@ -37,7 +38,14 @@ public class EppXxeAttackTest extends EppTestCase {
assertCommandAndResponse("login_valid.xml", "login_response.xml"); assertCommandAndResponse("login_valid.xml", "login_response.xml");
assertCommandAndResponse( assertCommandAndResponse(
"contact_create_remote_xxe.xml", "contact_create_remote_xxe.xml",
"contact_create_remote_response_xxe.xml"); ImmutableMap.of(),
"response_error_no_cltrid.xml",
ImmutableMap.of(
"MSG",
"Syntax error at line 11, column 34: "
+ "The entity &quot;remote&quot; was referenced, but not declared.",
"CODE",
"2001"));
assertCommandAndResponse("logout.xml", "logout_response.xml"); assertCommandAndResponse("logout.xml", "logout_response.xml");
} }
@ -46,7 +54,14 @@ public class EppXxeAttackTest extends EppTestCase {
assertCommandAndResponse("login_valid.xml", "login_response.xml"); assertCommandAndResponse("login_valid.xml", "login_response.xml");
assertCommandAndResponse( assertCommandAndResponse(
"contact_create_local_xxe.xml", "contact_create_local_xxe.xml",
"contact_create_local_response_xxe.xml"); ImmutableMap.of(),
"response_error_no_cltrid.xml",
ImmutableMap.of(
"MSG",
"Syntax error at line 11, column 31: "
+ "The entity &quot;ent&quot; was referenced, but not declared.",
"CODE",
"2001"));
assertCommandAndResponse("logout.xml", "logout_response.xml"); assertCommandAndResponse("logout.xml", "logout_response.xml");
} }
@ -55,7 +70,14 @@ public class EppXxeAttackTest extends EppTestCase {
assertCommandAndResponse("login_valid.xml", "login_response.xml"); assertCommandAndResponse("login_valid.xml", "login_response.xml");
assertCommandAndResponse( assertCommandAndResponse(
"contact_create_billion_laughs.xml", "contact_create_billion_laughs.xml",
"contact_create_response_billion_laughs.xml"); ImmutableMap.of(),
"response_error_no_cltrid.xml",
ImmutableMap.of(
"MSG",
"Syntax error at line 20, column 32: "
+ "The entity &quot;lol9&quot; was referenced, but not declared.",
"CODE",
"2001"));
assertCommandAndResponse("logout.xml", "logout_response.xml"); assertCommandAndResponse("logout.xml", "logout_response.xml");
} }
} }

View file

@ -1,10 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="2001">
<msg>Syntax error at line 11, column 31: The entity &quot;ent&quot; was referenced, but not declared.</msg>
</result>
<trID>
<svTRID>DkRx3F6iQAmx4nS1xOgYZw==-8</svTRID>
</trID>
</response>
</epp>

View file

@ -1,10 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="2001">
<msg>Syntax error at line 11, column 34: The entity &quot;remote&quot; was referenced, but not declared.</msg>
</result>
<trID>
<svTRID>DkRx3F6iQAmx4nS1xOgYZw==-8</svTRID>
</trID>
</response>
</epp>

View file

@ -1,10 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="2001">
<msg>Syntax error at line 20, column 32: The entity &quot;lol9&quot; was referenced, but not declared.</msg>
</result>
<trID>
<svTRID>HmioO3vzQN+XVIUfZJxHeQ==-11</svTRID>
</trID>
</response>
</epp>

View file

@ -1,11 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="2201">
<msg>Only a superuser can allocate domains</msg>
</result>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -6,9 +6,9 @@
<resData> <resData>
<domain:creData <domain:creData
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"> xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name>example.tld</domain:name> <domain:name>%NAME%</domain:name>
<domain:crDate>2000-06-01T00:02:00.0Z</domain:crDate> <domain:crDate>%CRDATE%</domain:crDate>
<domain:exDate>2002-06-01T00:02:00.0Z</domain:exDate> <domain:exDate>%EXDATE%</domain:exDate>
</domain:creData> </domain:creData>
</resData> </resData>
<trID> <trID>

View file

@ -1,18 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<resData>
<domain:creData xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name>fakesite.example</domain:name>
<domain:crDate>2000-06-01T00:04:00.0Z</domain:crDate>
<domain:exDate>2002-06-01T00:04:00.0Z</domain:exDate>
</domain:creData>
</resData>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -1,18 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<resData>
<domain:creData xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name>secondsite.example</domain:name>
<domain:crDate>2001-01-08T00:00:00.0Z</domain:crDate>
<domain:exDate>2003-01-08T00:00:00.0Z</domain:exDate>
</domain:creData>
</resData>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -1,19 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<resData>
<domain:creData
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name>example.tld</domain:name>
<domain:crDate>2000-06-02T00:00:00.0Z</domain:crDate>
<domain:exDate>2002-06-02T00:00:00.0Z</domain:exDate>
</domain:creData>
</resData>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -1,19 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<resData>
<domain:creData
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name>%DOMAIN%</domain:name>
<domain:crDate>2000-06-01T00:02:00.0Z</domain:crDate>
<domain:exDate>2002-06-01T00:02:00.0Z</domain:exDate>
</domain:creData>
</resData>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -1,11 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="2002">
<msg>Command is not allowed in the current registry phase</msg>
</result>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -1,9 +1,8 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0"> <epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command> <command>
<delete> <delete>
<domain:delete <domain:delete xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"> <domain:name>%NAME%</domain:name>
<domain:name>example.tld</domain:name>
</domain:delete> </domain:delete>
</delete> </delete>
<clTRID>ABC-12345</clTRID> <clTRID>ABC-12345</clTRID>

View file

@ -1,10 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<delete>
<domain:delete xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name>fakesite.example</domain:name>
</domain:delete>
</delete>
<clTRID>ABC-12345</clTRID>
</command>
</epp>

View file

@ -1,11 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="2305">
<msg>Domain to be deleted has subordinate hosts</msg>
</result>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -1,12 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<response>
<result code="2303">
<msg>The domain with given ID (example.tld) doesn't exist.</msg>
</result>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -1,11 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="2303">
<msg>The domain with given ID (test-validate.example) doesn't exist.</msg>
</result>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -1,11 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="2302">
<msg>Object with given ID (ns4.fakesite.example) already exists</msg>
</result>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -1,11 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="2200">
<msg>Registrar certificate does not match stored certificate</msg>
</result>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -1,11 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="2200">
<msg>Registrar certificate not present</msg>
</result>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -1,11 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="2200">
<msg>User id is not allowed to login as requested registrar: person@example.com</msg>
</result>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>Mt2PuhrJTKO1nM/MbHxT4g==-2a</svTRID>
</trID>
</response>
</epp>

View file

@ -1,7 +1,7 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0"> <epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response> <response>
<result code="2002"> <result code="%CODE%">
<msg>Object has no transfer history</msg> <msg>%MSG%</msg>
</result> </result>
<trID> <trID>
<clTRID>ABC-12345</clTRID> <clTRID>ABC-12345</clTRID>

View file

@ -1,10 +1,9 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0"> <epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response> <response>
<result code="2200"> <result code="%CODE%">
<msg>Registrar password is incorrect</msg> <msg>%MSG%</msg>
</result> </result>
<trID> <trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID> <svTRID>server-trid</svTRID>
</trID> </trID>
</response> </response>

View file

@ -1,10 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:host="urn:ietf:params:xml:ns:host-1.0" xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1" xmlns:launch="urn:ietf:params:xml:ns:launch-1.0" xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" xmlns:rgp="urn:ietf:params:xml:ns:rgp-1.0" xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
<response>
<result code="2001">
<msg>Syntax error at line 4, column 65: cvc-complex-type.3.2.2: Attribute 'xsi:schemaLocation' is not allowed to appear in element 'epp'.</msg>
</result>
<trID>
<svTRID>ABC-12345</svTRID>
</trID>
</response>
</epp>