mirror of
https://github.com/google/nomulus.git
synced 2025-05-16 09:27:16 +02:00
Disallow renaming of external hosts
EPP host spec section 3.2.5 requires that attempts to update hosts that are linked to different registrars must fail with error code 2305. This is complicated to do, as linked status is eventually consistent, and even more painful when checking links to those of different registrars. This change forbids external-to-anything renames entirely. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=150336754
This commit is contained in:
parent
e1c9395749
commit
443e260f91
23 changed files with 357 additions and 156 deletions
|
@ -102,7 +102,7 @@ public class EppLifecycleDomainTest extends EppTestCase {
|
|||
// Verify that nameserver's data was set correctly.
|
||||
assertCommandAndResponse(
|
||||
"host_info_fakesite.xml",
|
||||
"host_info_response_fakesite.xml",
|
||||
"host_info_response_fakesite_linked.xml",
|
||||
DateTime.parse("2000-06-08T00:02:00Z"));
|
||||
}
|
||||
|
||||
|
@ -219,6 +219,19 @@ public class EppLifecycleDomainTest extends EppTestCase {
|
|||
public void testDeletionOfDomain_afterUpdateThatCreatesSubordinateHost_fails() throws Exception {
|
||||
assertCommandAndResponse("login_valid.xml", "login_response.xml");
|
||||
createFakesite();
|
||||
|
||||
// Create domain example.tld.
|
||||
assertCommandAndResponse(
|
||||
"domain_create_no_hosts_or_dsdata.xml",
|
||||
"domain_create_response_superordinate.xml",
|
||||
DateTime.parse("2000-06-02T00:00:00Z"));
|
||||
|
||||
// Create nameserver ns1.example.tld
|
||||
assertCommandAndResponse(
|
||||
"host_create_example.xml",
|
||||
"host_create_response_example.xml",
|
||||
DateTime.parse("2000-06-02T00:01:00Z"));
|
||||
|
||||
// Update the ns1 host to be on the fakesite.example domain.
|
||||
assertCommandAndResponse(
|
||||
"host_update_ns1_to_fakesite.xml",
|
||||
|
@ -243,32 +256,6 @@ public class EppLifecycleDomainTest extends EppTestCase {
|
|||
assertCommandAndResponse("logout.xml", "logout_response.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRenamingHostToExistingHost_fails() throws Exception {
|
||||
assertCommandAndResponse("login_valid.xml", "login_response.xml");
|
||||
// Create the two hosts.
|
||||
assertCommandAndResponse(
|
||||
"host_create.xml", "host_create_response.xml", DateTime.parse("2000-06-01T00:02:00Z"));
|
||||
assertCommandAndResponse(
|
||||
"host_create2.xml", "host_create2_response.xml", DateTime.parse("2000-06-01T00:03:00Z"));
|
||||
// Verify that host1 and host2 were created as we expect them.
|
||||
assertCommandAndResponse(
|
||||
"host_info_ns1.xml", "host_info_response_ns1.xml", DateTime.parse("2000-06-01T00:04:00Z"));
|
||||
assertCommandAndResponse(
|
||||
"host_info_ns2.xml", "host_info_response_ns2.xml", DateTime.parse("2000-06-01T00:05:00Z"));
|
||||
// Attempt overwriting of host1 on top of host2 (and verify that it fails).
|
||||
assertCommandAndResponse(
|
||||
"host_update_ns1_to_ns2.xml",
|
||||
"host_update_failed_response.xml",
|
||||
DateTime.parse("2000-06-01T00:06:00Z"));
|
||||
// Verify that host1 and host2 still exist in their unmodified states.
|
||||
assertCommandAndResponse(
|
||||
"host_info_ns1.xml", "host_info_response_ns1.xml", DateTime.parse("2000-06-01T00:07:00Z"));
|
||||
assertCommandAndResponse(
|
||||
"host_info_ns2.xml", "host_info_response_ns2.xml", DateTime.parse("2000-06-01T00:08:00Z"));
|
||||
assertCommandAndResponse("logout.xml", "logout_response.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDomainCreation_failsBeforeSunrise() throws Exception {
|
||||
DateTime sunriseDate = DateTime.parse("2000-05-30T00:00:00Z");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue