Set short redemption/add/delete periods for all OT&E TLDs

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=228791942
This commit is contained in:
guyben 2019-01-10 15:46:30 -08:00 committed by Ben McIlwain
parent 765e63e7e9
commit a4fca18657
7 changed files with 64 additions and 164 deletions

View file

@ -113,27 +113,9 @@ public final class OteAccountBuilder {
RegistryEnvironment.get() != RegistryEnvironment.PRODUCTION, RegistryEnvironment.get() != RegistryEnvironment.PRODUCTION,
"Can't setup OT&E in production"); "Can't setup OT&E in production");
clientIdToTld = createClientIdToTldMap(baseClientId); clientIdToTld = createClientIdToTldMap(baseClientId);
sunriseTld = sunriseTld = createTld(baseClientId + "-sunrise", TldState.START_DATE_SUNRISE, false, 0);
createTld( gaTld = createTld(baseClientId + "-ga", TldState.GENERAL_AVAILABILITY, false, 2);
baseClientId + "-sunrise", TldState.START_DATE_SUNRISE, null, null, null, false, 0); eapTld = createTld(baseClientId + "-eap", TldState.GENERAL_AVAILABILITY, true, 3);
gaTld =
createTld(
baseClientId + "-ga",
TldState.GENERAL_AVAILABILITY,
SHORT_ADD_GRACE_PERIOD,
SHORT_REDEMPTION_GRACE_PERIOD,
SHORT_PENDING_DELETE_LENGTH,
false,
2);
eapTld =
createTld(
baseClientId + "-eap",
TldState.GENERAL_AVAILABILITY,
SHORT_ADD_GRACE_PERIOD,
SHORT_REDEMPTION_GRACE_PERIOD,
SHORT_PENDING_DELETE_LENGTH,
true,
3);
registrars = registrars =
clientIdToTld.keySet().stream() clientIdToTld.keySet().stream()
.map(OteAccountBuilder::createRegistrar) .map(OteAccountBuilder::createRegistrar)
@ -294,9 +276,6 @@ public final class OteAccountBuilder {
private static Registry createTld( private static Registry createTld(
String tldName, String tldName,
TldState initialTldState, TldState initialTldState,
Duration addGracePeriod,
Duration redemptionGracePeriod,
Duration pendingDeleteLength,
boolean isEarlyAccess, boolean isEarlyAccess,
int roidSuffix) { int roidSuffix) {
String tldNameAlphaNumerical = tldName.replaceAll("[^a-z0-9]", ""); String tldNameAlphaNumerical = tldName.replaceAll("[^a-z0-9]", "");
@ -313,16 +292,10 @@ public final class OteAccountBuilder {
String.format( String.format(
"%S%X", "%S%X",
tldNameAlphaNumerical.substring(0, Math.min(tldNameAlphaNumerical.length(), 7)), tldNameAlphaNumerical.substring(0, Math.min(tldNameAlphaNumerical.length(), 7)),
roidSuffix)); roidSuffix))
if (addGracePeriod != null) { .setAddGracePeriodLength(SHORT_ADD_GRACE_PERIOD)
builder.setAddGracePeriodLength(addGracePeriod); .setPendingDeleteLength(SHORT_PENDING_DELETE_LENGTH)
} .setRedemptionGracePeriodLength(SHORT_REDEMPTION_GRACE_PERIOD);
if (pendingDeleteLength != null) {
builder.setPendingDeleteLength(pendingDeleteLength);
}
if (redemptionGracePeriod != null) {
builder.setRedemptionGracePeriodLength(redemptionGracePeriod);
}
if (isEarlyAccess) { if (isEarlyAccess) {
builder.setEapFeeSchedule(EAP_FEE_SCHEDULE); builder.setEapFeeSchedule(EAP_FEE_SCHEDULE);
} }

View file

@ -114,7 +114,7 @@ public class OteStats {
eppInput -> eppInput.getSingleExtension(FeeCreateCommandExtension.class).isPresent()), eppInput -> eppInput.getSingleExtension(FeeCreateCommandExtension.class).isPresent()),
DOMAIN_CREATES_WITH_SEC_DNS(1, equalTo(Type.DOMAIN_CREATE), HAS_SEC_DNS), DOMAIN_CREATES_WITH_SEC_DNS(1, equalTo(Type.DOMAIN_CREATE), HAS_SEC_DNS),
DOMAIN_CREATES_WITHOUT_SEC_DNS(0, equalTo(Type.DOMAIN_CREATE), HAS_SEC_DNS.negate()), DOMAIN_CREATES_WITHOUT_SEC_DNS(0, equalTo(Type.DOMAIN_CREATE), HAS_SEC_DNS.negate()),
DOMAIN_DELETES(2, equalTo(Type.DOMAIN_DELETE)), DOMAIN_DELETES(1, equalTo(Type.DOMAIN_DELETE)),
DOMAIN_RENEWS(0, equalTo(Type.DOMAIN_RENEW)), DOMAIN_RENEWS(0, equalTo(Type.DOMAIN_RENEW)),
DOMAIN_RESTORES(1, equalTo(Type.DOMAIN_RESTORE)), DOMAIN_RESTORES(1, equalTo(Type.DOMAIN_RESTORE)),
DOMAIN_TRANSFER_APPROVES(1, equalTo(Type.DOMAIN_TRANSFER_APPROVE)), DOMAIN_TRANSFER_APPROVES(1, equalTo(Type.DOMAIN_TRANSFER_APPROVE)),

View file

@ -17,6 +17,7 @@ package google.registry.model;
import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth8.assertThat; import static com.google.common.truth.Truth8.assertThat;
import static google.registry.model.registry.Registry.TldState.GENERAL_AVAILABILITY; import static google.registry.model.registry.Registry.TldState.GENERAL_AVAILABILITY;
import static google.registry.model.registry.Registry.TldState.START_DATE_SUNRISE;
import static google.registry.testing.AppEngineRule.makeRegistrar1; import static google.registry.testing.AppEngineRule.makeRegistrar1;
import static google.registry.testing.CertificateSamples.SAMPLE_CERT; import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
import static google.registry.testing.CertificateSamples.SAMPLE_CERT_HASH; import static google.registry.testing.CertificateSamples.SAMPLE_CERT_HASH;
@ -65,25 +66,12 @@ public final class OteAccountBuilderTest {
persistPremiumList("default_sandbox_list", "sandbox,USD 1000"); persistPremiumList("default_sandbox_list", "sandbox,USD 1000");
} }
private void assertTldExists(String tld, Registry.TldState tldState) { private void assertTldExists(String tld, TldState tldState, Money eapFee) {
Registry registry = Registry.get(tld); Registry registry = Registry.get(tld);
assertThat(registry).isNotNull(); assertThat(registry).isNotNull();
assertThat(registry.getPremiumList().getName()).isEqualTo("default_sandbox_list"); assertThat(registry.getPremiumList().getName()).isEqualTo("default_sandbox_list");
assertThat(registry.getTldStateTransitions()).containsExactly(START_OF_TIME, tldState); assertThat(registry.getTldStateTransitions()).containsExactly(START_OF_TIME, tldState);
assertThat(registry.getDnsWriters()).containsExactly("VoidDnsWriter"); assertThat(registry.getDnsWriters()).containsExactly("VoidDnsWriter");
assertThat(registry.getAddGracePeriodLength()).isEqualTo(Duration.standardDays(5));
assertThat(registry.getPendingDeleteLength()).isEqualTo(Duration.standardDays(5));
assertThat(registry.getRedemptionGracePeriodLength()).isEqualTo(Duration.standardDays(30));
assertThat(registry.getEapFeeScheduleAsMap()).containsExactly(START_OF_TIME, Money.zero(USD));
}
private void assertTldExistsGa(String tld, Money eapFee) {
Registry registry = Registry.get(tld);
assertThat(registry).isNotNull();
assertThat(registry.getPremiumList().getName()).isEqualTo("default_sandbox_list");
assertThat(registry.getTldStateTransitions())
.containsExactly(START_OF_TIME, GENERAL_AVAILABILITY);
assertThat(registry.getDnsWriters()).containsExactly("VoidDnsWriter");
assertThat(registry.getAddGracePeriodLength()).isEqualTo(Duration.standardHours(1)); assertThat(registry.getAddGracePeriodLength()).isEqualTo(Duration.standardHours(1));
assertThat(registry.getPendingDeleteLength()).isEqualTo(Duration.standardMinutes(5)); assertThat(registry.getPendingDeleteLength()).isEqualTo(Duration.standardMinutes(5));
assertThat(registry.getRedemptionGracePeriodLength()).isEqualTo(Duration.standardMinutes(10)); assertThat(registry.getRedemptionGracePeriodLength()).isEqualTo(Duration.standardMinutes(10));
@ -119,9 +107,9 @@ public final class OteAccountBuilderTest {
public void testCreateOteEntities_success() { public void testCreateOteEntities_success() {
OteAccountBuilder.forClientId("myclientid").addContact("email@example.com").buildAndPersist(); OteAccountBuilder.forClientId("myclientid").addContact("email@example.com").buildAndPersist();
assertTldExists("myclientid-sunrise", TldState.START_DATE_SUNRISE); assertTldExists("myclientid-sunrise", START_DATE_SUNRISE, Money.zero(USD));
assertTldExistsGa("myclientid-ga", Money.zero(USD)); assertTldExists("myclientid-ga", GENERAL_AVAILABILITY, Money.zero(USD));
assertTldExistsGa("myclientid-eap", Money.of(USD, 100)); assertTldExists("myclientid-eap", GENERAL_AVAILABILITY, Money.of(USD, 100));
assertRegistrarExists("myclientid-1", "myclientid-sunrise"); assertRegistrarExists("myclientid-1", "myclientid-sunrise");
assertRegistrarExists("myclientid-3", "myclientid-ga"); assertRegistrarExists("myclientid-3", "myclientid-ga");
assertRegistrarExists("myclientid-4", "myclientid-ga"); assertRegistrarExists("myclientid-4", "myclientid-ga");
@ -140,9 +128,9 @@ public final class OteAccountBuilderTest {
.addContact("someone@example.com") .addContact("someone@example.com")
.buildAndPersist(); .buildAndPersist();
assertTldExists("myclientid-sunrise", TldState.START_DATE_SUNRISE); assertTldExists("myclientid-sunrise", START_DATE_SUNRISE, Money.zero(USD));
assertTldExistsGa("myclientid-ga", Money.zero(USD)); assertTldExists("myclientid-ga", GENERAL_AVAILABILITY, Money.zero(USD));
assertTldExistsGa("myclientid-eap", Money.of(USD, 100)); assertTldExists("myclientid-eap", GENERAL_AVAILABILITY, Money.of(USD, 100));
assertRegistrarExists("myclientid-1", "myclientid-sunrise"); assertRegistrarExists("myclientid-1", "myclientid-sunrise");
assertRegistrarExists("myclientid-3", "myclientid-ga"); assertRegistrarExists("myclientid-3", "myclientid-ga");
assertRegistrarExists("myclientid-4", "myclientid-ga"); assertRegistrarExists("myclientid-4", "myclientid-ga");
@ -237,8 +225,9 @@ public final class OteAccountBuilderTest {
} }
@Test @Test
public void testCreateOteEntities_entityExists_failsWhenNotReplaceExisting() { public void testCreateOteEntities_registrarExists_failsWhenNotReplaceExisting() {
persistSimpleResource(makeRegistrar1().asBuilder().setClientId("myclientid-1").build()); persistSimpleResource(makeRegistrar1().asBuilder().setClientId("myclientid-1").build());
OteAccountBuilder oteSetupHelper = OteAccountBuilder.forClientId("myclientid"); OteAccountBuilder oteSetupHelper = OteAccountBuilder.forClientId("myclientid");
assertThat(assertThrows(IllegalStateException.class, () -> oteSetupHelper.buildAndPersist())) assertThat(assertThrows(IllegalStateException.class, () -> oteSetupHelper.buildAndPersist()))
@ -247,15 +236,29 @@ public final class OteAccountBuilderTest {
} }
@Test @Test
public void testCreateOteEntities_entityExists_succeedsWhenReplaceExisting() { public void testCreateOteEntities_tldExists_failsWhenNotReplaceExisting() {
persistSimpleResource(makeRegistrar1().asBuilder().setClientId("myclientid-4").build()); createTld("myclientid-ga", START_DATE_SUNRISE);
createTld("myclientid-ga", GENERAL_AVAILABILITY);
OteAccountBuilder oteSetupHelper = OteAccountBuilder.forClientId("myclientid");
assertThat(assertThrows(IllegalStateException.class, () -> oteSetupHelper.buildAndPersist()))
.hasMessageThat()
.contains("Found existing object(s) conflicting with OT&E objects");
}
@Test
public void testCreateOteEntities_entitiesExist_succeedsWhenReplaceExisting() {
persistSimpleResource(makeRegistrar1().asBuilder().setClientId("myclientid-1").build());
// we intentionally create the -ga TLD with the wrong state, to make sure it's overwritten.
createTld("myclientid-ga", START_DATE_SUNRISE);
OteAccountBuilder.forClientId("myclientid").setReplaceExisting(true).buildAndPersist(); OteAccountBuilder.forClientId("myclientid").setReplaceExisting(true).buildAndPersist();
assertTldExistsGa("myclientid-ga", Money.zero(USD)); // Just checking a sample of the resulting entities to make sure it indeed succeeded. The full
// entities are checked in other tests
assertTldExists("myclientid-ga", GENERAL_AVAILABILITY, Money.zero(USD));
assertRegistrarExists("myclientid-1", "myclientid-sunrise");
assertRegistrarExists("myclientid-3", "myclientid-ga"); assertRegistrarExists("myclientid-3", "myclientid-ga");
assertRegistrarExists("myclientid-4", "myclientid-ga");
} }
@Test @Test

View file

@ -38,7 +38,7 @@ public final class OteStatsTest {
public void testSuccess_allPass() { public void testSuccess_allPass() {
OteStats stats = OteStats.getFromRegistrar("blobio"); OteStats stats = OteStats.getFromRegistrar("blobio");
assertThat(stats.getFailures()).isEmpty(); assertThat(stats.getFailures()).isEmpty();
assertThat(stats.getSize()).isEqualTo(31); assertThat(stats.getSize()).isEqualTo(30);
} }
@Test @Test
@ -51,7 +51,7 @@ public final class OteStatsTest {
.containsExactly( .containsExactly(
StatType.DOMAIN_CREATES_IDN, StatType.DOMAIN_RESTORES, StatType.HOST_DELETES) StatType.DOMAIN_CREATES_IDN, StatType.DOMAIN_RESTORES, StatType.HOST_DELETES)
.inOrder(); .inOrder();
assertThat(stats.getSize()).isEqualTo(35); assertThat(stats.getSize()).isEqualTo(34);
} }
@Test @Test
@ -74,7 +74,7 @@ public final class OteStatsTest {
+ "domain creates with fee: 1\n" + "domain creates with fee: 1\n"
+ "domain creates with sec dns: 1\n" + "domain creates with sec dns: 1\n"
+ "domain creates without sec dns: 4\n" + "domain creates without sec dns: 4\n"
+ "domain deletes: 2\n" + "domain deletes: 1\n"
+ "domain renews: 0\n" + "domain renews: 0\n"
+ "domain restores: 1\n" + "domain restores: 1\n"
+ "domain transfer approves: 1\n" + "domain transfer approves: 1\n"
@ -90,7 +90,7 @@ public final class OteStatsTest {
+ "host deletes: 1\n" + "host deletes: 1\n"
+ "host updates: 1\n" + "host updates: 1\n"
+ "unclassified flows: 0\n" + "unclassified flows: 0\n"
+ "TOTAL: 31"; + "TOTAL: 30";
assertThat(stats.toString()).isEqualTo(expected); assertThat(stats.toString()).isEqualTo(expected);
} }
@ -115,7 +115,7 @@ public final class OteStatsTest {
+ "domain creates with fee: 1\n" + "domain creates with fee: 1\n"
+ "domain creates with sec dns: 1\n" + "domain creates with sec dns: 1\n"
+ "domain creates without sec dns: 4\n" + "domain creates without sec dns: 4\n"
+ "domain deletes: 2\n" + "domain deletes: 1\n"
+ "domain renews: 0\n" + "domain renews: 0\n"
+ "domain restores: 1\n" + "domain restores: 1\n"
+ "domain transfer approves: 1\n" + "domain transfer approves: 1\n"
@ -131,7 +131,7 @@ public final class OteStatsTest {
+ "host deletes: 0\n" + "host deletes: 0\n"
+ "host updates: 10\n" + "host updates: 10\n"
+ "unclassified flows: 0\n" + "unclassified flows: 0\n"
+ "TOTAL: 39"; + "TOTAL: 38";
assertThat(stats.toString()).isEqualTo(expected); assertThat(stats.toString()).isEqualTo(expected);
} }
} }

View file

@ -70,12 +70,6 @@ public final class OteStatsTestHelper {
.setType(Type.DOMAIN_DELETE) .setType(Type.DOMAIN_DELETE)
.setXmlBytes(getBytes("domain_delete.xml")) .setXmlBytes(getBytes("domain_delete.xml"))
.build()); .build());
persistResource(
new HistoryEntry.Builder()
.setClientId("blobio-3")
.setType(Type.DOMAIN_DELETE)
.setXmlBytes(getBytes("domain_delete.xml"))
.build());
domainRestoreHistoryEntry = domainRestoreHistoryEntry =
persistResource( persistResource(
new HistoryEntry.Builder() new HistoryEntry.Builder()
@ -109,13 +103,13 @@ public final class OteStatsTestHelper {
.build()); .build());
persistResource( persistResource(
new HistoryEntry.Builder() new HistoryEntry.Builder()
.setClientId("blobio-4") .setClientId("blobio-1")
.setType(Type.DOMAIN_UPDATE) .setType(Type.DOMAIN_UPDATE)
.setXmlBytes(getBytes("domain_update_with_secdns.xml")) .setXmlBytes(getBytes("domain_update_with_secdns.xml"))
.build()); .build());
persistResource( persistResource(
new HistoryEntry.Builder() new HistoryEntry.Builder()
.setClientId("blobio-5") .setClientId("blobio-1")
.setType(Type.HOST_CREATE) .setType(Type.HOST_CREATE)
.setXmlBytes(getBytes("host_create_complete.xml")) .setXmlBytes(getBytes("host_create_complete.xml"))
.build()); .build());

View file

@ -66,9 +66,6 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
String tldName, String tldName,
String roidSuffix, String roidSuffix,
TldState tldState, TldState tldState,
Duration addGracePeriodLength,
Duration redemptionGracePeriodLength,
Duration pendingDeleteLength,
boolean isEarlyAccess) { boolean isEarlyAccess) {
Registry registry = Registry.get(tldName); Registry registry = Registry.get(tldName);
assertThat(registry).isNotNull(); assertThat(registry).isNotNull();
@ -77,9 +74,9 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
assertThat(registry.getDnsWriters()).containsExactly("VoidDnsWriter"); assertThat(registry.getDnsWriters()).containsExactly("VoidDnsWriter");
assertThat(registry.getPremiumList()).isNotNull(); assertThat(registry.getPremiumList()).isNotNull();
assertThat(registry.getPremiumList().getName()).isEqualTo("default_sandbox_list"); assertThat(registry.getPremiumList().getName()).isEqualTo("default_sandbox_list");
assertThat(registry.getAddGracePeriodLength()).isEqualTo(addGracePeriodLength); assertThat(registry.getAddGracePeriodLength()).isEqualTo(Duration.standardMinutes(60));
assertThat(registry.getRedemptionGracePeriodLength()).isEqualTo(redemptionGracePeriodLength); assertThat(registry.getRedemptionGracePeriodLength()).isEqualTo(Duration.standardMinutes(10));
assertThat(registry.getPendingDeleteLength()).isEqualTo(pendingDeleteLength); assertThat(registry.getPendingDeleteLength()).isEqualTo(Duration.standardMinutes(5));
ImmutableSortedMap<DateTime, Money> eapFeeSchedule = registry.getEapFeeScheduleAsMap(); ImmutableSortedMap<DateTime, Money> eapFeeSchedule = registry.getEapFeeScheduleAsMap();
if (!isEarlyAccess) { if (!isEarlyAccess) {
assertThat(eapFeeSchedule) assertThat(eapFeeSchedule)
@ -97,19 +94,6 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
} }
} }
/** Verify TLD creation with registry default durations. */
private void verifyTldCreation(
String tldName, String roidSuffix, TldState tldState) {
verifyTldCreation(
tldName,
roidSuffix,
tldState,
Registry.DEFAULT_ADD_GRACE_PERIOD,
Registry.DEFAULT_REDEMPTION_GRACE_PERIOD,
Registry.DEFAULT_PENDING_DELETE_LENGTH,
false);
}
private void verifyRegistrarCreation( private void verifyRegistrarCreation(
String registrarName, String registrarName,
String allowedTld, String allowedTld,
@ -156,22 +140,9 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
"--email=contact@email.com", "--email=contact@email.com",
"--certfile=" + getCertFilename()); "--certfile=" + getCertFilename());
verifyTldCreation("blobio-sunrise", "BLOBIOS0", START_DATE_SUNRISE); verifyTldCreation("blobio-sunrise", "BLOBIOS0", START_DATE_SUNRISE, false);
verifyTldCreation("blobio-ga", verifyTldCreation("blobio-ga", "BLOBIOG2", GENERAL_AVAILABILITY, false);
"BLOBIOG2", verifyTldCreation("blobio-eap", "BLOBIOE3", GENERAL_AVAILABILITY, true);
GENERAL_AVAILABILITY,
Duration.standardMinutes(60),
Duration.standardMinutes(10),
Duration.standardMinutes(5),
false);
verifyTldCreation(
"blobio-eap",
"BLOBIOE3",
GENERAL_AVAILABILITY,
Duration.standardMinutes(60),
Duration.standardMinutes(10),
Duration.standardMinutes(5),
true);
ImmutableList<CidrAddressBlock> ipAddress = ImmutableList.of( ImmutableList<CidrAddressBlock> ipAddress = ImmutableList.of(
CidrAddressBlock.create("1.1.1.1")); CidrAddressBlock.create("1.1.1.1"));
@ -195,22 +166,9 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
"--email=abc@email.com", "--email=abc@email.com",
"--certfile=" + getCertFilename()); "--certfile=" + getCertFilename());
verifyTldCreation("abc-sunrise", "ABCSUNR0", START_DATE_SUNRISE); verifyTldCreation("abc-sunrise", "ABCSUNR0", START_DATE_SUNRISE, false);
verifyTldCreation("abc-ga", verifyTldCreation("abc-ga", "ABCGA2", GENERAL_AVAILABILITY, false);
"ABCGA2", verifyTldCreation("abc-eap", "ABCEAP3", GENERAL_AVAILABILITY, true);
GENERAL_AVAILABILITY,
Duration.standardMinutes(60),
Duration.standardMinutes(10),
Duration.standardMinutes(5),
false);
verifyTldCreation(
"abc-eap",
"ABCEAP3",
GENERAL_AVAILABILITY,
Duration.standardMinutes(60),
Duration.standardMinutes(10),
Duration.standardMinutes(5),
true);
ImmutableList<CidrAddressBlock> ipAddress = ImmutableList<CidrAddressBlock> ipAddress =
ImmutableList.of(CidrAddressBlock.create("1.1.1.1")); ImmutableList.of(CidrAddressBlock.create("1.1.1.1"));
@ -234,14 +192,7 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
"--email=contact@email.com", "--email=contact@email.com",
"--certhash=" + SAMPLE_CERT_HASH); "--certhash=" + SAMPLE_CERT_HASH);
verifyTldCreation( verifyTldCreation("blobio-eap", "BLOBIOE3", GENERAL_AVAILABILITY, true);
"blobio-eap",
"BLOBIOE3",
GENERAL_AVAILABILITY,
Duration.standardMinutes(60),
Duration.standardMinutes(10),
Duration.standardMinutes(5),
true);
ImmutableList<CidrAddressBlock> ipAddress = ImmutableList<CidrAddressBlock> ipAddress =
ImmutableList.of(CidrAddressBlock.create("1.1.1.1")); ImmutableList.of(CidrAddressBlock.create("1.1.1.1"));
@ -259,23 +210,9 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
"--email=contact@email.com", "--email=contact@email.com",
"--certfile=" + getCertFilename()); "--certfile=" + getCertFilename());
verifyTldCreation("blobio-sunrise", "BLOBIOS0", START_DATE_SUNRISE); verifyTldCreation("blobio-sunrise", "BLOBIOS0", START_DATE_SUNRISE, false);
verifyTldCreation( verifyTldCreation("blobio-ga", "BLOBIOG2", GENERAL_AVAILABILITY, false);
"blobio-ga", verifyTldCreation("blobio-eap", "BLOBIOE3", GENERAL_AVAILABILITY, true);
"BLOBIOG2",
GENERAL_AVAILABILITY,
Duration.standardMinutes(60),
Duration.standardMinutes(10),
Duration.standardMinutes(5),
false);
verifyTldCreation(
"blobio-eap",
"BLOBIOE3",
GENERAL_AVAILABILITY,
Duration.standardMinutes(60),
Duration.standardMinutes(10),
Duration.standardMinutes(5),
true);
ImmutableList<CidrAddressBlock> ipAddresses = ImmutableList.of( ImmutableList<CidrAddressBlock> ipAddresses = ImmutableList.of(
CidrAddressBlock.create("1.1.1.1"), CidrAddressBlock.create("1.1.1.1"),
@ -461,15 +398,8 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
"--email=contact@email.com", "--email=contact@email.com",
"--certfile=" + getCertFilename()); "--certfile=" + getCertFilename());
verifyTldCreation("blobio-sunrise", "BLOBIOS0", START_DATE_SUNRISE); verifyTldCreation("blobio-sunrise", "BLOBIOS0", START_DATE_SUNRISE, false);
verifyTldCreation( verifyTldCreation("blobio-ga", "BLOBIOG2", GENERAL_AVAILABILITY, false);
"blobio-ga",
"BLOBIOG2",
GENERAL_AVAILABILITY,
Duration.standardMinutes(60),
Duration.standardMinutes(10),
Duration.standardMinutes(5),
false);
} }
@Test @Test

View file

@ -44,7 +44,7 @@ public class VerifyOteActionTest {
@Test @Test
public void testSuccess_summarize_allPass() { public void testSuccess_summarize_allPass() {
assertThat(getResponse(true)) assertThat(getResponse(true))
.isEqualTo("# actions: 31 - Reqs: [----------------] 16/16 - Overall: PASS"); .isEqualTo("# actions: 30 - Reqs: [----------------] 16/16 - Overall: PASS");
} }
@Test @Test
@ -53,7 +53,7 @@ public class VerifyOteActionTest {
OteStatsTestHelper.deleteDomainRestoreHistoryEntry(); OteStatsTestHelper.deleteDomainRestoreHistoryEntry();
OteStatsTestHelper.deleteHostDeleteHistoryEntry(); OteStatsTestHelper.deleteHostDeleteHistoryEntry();
assertThat(getResponse(true)) assertThat(getResponse(true))
.isEqualTo("# actions: 35 - Reqs: [-.-----.------.-] 13/16 - Overall: FAIL"); .isEqualTo("# actions: 34 - Reqs: [-.-----.------.-] 13/16 - Overall: FAIL");
} }
@Test @Test
@ -65,7 +65,7 @@ public class VerifyOteActionTest {
+ "domain creates with fee: 1\n" + "domain creates with fee: 1\n"
+ "domain creates with sec dns: 1\n" + "domain creates with sec dns: 1\n"
+ ".*" + ".*"
+ "domain deletes: 2\n" + "domain deletes: 1\n"
+ ".*" + ".*"
+ "domain restores: 1\n" + "domain restores: 1\n"
+ "domain transfer approves: 1\n" + "domain transfer approves: 1\n"
@ -95,7 +95,7 @@ public class VerifyOteActionTest {
+ "domain creates with fee: 1\n" + "domain creates with fee: 1\n"
+ "domain creates with sec dns: 1\n" + "domain creates with sec dns: 1\n"
+ ".*" + ".*"
+ "domain deletes: 2\n" + "domain deletes: 1\n"
+ ".*" + ".*"
+ "domain restores: 1\n" + "domain restores: 1\n"
+ "domain transfer approves: 1\n" + "domain transfer approves: 1\n"