mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Update OT&E command to support requirements for .app launch
Changed SUNRISE to START_SUNRISE and added a registry/registrar pair for testing EAP. The EAP period is set to 2018-03-01 to 2022-03-01 with a price of $100. A temporary flag is added to only create EAP registry/registrar pair so that we can update existing registrars. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=187897405
This commit is contained in:
parent
2b9becf4d0
commit
1013ef9bc0
3 changed files with 201 additions and 37 deletions
|
@ -603,7 +603,7 @@ public class Registry extends ImmutableObject implements Buildable {
|
||||||
|
|
||||||
/** Returns the EAP fee for the registry at the given time. */
|
/** Returns the EAP fee for the registry at the given time. */
|
||||||
public Fee getEapFeeFor(DateTime now) {
|
public Fee getEapFeeFor(DateTime now) {
|
||||||
ImmutableSortedMap<DateTime, Money> valueMap = eapFeeSchedule.toValueMap();
|
ImmutableSortedMap<DateTime, Money> valueMap = getEapFeeScheduleAsMap();
|
||||||
DateTime periodStart = valueMap.floorKey(now);
|
DateTime periodStart = valueMap.floorKey(now);
|
||||||
DateTime periodEnd = valueMap.ceilingKey(now);
|
DateTime periodEnd = valueMap.ceilingKey(now);
|
||||||
// NOTE: assuming END_OF_TIME would never be reached...
|
// NOTE: assuming END_OF_TIME would never be reached...
|
||||||
|
@ -618,6 +618,11 @@ public class Registry extends ImmutableObject implements Buildable {
|
||||||
validPeriod.upperEndpoint());
|
validPeriod.upperEndpoint());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@VisibleForTesting
|
||||||
|
public ImmutableSortedMap<DateTime, Money> getEapFeeScheduleAsMap() {
|
||||||
|
return eapFeeSchedule.toValueMap();
|
||||||
|
}
|
||||||
|
|
||||||
public String getLordnUsername() {
|
public String getLordnUsername() {
|
||||||
return lordnUsername;
|
return lordnUsername;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ import static google.registry.util.X509Utils.loadCertificate;
|
||||||
import com.beust.jcommander.Parameter;
|
import com.beust.jcommander.Parameter;
|
||||||
import com.beust.jcommander.Parameters;
|
import com.beust.jcommander.Parameters;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
import com.google.common.collect.ImmutableSortedMap;
|
||||||
import com.google.re2j.Pattern;
|
import com.google.re2j.Pattern;
|
||||||
import google.registry.config.RegistryEnvironment;
|
import google.registry.config.RegistryEnvironment;
|
||||||
import google.registry.model.registrar.Registrar;
|
import google.registry.model.registrar.Registrar;
|
||||||
|
@ -35,6 +36,9 @@ import java.util.Optional;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
|
import org.joda.money.CurrencyUnit;
|
||||||
|
import org.joda.money.Money;
|
||||||
|
import org.joda.time.DateTime;
|
||||||
import org.joda.time.Duration;
|
import org.joda.time.Duration;
|
||||||
|
|
||||||
/** Composite command to set up OT&E TLDs and accounts. */
|
/** Composite command to set up OT&E TLDs and accounts. */
|
||||||
|
@ -52,6 +56,15 @@ final class SetupOteCommand extends ConfirmingCommand implements RemoteApiComman
|
||||||
private static final Duration SHORT_REDEMPTION_GRACE_PERIOD = Duration.standardMinutes(10);
|
private static final Duration SHORT_REDEMPTION_GRACE_PERIOD = Duration.standardMinutes(10);
|
||||||
private static final Duration SHORT_PENDING_DELETE_LENGTH = Duration.standardMinutes(5);
|
private static final Duration SHORT_PENDING_DELETE_LENGTH = Duration.standardMinutes(5);
|
||||||
|
|
||||||
|
private static final ImmutableSortedMap<DateTime, Money> EAP_FEE_SCHEDULE =
|
||||||
|
ImmutableSortedMap.of(
|
||||||
|
new DateTime(0),
|
||||||
|
Money.of(CurrencyUnit.USD, 0),
|
||||||
|
DateTime.parse("2018-03-01T00:00:00Z"),
|
||||||
|
Money.of(CurrencyUnit.USD, 100),
|
||||||
|
DateTime.parse("2022-03-01T00:00:00Z"),
|
||||||
|
Money.of(CurrencyUnit.USD, 0));
|
||||||
|
|
||||||
private static final String DEFAULT_PREMIUM_LIST = "default_sandbox_list";
|
private static final String DEFAULT_PREMIUM_LIST = "default_sandbox_list";
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
@ -92,6 +105,13 @@ final class SetupOteCommand extends ConfirmingCommand implements RemoteApiComman
|
||||||
description = "premium list to apply to all TLDs")
|
description = "premium list to apply to all TLDs")
|
||||||
private String premiumList = DEFAULT_PREMIUM_LIST;
|
private String premiumList = DEFAULT_PREMIUM_LIST;
|
||||||
|
|
||||||
|
// TODO: (b/74079782) remove this flag once OT&E for .app is complete.
|
||||||
|
@Parameter(
|
||||||
|
names = {"--eap_only"},
|
||||||
|
description = "whether to only create EAP TLD and registrar"
|
||||||
|
)
|
||||||
|
private boolean eapOnly = false;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
StringGenerator passwordGenerator;
|
StringGenerator passwordGenerator;
|
||||||
|
|
||||||
|
@ -107,7 +127,9 @@ final class SetupOteCommand extends ConfirmingCommand implements RemoteApiComman
|
||||||
TldState initialTldState,
|
TldState initialTldState,
|
||||||
Duration addGracePeriod,
|
Duration addGracePeriod,
|
||||||
Duration redemptionGracePeriod,
|
Duration redemptionGracePeriod,
|
||||||
Duration pendingDeleteLength) throws Exception {
|
Duration pendingDeleteLength,
|
||||||
|
boolean isEarlyAccess)
|
||||||
|
throws Exception {
|
||||||
CreateTldCommand command = new CreateTldCommand();
|
CreateTldCommand command = new CreateTldCommand();
|
||||||
command.addGracePeriod = addGracePeriod;
|
command.addGracePeriod = addGracePeriod;
|
||||||
command.dnsWriters = dnsWriters;
|
command.dnsWriters = dnsWriters;
|
||||||
|
@ -120,6 +142,9 @@ final class SetupOteCommand extends ConfirmingCommand implements RemoteApiComman
|
||||||
command.roidSuffix = String.format(
|
command.roidSuffix = String.format(
|
||||||
"%S%X", tldName.replaceAll("[^a-z0-9]", "").substring(0, 7), roidSuffixCounter++);
|
"%S%X", tldName.replaceAll("[^a-z0-9]", "").substring(0, 7), roidSuffixCounter++);
|
||||||
command.redemptionGracePeriod = redemptionGracePeriod;
|
command.redemptionGracePeriod = redemptionGracePeriod;
|
||||||
|
if (isEarlyAccess) {
|
||||||
|
command.eapFeeSchedule = EAP_FEE_SCHEDULE;
|
||||||
|
}
|
||||||
command.run();
|
command.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,42 +202,77 @@ final class SetupOteCommand extends ConfirmingCommand implements RemoteApiComman
|
||||||
protected String prompt() throws Exception {
|
protected String prompt() throws Exception {
|
||||||
// Each underlying command will confirm its own operation as well, so just provide
|
// Each underlying command will confirm its own operation as well, so just provide
|
||||||
// a summary of the steps in this command.
|
// a summary of the steps in this command.
|
||||||
return "Creating TLDs:\n"
|
if (eapOnly) {
|
||||||
+ " " + registrar + "-sunrise\n"
|
return "Creating TLD:\n"
|
||||||
+ " " + registrar + "-landrush\n"
|
+ " " + registrar + "-eap\n"
|
||||||
+ " " + registrar + "-ga\n"
|
+ "Creating registrar:\n"
|
||||||
+ "Creating registrars:\n"
|
+ " " + registrar + "-5 (access to TLD " + registrar + "-eap)";
|
||||||
+ " " + registrar + "-1 (access to TLD " + registrar + "-sunrise)\n"
|
} else {
|
||||||
+ " " + registrar + "-2 (access to TLD " + registrar + "-landrush)\n"
|
return "Creating TLDs:\n"
|
||||||
+ " " + registrar + "-3 (access to TLD " + registrar + "-ga)\n"
|
+ " " + registrar + "-sunrise\n"
|
||||||
+ " " + registrar + "-4 (access to TLD " + registrar + "-ga)";
|
+ " " + registrar + "-landrush\n"
|
||||||
|
+ " " + registrar + "-ga\n"
|
||||||
|
+ " " + registrar + "-eap\n"
|
||||||
|
+ "Creating registrars:\n"
|
||||||
|
+ " " + registrar + "-1 (access to TLD " + registrar + "-sunrise)\n"
|
||||||
|
+ " " + registrar + "-2 (access to TLD " + registrar + "-landrush)\n"
|
||||||
|
+ " " + registrar + "-3 (access to TLD " + registrar + "-ga)\n"
|
||||||
|
+ " " + registrar + "-4 (access to TLD " + registrar + "-ga)\n"
|
||||||
|
+ " " + registrar + "-5 (access to TLD " + registrar + "-eap)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String execute() throws Exception {
|
public String execute() throws Exception {
|
||||||
createTld(registrar + "-sunrise", TldState.SUNRISE, null, null, null);
|
if (!eapOnly) {
|
||||||
createTld(registrar + "-landrush", TldState.LANDRUSH, null, null, null);
|
createTld(registrar + "-sunrise", TldState.START_DATE_SUNRISE, null, null, null, false);
|
||||||
|
createTld(registrar + "-landrush", TldState.LANDRUSH, null, null, null, false);
|
||||||
|
createTld(
|
||||||
|
registrar + "-ga",
|
||||||
|
TldState.GENERAL_AVAILABILITY,
|
||||||
|
SHORT_ADD_GRACE_PERIOD,
|
||||||
|
SHORT_REDEMPTION_GRACE_PERIOD,
|
||||||
|
SHORT_PENDING_DELETE_LENGTH,
|
||||||
|
false);
|
||||||
|
} else {
|
||||||
|
// Increase ROID suffix counter to not collide with existing TLDs.
|
||||||
|
roidSuffixCounter = roidSuffixCounter + 3;
|
||||||
|
}
|
||||||
createTld(
|
createTld(
|
||||||
registrar + "-ga",
|
registrar + "-eap",
|
||||||
TldState.GENERAL_AVAILABILITY,
|
TldState.GENERAL_AVAILABILITY,
|
||||||
SHORT_ADD_GRACE_PERIOD,
|
SHORT_ADD_GRACE_PERIOD,
|
||||||
SHORT_REDEMPTION_GRACE_PERIOD,
|
SHORT_REDEMPTION_GRACE_PERIOD,
|
||||||
SHORT_PENDING_DELETE_LENGTH);
|
SHORT_PENDING_DELETE_LENGTH,
|
||||||
|
true);
|
||||||
|
|
||||||
// Storing names and credentials in a list of tuples for later play-back.
|
// Storing names and credentials in a list of tuples for later play-back.
|
||||||
List<List<String>> registrars = new ArrayList<>();
|
List<List<String>> registrars = new ArrayList<>();
|
||||||
registrars.add(ImmutableList.of(
|
if (!eapOnly) {
|
||||||
registrar + "-1", passwordGenerator.createString(PASSWORD_LENGTH),
|
registrars.add(
|
||||||
registrar + "-sunrise"));
|
ImmutableList.of(
|
||||||
registrars.add(ImmutableList.of(
|
registrar + "-1",
|
||||||
registrar + "-2", passwordGenerator.createString(PASSWORD_LENGTH),
|
passwordGenerator.createString(PASSWORD_LENGTH),
|
||||||
registrar + "-landrush"));
|
registrar + "-sunrise"));
|
||||||
registrars.add(ImmutableList.of(
|
registrars.add(
|
||||||
registrar + "-3", passwordGenerator.createString(PASSWORD_LENGTH),
|
ImmutableList.of(
|
||||||
registrar + "-ga"));
|
registrar + "-2",
|
||||||
registrars.add(ImmutableList.of(
|
passwordGenerator.createString(PASSWORD_LENGTH),
|
||||||
registrar + "-4", passwordGenerator.createString(PASSWORD_LENGTH),
|
registrar + "-landrush"));
|
||||||
registrar + "-ga"));
|
registrars.add(
|
||||||
|
ImmutableList.of(
|
||||||
|
registrar + "-3",
|
||||||
|
passwordGenerator.createString(PASSWORD_LENGTH),
|
||||||
|
registrar + "-ga"));
|
||||||
|
registrars.add(
|
||||||
|
ImmutableList.of(
|
||||||
|
registrar + "-4",
|
||||||
|
passwordGenerator.createString(PASSWORD_LENGTH),
|
||||||
|
registrar + "-ga"));
|
||||||
|
}
|
||||||
|
registrars.add(
|
||||||
|
ImmutableList.of(
|
||||||
|
registrar + "-5", passwordGenerator.createString(PASSWORD_LENGTH), registrar + "-eap"));
|
||||||
|
|
||||||
for (List<String> r : registrars) {
|
for (List<String> r : registrars) {
|
||||||
createRegistrar(r.get(0), r.get(1), r.get(2));
|
createRegistrar(r.get(0), r.get(1), r.get(2));
|
||||||
|
|
|
@ -28,12 +28,15 @@ import static org.joda.time.DateTimeZone.UTC;
|
||||||
import com.beust.jcommander.ParameterException;
|
import com.beust.jcommander.ParameterException;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
import com.google.common.collect.ImmutableSortedMap;
|
||||||
import google.registry.model.registrar.Registrar;
|
import google.registry.model.registrar.Registrar;
|
||||||
import google.registry.model.registry.Registry;
|
import google.registry.model.registry.Registry;
|
||||||
import google.registry.model.registry.Registry.TldState;
|
import google.registry.model.registry.Registry.TldState;
|
||||||
import google.registry.testing.DeterministicStringGenerator;
|
import google.registry.testing.DeterministicStringGenerator;
|
||||||
import google.registry.util.CidrAddressBlock;
|
import google.registry.util.CidrAddressBlock;
|
||||||
import java.security.cert.CertificateParsingException;
|
import java.security.cert.CertificateParsingException;
|
||||||
|
import org.joda.money.CurrencyUnit;
|
||||||
|
import org.joda.money.Money;
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
import org.joda.time.Duration;
|
import org.joda.time.Duration;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
@ -42,8 +45,13 @@ import org.junit.Test;
|
||||||
/** Unit tests for {@link SetupOteCommand}. */
|
/** Unit tests for {@link SetupOteCommand}. */
|
||||||
public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
|
public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
|
||||||
|
|
||||||
ImmutableList<String> passwords = ImmutableList.of(
|
ImmutableList<String> passwords =
|
||||||
"abcdefghijklmnop", "qrstuvwxyzabcdef", "ghijklmnopqrstuv", "wxyzabcdefghijkl");
|
ImmutableList.of(
|
||||||
|
"abcdefghijklmnop",
|
||||||
|
"qrstuvwxyzabcdef",
|
||||||
|
"ghijklmnopqrstuv",
|
||||||
|
"wxyzabcdefghijkl",
|
||||||
|
"mnopqrstuvwxyzab");
|
||||||
DeterministicStringGenerator passwordGenerator =
|
DeterministicStringGenerator passwordGenerator =
|
||||||
new DeterministicStringGenerator("abcdefghijklmnopqrstuvwxyz");
|
new DeterministicStringGenerator("abcdefghijklmnopqrstuvwxyz");
|
||||||
|
|
||||||
|
@ -64,7 +72,8 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
|
||||||
String premiumList,
|
String premiumList,
|
||||||
Duration addGracePeriodLength,
|
Duration addGracePeriodLength,
|
||||||
Duration redemptionGracePeriodLength,
|
Duration redemptionGracePeriodLength,
|
||||||
Duration pendingDeleteLength) {
|
Duration pendingDeleteLength,
|
||||||
|
boolean isEarlyAccess) {
|
||||||
Registry registry = Registry.get(tldName);
|
Registry registry = Registry.get(tldName);
|
||||||
assertThat(registry).isNotNull();
|
assertThat(registry).isNotNull();
|
||||||
assertThat(registry.getRoidSuffix()).isEqualTo(roidSuffix);
|
assertThat(registry.getRoidSuffix()).isEqualTo(roidSuffix);
|
||||||
|
@ -75,6 +84,21 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
|
||||||
assertThat(registry.getAddGracePeriodLength()).isEqualTo(addGracePeriodLength);
|
assertThat(registry.getAddGracePeriodLength()).isEqualTo(addGracePeriodLength);
|
||||||
assertThat(registry.getRedemptionGracePeriodLength()).isEqualTo(redemptionGracePeriodLength);
|
assertThat(registry.getRedemptionGracePeriodLength()).isEqualTo(redemptionGracePeriodLength);
|
||||||
assertThat(registry.getPendingDeleteLength()).isEqualTo(pendingDeleteLength);
|
assertThat(registry.getPendingDeleteLength()).isEqualTo(pendingDeleteLength);
|
||||||
|
ImmutableSortedMap<DateTime, Money> eapFeeSchedule = registry.getEapFeeScheduleAsMap();
|
||||||
|
if (!isEarlyAccess) {
|
||||||
|
assertThat(eapFeeSchedule)
|
||||||
|
.isEqualTo(ImmutableSortedMap.of(new DateTime(0), Money.of(CurrencyUnit.USD, 0)));
|
||||||
|
} else {
|
||||||
|
assertThat(eapFeeSchedule)
|
||||||
|
.isEqualTo(
|
||||||
|
ImmutableSortedMap.of(
|
||||||
|
new DateTime(0),
|
||||||
|
Money.of(CurrencyUnit.USD, 0),
|
||||||
|
DateTime.parse("2018-03-01T00:00:00Z"),
|
||||||
|
Money.of(CurrencyUnit.USD, 100),
|
||||||
|
DateTime.parse("2022-03-01T00:00:00Z"),
|
||||||
|
Money.of(CurrencyUnit.USD, 0)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Verify TLD creation with registry default durations. */
|
/** Verify TLD creation with registry default durations. */
|
||||||
|
@ -88,7 +112,8 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
|
||||||
premiumList,
|
premiumList,
|
||||||
Registry.DEFAULT_ADD_GRACE_PERIOD,
|
Registry.DEFAULT_ADD_GRACE_PERIOD,
|
||||||
Registry.DEFAULT_REDEMPTION_GRACE_PERIOD,
|
Registry.DEFAULT_REDEMPTION_GRACE_PERIOD,
|
||||||
Registry.DEFAULT_PENDING_DELETE_LENGTH);
|
Registry.DEFAULT_PENDING_DELETE_LENGTH,
|
||||||
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void verifyRegistrarCreation(
|
private void verifyRegistrarCreation(
|
||||||
|
@ -116,7 +141,11 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
|
||||||
"--certfile=" + getCertFilename());
|
"--certfile=" + getCertFilename());
|
||||||
|
|
||||||
verifyTldCreation(
|
verifyTldCreation(
|
||||||
"blobio-sunrise", "BLOBIOS0", TldState.SUNRISE, "VoidDnsWriter", "default_sandbox_list");
|
"blobio-sunrise",
|
||||||
|
"BLOBIOS0",
|
||||||
|
TldState.START_DATE_SUNRISE,
|
||||||
|
"VoidDnsWriter",
|
||||||
|
"default_sandbox_list");
|
||||||
verifyTldCreation(
|
verifyTldCreation(
|
||||||
"blobio-landrush", "BLOBIOL1", TldState.LANDRUSH, "VoidDnsWriter", "default_sandbox_list");
|
"blobio-landrush", "BLOBIOL1", TldState.LANDRUSH, "VoidDnsWriter", "default_sandbox_list");
|
||||||
verifyTldCreation(
|
verifyTldCreation(
|
||||||
|
@ -127,7 +156,18 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
|
||||||
"default_sandbox_list",
|
"default_sandbox_list",
|
||||||
Duration.standardMinutes(60),
|
Duration.standardMinutes(60),
|
||||||
Duration.standardMinutes(10),
|
Duration.standardMinutes(10),
|
||||||
Duration.standardMinutes(5));
|
Duration.standardMinutes(5),
|
||||||
|
false);
|
||||||
|
verifyTldCreation(
|
||||||
|
"blobio-eap",
|
||||||
|
"BLOBIOE3",
|
||||||
|
TldState.GENERAL_AVAILABILITY,
|
||||||
|
"VoidDnsWriter",
|
||||||
|
"default_sandbox_list",
|
||||||
|
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"));
|
||||||
|
@ -136,6 +176,33 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
|
||||||
verifyRegistrarCreation("blobio-2", "blobio-landrush", passwords.get(1), ipAddress);
|
verifyRegistrarCreation("blobio-2", "blobio-landrush", passwords.get(1), ipAddress);
|
||||||
verifyRegistrarCreation("blobio-3", "blobio-ga", passwords.get(2), ipAddress);
|
verifyRegistrarCreation("blobio-3", "blobio-ga", passwords.get(2), ipAddress);
|
||||||
verifyRegistrarCreation("blobio-4", "blobio-ga", passwords.get(3), ipAddress);
|
verifyRegistrarCreation("blobio-4", "blobio-ga", passwords.get(3), ipAddress);
|
||||||
|
verifyRegistrarCreation("blobio-5", "blobio-eap", passwords.get(4), ipAddress);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSuccess_eapOnly() throws Exception {
|
||||||
|
runCommandForced(
|
||||||
|
"--eap_only",
|
||||||
|
"--ip_whitelist=1.1.1.1",
|
||||||
|
"--registrar=blobio",
|
||||||
|
"--dns_writers=VoidDnsWriter",
|
||||||
|
"--certfile=" + getCertFilename());
|
||||||
|
|
||||||
|
verifyTldCreation(
|
||||||
|
"blobio-eap",
|
||||||
|
"BLOBIOE3",
|
||||||
|
TldState.GENERAL_AVAILABILITY,
|
||||||
|
"VoidDnsWriter",
|
||||||
|
"default_sandbox_list",
|
||||||
|
Duration.standardMinutes(60),
|
||||||
|
Duration.standardMinutes(10),
|
||||||
|
Duration.standardMinutes(5),
|
||||||
|
true);
|
||||||
|
|
||||||
|
ImmutableList<CidrAddressBlock> ipAddress = ImmutableList.of(
|
||||||
|
CidrAddressBlock.create("1.1.1.1"));
|
||||||
|
|
||||||
|
verifyRegistrarCreation("blobio-5", "blobio-eap", passwords.get(0), ipAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -147,7 +214,11 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
|
||||||
"--certfile=" + getCertFilename());
|
"--certfile=" + getCertFilename());
|
||||||
|
|
||||||
verifyTldCreation(
|
verifyTldCreation(
|
||||||
"blobio-sunrise", "BLOBIOS0", TldState.SUNRISE, "FooDnsWriter", "default_sandbox_list");
|
"blobio-sunrise",
|
||||||
|
"BLOBIOS0",
|
||||||
|
TldState.START_DATE_SUNRISE,
|
||||||
|
"FooDnsWriter",
|
||||||
|
"default_sandbox_list");
|
||||||
verifyTldCreation(
|
verifyTldCreation(
|
||||||
"blobio-landrush", "BLOBIOL1", TldState.LANDRUSH, "FooDnsWriter", "default_sandbox_list");
|
"blobio-landrush", "BLOBIOL1", TldState.LANDRUSH, "FooDnsWriter", "default_sandbox_list");
|
||||||
verifyTldCreation(
|
verifyTldCreation(
|
||||||
|
@ -158,7 +229,18 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
|
||||||
"default_sandbox_list",
|
"default_sandbox_list",
|
||||||
Duration.standardMinutes(60),
|
Duration.standardMinutes(60),
|
||||||
Duration.standardMinutes(10),
|
Duration.standardMinutes(10),
|
||||||
Duration.standardMinutes(5));
|
Duration.standardMinutes(5),
|
||||||
|
false);
|
||||||
|
verifyTldCreation(
|
||||||
|
"blobio-eap",
|
||||||
|
"BLOBIOE3",
|
||||||
|
TldState.GENERAL_AVAILABILITY,
|
||||||
|
"FooDnsWriter",
|
||||||
|
"default_sandbox_list",
|
||||||
|
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"),
|
||||||
|
@ -168,6 +250,7 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
|
||||||
verifyRegistrarCreation("blobio-2", "blobio-landrush", passwords.get(1), ipAddresses);
|
verifyRegistrarCreation("blobio-2", "blobio-landrush", passwords.get(1), ipAddresses);
|
||||||
verifyRegistrarCreation("blobio-3", "blobio-ga", passwords.get(2), ipAddresses);
|
verifyRegistrarCreation("blobio-3", "blobio-ga", passwords.get(2), ipAddresses);
|
||||||
verifyRegistrarCreation("blobio-4", "blobio-ga", passwords.get(3), ipAddresses);
|
verifyRegistrarCreation("blobio-4", "blobio-ga", passwords.get(3), ipAddresses);
|
||||||
|
verifyRegistrarCreation("blobio-5", "blobio-eap", passwords.get(4), ipAddresses);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -180,7 +263,11 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
|
||||||
"--premium_list=alternate_list");
|
"--premium_list=alternate_list");
|
||||||
|
|
||||||
verifyTldCreation(
|
verifyTldCreation(
|
||||||
"blobio-sunrise", "BLOBIOS0", TldState.SUNRISE, "BarDnsWriter", "alternate_list");
|
"blobio-sunrise",
|
||||||
|
"BLOBIOS0",
|
||||||
|
TldState.START_DATE_SUNRISE,
|
||||||
|
"BarDnsWriter",
|
||||||
|
"alternate_list");
|
||||||
verifyTldCreation(
|
verifyTldCreation(
|
||||||
"blobio-landrush", "BLOBIOL1", TldState.LANDRUSH, "BarDnsWriter", "alternate_list");
|
"blobio-landrush", "BLOBIOL1", TldState.LANDRUSH, "BarDnsWriter", "alternate_list");
|
||||||
verifyTldCreation(
|
verifyTldCreation(
|
||||||
|
@ -191,7 +278,18 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
|
||||||
"alternate_list",
|
"alternate_list",
|
||||||
Duration.standardMinutes(60),
|
Duration.standardMinutes(60),
|
||||||
Duration.standardMinutes(10),
|
Duration.standardMinutes(10),
|
||||||
Duration.standardMinutes(5));
|
Duration.standardMinutes(5),
|
||||||
|
false);
|
||||||
|
verifyTldCreation(
|
||||||
|
"blobio-eap",
|
||||||
|
"BLOBIOE3",
|
||||||
|
TldState.GENERAL_AVAILABILITY,
|
||||||
|
"BarDnsWriter",
|
||||||
|
"alternate_list",
|
||||||
|
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"));
|
||||||
|
@ -200,6 +298,7 @@ public class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
|
||||||
verifyRegistrarCreation("blobio-2", "blobio-landrush", passwords.get(1), ipAddress);
|
verifyRegistrarCreation("blobio-2", "blobio-landrush", passwords.get(1), ipAddress);
|
||||||
verifyRegistrarCreation("blobio-3", "blobio-ga", passwords.get(2), ipAddress);
|
verifyRegistrarCreation("blobio-3", "blobio-ga", passwords.get(2), ipAddress);
|
||||||
verifyRegistrarCreation("blobio-4", "blobio-ga", passwords.get(3), ipAddress);
|
verifyRegistrarCreation("blobio-4", "blobio-ga", passwords.get(3), ipAddress);
|
||||||
|
verifyRegistrarCreation("blobio-5", "blobio-eap", passwords.get(4), ipAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue