mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 16:37:13 +02:00
Delete end-date sunrise, landrush, and sunrush phases
This also deletes the associated commands and domain application specific entities. We haven't used any of these TLD phases since early 2015 and have no intent to do so in the future, so it makes sense to delete them now so we don't have to carry them through the Registry 3.0 migration. Note that, while there are data model changes, there should be no required data migrations. The fields and entities being removed will simply remain as orphans. I confirmed that the removed types (such as the SUNRUSH_ADD GracePeriodType) are no longer used in production data, and left types that are still used, e.g. BillingEvent.Flag.LANDRUSH or HistoryEntry.Type.ALLOCATE. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=228752843
This commit is contained in:
parent
c74ffd7559
commit
580302898d
282 changed files with 344 additions and 17634 deletions
|
@ -36,11 +36,9 @@ import static google.registry.testing.DatastoreHelper.deleteTld;
|
|||
import static google.registry.testing.DatastoreHelper.getHistoryEntries;
|
||||
import static google.registry.testing.DatastoreHelper.loadRegistrar;
|
||||
import static google.registry.testing.DatastoreHelper.newContactResource;
|
||||
import static google.registry.testing.DatastoreHelper.newDomainApplication;
|
||||
import static google.registry.testing.DatastoreHelper.newHostResource;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveContact;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveDomain;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveDomainApplication;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveHost;
|
||||
import static google.registry.testing.DatastoreHelper.persistDeletedDomain;
|
||||
import static google.registry.testing.DatastoreHelper.persistReservedList;
|
||||
|
@ -72,7 +70,6 @@ import google.registry.flows.EppRequestSource;
|
|||
import google.registry.flows.ExtensionManager.UndeclaredServiceExtensionException;
|
||||
import google.registry.flows.ResourceFlowTestCase;
|
||||
import google.registry.flows.domain.DomainCreateFlow.AnchorTenantCreatePeriodException;
|
||||
import google.registry.flows.domain.DomainCreateFlow.DomainHasOpenApplicationsException;
|
||||
import google.registry.flows.domain.DomainCreateFlow.MustHaveSignedMarksInCurrentPhaseException;
|
||||
import google.registry.flows.domain.DomainCreateFlow.NoGeneralRegistrationsInCurrentPhaseException;
|
||||
import google.registry.flows.domain.DomainCreateFlow.SignedMarksOnlyDuringSunriseException;
|
||||
|
@ -138,7 +135,6 @@ import google.registry.model.billing.BillingEvent.Flag;
|
|||
import google.registry.model.billing.BillingEvent.Reason;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.domain.GracePeriod;
|
||||
import google.registry.model.domain.launch.ApplicationStatus;
|
||||
import google.registry.model.domain.launch.LaunchNotice;
|
||||
import google.registry.model.domain.rgp.GracePeriodStatus;
|
||||
import google.registry.model.domain.secdns.DelegationSignerData;
|
||||
|
@ -1179,35 +1175,6 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
assertThat(thrown).hasMessageThat().contains("ns2.example.net");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_openApplication() throws Exception {
|
||||
persistContactsAndHosts();
|
||||
persistActiveDomainApplication(getUniqueIdFromCommand());
|
||||
clock.advanceOneMilli();
|
||||
EppException thrown = assertThrows(DomainHasOpenApplicationsException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_superuserOpenApplication() throws Exception {
|
||||
persistContactsAndHosts();
|
||||
persistActiveDomainApplication(getUniqueIdFromCommand());
|
||||
doSuccessfulTest(
|
||||
"tld", "domain_create_response.xml", SUPERUSER, ImmutableMap.of("DOMAIN", "example.tld"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_rejectedApplication() throws Exception {
|
||||
persistContactsAndHosts();
|
||||
persistResource(
|
||||
newDomainApplication(getUniqueIdFromCommand())
|
||||
.asBuilder()
|
||||
.setApplicationStatus(ApplicationStatus.REJECTED)
|
||||
.build());
|
||||
clock.advanceOneMilli();
|
||||
doSuccessfulTest();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_missingContact() {
|
||||
persistActiveHost("ns1.example.net");
|
||||
|
@ -1251,33 +1218,6 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_sunrise() {
|
||||
createTld("tld", TldState.SUNRISE);
|
||||
persistContactsAndHosts();
|
||||
EppException thrown =
|
||||
assertThrows(NoGeneralRegistrationsInCurrentPhaseException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_sunrush() {
|
||||
createTld("tld", TldState.SUNRUSH);
|
||||
persistContactsAndHosts();
|
||||
EppException thrown =
|
||||
assertThrows(NoGeneralRegistrationsInCurrentPhaseException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_landrush() {
|
||||
createTld("tld", TldState.LANDRUSH);
|
||||
persistContactsAndHosts();
|
||||
EppException thrown =
|
||||
assertThrows(NoGeneralRegistrationsInCurrentPhaseException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_startDateSunrise_missingLaunchExtension() {
|
||||
createTld("tld", START_DATE_SUNRISE);
|
||||
|
@ -1304,14 +1244,6 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
"tld", "domain_create_response.xml", SUPERUSER, ImmutableMap.of("DOMAIN", "example.tld"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_superuserSunrush() throws Exception {
|
||||
createTld("tld", TldState.SUNRUSH);
|
||||
persistContactsAndHosts();
|
||||
doSuccessfulTest(
|
||||
"tld", "domain_create_response.xml", SUPERUSER, ImmutableMap.of("DOMAIN", "example.tld"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_superuserStartDateSunrise_isSuperuser() throws Exception {
|
||||
createTld("tld", START_DATE_SUNRISE);
|
||||
|
@ -1446,22 +1378,6 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that a sunrise registration fails with the correct error during end-date sunrise.
|
||||
*
|
||||
* <p>Makes sure that a sunrise registration without signed mark during end-date sunrise fails
|
||||
* with the "wrong phase" error rather than the "missing signed mark" error.
|
||||
*/
|
||||
@Test
|
||||
public void testFailure_registrationDuringEndDateSunrise_wrongPhase() {
|
||||
createTld("tld", TldState.SUNRISE);
|
||||
setEppInput("domain_create_registration_sunrise.xml");
|
||||
persistContactsAndHosts();
|
||||
EppException thrown =
|
||||
assertThrows(NoGeneralRegistrationsInCurrentPhaseException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_expiredClaim() {
|
||||
clock.setTo(DateTime.parse("2010-08-17T09:00:00.0Z"));
|
||||
|
@ -1716,64 +1632,6 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
doFailingDomainNameTest("xn--k3hel9n7bxlu1e.tld", InvalidIdnDomainLabelException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_sunriseRegistration() {
|
||||
createTld("tld", TldState.SUNRISE);
|
||||
setEppInput("domain_create_registration_sunrise.xml");
|
||||
persistContactsAndHosts();
|
||||
EppException thrown =
|
||||
assertThrows(NoGeneralRegistrationsInCurrentPhaseException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_superuserSunriseRegistration() throws Exception {
|
||||
createTld("tld", TldState.SUNRISE);
|
||||
setEppInput("domain_create_registration_sunrise.xml");
|
||||
persistContactsAndHosts();
|
||||
doSuccessfulTest(
|
||||
"tld", "domain_create_response.xml", SUPERUSER, ImmutableMap.of("DOMAIN", "example.tld"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_qlpSunriseRegistration() throws Exception {
|
||||
createTld("tld", TldState.SUNRISE);
|
||||
setEppInput("domain_create_registration_qlp_sunrise.xml");
|
||||
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
||||
persistContactsAndHosts();
|
||||
runFlowAssertResponse(
|
||||
loadFile("domain_create_response.xml", ImmutableMap.of("DOMAIN", "example.tld")));
|
||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT));
|
||||
assertNoLordn();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_qlpSunriseRegistration_withEncodedSignedMark() throws Exception {
|
||||
createTld("tld", TldState.SUNRISE);
|
||||
clock.setTo(DateTime.parse("2014-09-09T09:09:09Z"));
|
||||
setEppInput("domain_create_registration_qlp_sunrise_encoded_signed_mark.xml");
|
||||
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
||||
persistContactsAndHosts();
|
||||
runFlowAssertResponse(
|
||||
loadFile(
|
||||
"domain_create_response_encoded_signed_mark_name.xml",
|
||||
ImmutableMap.of("DOMAIN", "test-validate.tld")));
|
||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT, Flag.SUNRISE));
|
||||
assertSunriseLordn("test-validate.tld");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_qlpSunriseRegistration_withClaimsNotice() throws Exception {
|
||||
createTld("tld", TldState.SUNRISE);
|
||||
clock.setTo(DateTime.parse("2009-08-16T09:00:00.0Z"));
|
||||
setEppInput("domain_create_registration_qlp_sunrise_claims_notice.xml");
|
||||
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
||||
persistContactsAndHosts();
|
||||
runFlowAssertResponse(loadFile("domain_create_response_claims.xml"));
|
||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT));
|
||||
assertClaimsLordn();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_startDateSunriseRegistration_missingSignedMark() {
|
||||
createTld("tld", START_DATE_SUNRISE);
|
||||
|
@ -1823,9 +1681,6 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
|
||||
/**
|
||||
* Test that missing type= argument on launch create works in start-date sunrise.
|
||||
*
|
||||
* <p>TODO(b/76095570):have the same exact test on end-date sunrise - using the same .xml file -
|
||||
* that checks that an application was created.
|
||||
*/
|
||||
@Test
|
||||
public void testSuccess_startDateSunriseRegistration_withEncodedSignedMark_noType()
|
||||
|
@ -1842,20 +1697,6 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
assertSunriseLordn("test-validate.tld");
|
||||
}
|
||||
|
||||
/** Tests possible confusion caused by the common start-date and end-date sunrise LaunchPhase. */
|
||||
@Test
|
||||
public void testFail_sunriseRegistration_withEncodedSignedMark() {
|
||||
createTld("tld", TldState.SUNRISE);
|
||||
clock.setTo(DateTime.parse("2014-09-09T09:09:09Z"));
|
||||
setEppInput(
|
||||
"domain_create_registration_encoded_signed_mark.xml",
|
||||
ImmutableMap.of("DOMAIN", "test-validate.tld", "PHASE", "sunrise"));
|
||||
persistContactsAndHosts();
|
||||
EppException thrown =
|
||||
assertThrows(NoGeneralRegistrationsInCurrentPhaseException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFail_startDateSunriseRegistration_wrongEncodedSignedMark() {
|
||||
createTld("tld", START_DATE_SUNRISE);
|
||||
|
@ -1905,16 +1746,6 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_sunrushRegistration() {
|
||||
createTld("tld", TldState.SUNRUSH);
|
||||
setEppInput("domain_create_registration_sunrush.xml");
|
||||
persistContactsAndHosts();
|
||||
EppException thrown =
|
||||
assertThrows(NoGeneralRegistrationsInCurrentPhaseException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_notAuthorizedForTld() {
|
||||
createTld("irrelevant", "IRR");
|
||||
|
@ -1928,109 +1759,6 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_superuserSunrushRegistration() throws Exception {
|
||||
createTld("tld", TldState.SUNRUSH);
|
||||
setEppInput("domain_create_registration_sunrush.xml");
|
||||
persistContactsAndHosts();
|
||||
doSuccessfulTest(
|
||||
"tld", "domain_create_response.xml", SUPERUSER, ImmutableMap.of("DOMAIN", "example.tld"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_qlpSunrushRegistration() throws Exception {
|
||||
createTld("tld", TldState.SUNRUSH);
|
||||
setEppInput("domain_create_registration_qlp_sunrush.xml");
|
||||
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
||||
persistContactsAndHosts();
|
||||
runFlowAssertResponse(
|
||||
loadFile("domain_create_response.xml", ImmutableMap.of("DOMAIN", "example.tld")));
|
||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT));
|
||||
assertNoLordn();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_qlpSunrushRegistration_withEncodedSignedMark() throws Exception {
|
||||
createTld("tld", TldState.SUNRUSH);
|
||||
clock.setTo(DateTime.parse("2014-09-09T09:09:09Z"));
|
||||
setEppInput("domain_create_registration_qlp_sunrush_encoded_signed_mark.xml");
|
||||
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
||||
persistContactsAndHosts();
|
||||
runFlowAssertResponse(
|
||||
loadFile(
|
||||
"domain_create_response_encoded_signed_mark_name.xml",
|
||||
ImmutableMap.of("DOMAIN", "test-validate.tld")));
|
||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT, Flag.SUNRISE));
|
||||
assertSunriseLordn("test-validate.tld");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_qlpSunrushRegistration_withClaimsNotice() throws Exception {
|
||||
createTld("tld", TldState.SUNRUSH);
|
||||
clock.setTo(DateTime.parse("2009-08-16T09:00:00.0Z"));
|
||||
setEppInput("domain_create_registration_qlp_sunrush_claims_notice.xml");
|
||||
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
||||
persistContactsAndHosts();
|
||||
runFlowAssertResponse(loadFile("domain_create_response_claims.xml"));
|
||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT));
|
||||
assertClaimsLordn();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_landrushRegistration() {
|
||||
createTld("tld", TldState.LANDRUSH);
|
||||
setEppInput("domain_create_registration_landrush.xml");
|
||||
persistContactsAndHosts();
|
||||
EppException thrown =
|
||||
assertThrows(NoGeneralRegistrationsInCurrentPhaseException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_superuserLandrushRegistration() throws Exception {
|
||||
createTld("tld", TldState.LANDRUSH);
|
||||
setEppInput("domain_create_registration_landrush.xml");
|
||||
persistContactsAndHosts();
|
||||
doSuccessfulTest(
|
||||
"tld", "domain_create_response.xml", SUPERUSER, ImmutableMap.of("DOMAIN", "example.tld"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_qlpLandrushRegistration() throws Exception {
|
||||
createTld("tld", TldState.LANDRUSH);
|
||||
setEppInput("domain_create_registration_qlp_landrush.xml");
|
||||
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
||||
persistContactsAndHosts();
|
||||
runFlowAssertResponse(
|
||||
loadFile("domain_create_response.xml", ImmutableMap.of("DOMAIN", "example.tld")));
|
||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT));
|
||||
assertNoLordn();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_qlpLandrushRegistration_withEncodedSignedMark() {
|
||||
createTld("tld", TldState.LANDRUSH);
|
||||
clock.setTo(DateTime.parse("2014-09-09T09:09:09Z"));
|
||||
setEppInput("domain_create_registration_qlp_landrush_encoded_signed_mark.xml");
|
||||
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
||||
persistContactsAndHosts();
|
||||
EppException thrown =
|
||||
assertThrows(SignedMarksOnlyDuringSunriseException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_qlpLandrushRegistration_withClaimsNotice() throws Exception {
|
||||
createTld("tld", TldState.LANDRUSH);
|
||||
clock.setTo(DateTime.parse("2009-08-16T09:00:00.0Z"));
|
||||
setEppInput("domain_create_registration_qlp_landrush_claims_notice.xml");
|
||||
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
||||
persistContactsAndHosts();
|
||||
runFlowAssertResponse(loadFile("domain_create_response_claims.xml"));
|
||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT));
|
||||
assertClaimsLordn();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_registrantNotWhitelisted() {
|
||||
persistActiveContact("someone");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue