Remove 'fullyQualified' from host and domain names (#631)

* Remove 'fullyQualified' from host and domain names

We don't actually enforce that these are properly fully-qualified
(there's no dot at the end) and we specifically use the term "label
name" when talking about labels.

Note: this doesn't convert FQDN -> DN (et al) in at least two types of
cases:
1. When the term is part of the XML schema
2. When the term is used by some external system, e.g. SafeBrowsing API

* Add TODO to rename fields
This commit is contained in:
gbrodman 2020-06-17 16:19:26 -04:00 committed by GitHub
parent 19395def5b
commit 69a1d04c18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
87 changed files with 245 additions and 228 deletions

View file

@ -910,7 +910,7 @@ public class DeleteContactsAndHostsActionTest
String expectedResourceName;
if (resource instanceof HostResource) {
assertThat(responseData).isInstanceOf(HostPendingActionNotificationResponse.class);
expectedResourceName = ((HostResource) resource).getFullyQualifiedHostName();
expectedResourceName = ((HostResource) resource).getHostName();
} else {
assertThat(responseData).isInstanceOf(ContactPendingActionNotificationResponse.class);
expectedResourceName = ((ContactResource) resource).getContactId();

View file

@ -98,7 +98,7 @@ public class ExpandRecurringBillingEventsActionTest
.setId(2L)
.setReason(Reason.RENEW)
.setRecurrenceEndTime(END_OF_TIME)
.setTargetId(domain.getFullyQualifiedDomainName())
.setTargetId(domain.getDomainName())
.build();
}
@ -156,7 +156,7 @@ public class ExpandRecurringBillingEventsActionTest
.setReason(Reason.RENEW)
.setSyntheticCreationTime(beginningOfTest)
.setCancellationMatchingBillingEvent(recurring.createVKey())
.setTargetId(domain.getFullyQualifiedDomainName());
.setTargetId(domain.getDomainName());
}
@Test
@ -187,7 +187,7 @@ public class ExpandRecurringBillingEventsActionTest
.setId(2L)
.setReason(Reason.RENEW)
.setRecurrenceEndTime(deletionTime)
.setTargetId(deletedDomain.getFullyQualifiedDomainName())
.setTargetId(deletedDomain.getDomainName())
.build());
action.cursorTimeParam = Optional.of(START_OF_TIME);
runMapreduce();
@ -197,7 +197,7 @@ public class ExpandRecurringBillingEventsActionTest
true);
BillingEvent.OneTime expected = defaultOneTimeBuilder()
.setParent(persistedEntry)
.setTargetId(deletedDomain.getFullyQualifiedDomainName())
.setTargetId(deletedDomain.getDomainName())
.build();
assertBillingEventsForResource(deletedDomain, expected, recurring);
assertCursorAt(beginningOfTest);

View file

@ -141,7 +141,7 @@ public class BackupTestStoreTest {
loadPropertyFromExportedEntities(
new File(exportFolder, "/all_namespaces/kind_DomainBase/input-0"),
DomainBase.class,
DomainBase::getFullyQualifiedDomainName);
DomainBase::getDomainName);
assertThat(domainStrings).containsExactly("domain1.tld1");
ImmutableList<String> contactIds =
loadPropertyFromExportedEntities(

View file

@ -104,7 +104,7 @@ public class EppCommitLogsTest extends ShardableTestCase {
ofy().clearSessionCache();
Key<DomainBase> key = Key.create(ofy().load().type(DomainBase.class).first().now());
DomainBase domainAfterCreate = ofy().load().key(key).now();
assertThat(domainAfterCreate.getFullyQualifiedDomainName()).isEqualTo("example.tld");
assertThat(domainAfterCreate.getDomainName()).isEqualTo("example.tld");
clock.advanceBy(standardDays(2));
DateTime timeAtFirstUpdate = clock.nowUtc();

View file

@ -280,7 +280,7 @@ public class EppTestCase extends ShardableTestCase {
DomainBase domain, DateTime createTime) {
return new BillingEvent.OneTime.Builder()
.setReason(Reason.CREATE)
.setTargetId(domain.getFullyQualifiedDomainName())
.setTargetId(domain.getDomainName())
.setClientId(domain.getCurrentSponsorClientId())
.setCost(Money.parse("USD 26.00"))
.setPeriodYears(2)
@ -295,7 +295,7 @@ public class EppTestCase extends ShardableTestCase {
DomainBase domain, DateTime renewTime) {
return new BillingEvent.OneTime.Builder()
.setReason(Reason.RENEW)
.setTargetId(domain.getFullyQualifiedDomainName())
.setTargetId(domain.getDomainName())
.setClientId(domain.getCurrentSponsorClientId())
.setCost(Money.parse("USD 33.00"))
.setPeriodYears(3)
@ -325,7 +325,7 @@ public class EppTestCase extends ShardableTestCase {
return new BillingEvent.Recurring.Builder()
.setReason(Reason.RENEW)
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
.setTargetId(domain.getFullyQualifiedDomainName())
.setTargetId(domain.getDomainName())
.setClientId(domain.getCurrentSponsorClientId())
.setEventTime(eventTime)
.setRecurrenceEndTime(endTime)
@ -337,7 +337,7 @@ public class EppTestCase extends ShardableTestCase {
protected static BillingEvent.Cancellation makeCancellationBillingEventForCreate(
DomainBase domain, OneTime billingEventToCancel, DateTime createTime, DateTime deleteTime) {
return new BillingEvent.Cancellation.Builder()
.setTargetId(domain.getFullyQualifiedDomainName())
.setTargetId(domain.getDomainName())
.setClientId(domain.getCurrentSponsorClientId())
.setEventTime(deleteTime)
.setOneTimeEventKey(
@ -352,7 +352,7 @@ public class EppTestCase extends ShardableTestCase {
protected static BillingEvent.Cancellation makeCancellationBillingEventForRenew(
DomainBase domain, OneTime billingEventToCancel, DateTime renewTime, DateTime deleteTime) {
return new BillingEvent.Cancellation.Builder()
.setTargetId(domain.getFullyQualifiedDomainName())
.setTargetId(domain.getDomainName())
.setClientId(domain.getCurrentSponsorClientId())
.setEventTime(deleteTime)
.setOneTimeEventKey(

View file

@ -31,7 +31,7 @@ public class TestDomainCreateFlowCustomLogic extends DomainCreateFlowCustomLogic
@Override
public EntityChanges beforeSave(BeforeSaveParameters parameters) {
if (parameters.newDomain().getFullyQualifiedDomainName().startsWith("custom-logic-test")) {
if (parameters.newDomain().getDomainName().startsWith("custom-logic-test")) {
PollMessage extraPollMessage =
new PollMessage.OneTime.Builder()
.setParent(parameters.historyEntry())

View file

@ -314,7 +314,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
assertPollMessagesForResource(
domain,
new PollMessage.Autorenew.Builder()
.setTargetId(domain.getFullyQualifiedDomainName())
.setTargetId(domain.getDomainName())
.setClientId("TheRegistrar")
.setEventTime(domain.getRegistrationExpirationTime())
.setMsg("Domain was auto-renewed.")
@ -1431,7 +1431,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
assertPollMessagesForResource(
domain,
new PollMessage.Autorenew.Builder()
.setTargetId(domain.getFullyQualifiedDomainName())
.setTargetId(domain.getDomainName())
.setClientId("TheRegistrar")
.setEventTime(domain.getRegistrationExpirationTime())
.setMsg("Domain was auto-renewed.")
@ -1445,7 +1445,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
.setResponseData(
ImmutableList.of(
DomainPendingActionNotificationResponse.create(
domain.getFullyQualifiedDomainName(),
domain.getDomainName(),
true,
historyEntry.getTrid(),
clock.nowUtc())))
@ -1585,7 +1585,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
assertPollMessagesForResource(
domain,
new PollMessage.Autorenew.Builder()
.setTargetId(domain.getFullyQualifiedDomainName())
.setTargetId(domain.getDomainName())
.setClientId("TheRegistrar")
.setEventTime(domain.getRegistrationExpirationTime())
.setMsg("Domain was auto-renewed.")

View file

@ -782,7 +782,7 @@ public class DomainDeleteFlowTest extends ResourceFlowTestCase<DomainDeleteFlow,
.setSuperordinateDomain(reloadResourceByForeignKey().createVKey())
.build());
persistResource(
domain.asBuilder().addSubordinateHost(subordinateHost.getFullyQualifiedHostName()).build());
domain.asBuilder().addSubordinateHost(subordinateHost.getHostName()).build());
EppException thrown = assertThrows(DomainToDeleteHasHostsException.class, this::runFlow);
assertAboutEppExceptions().that(thrown).marshalsToXml();
}

View file

@ -103,7 +103,7 @@ public class DomainInfoFlowTest extends ResourceFlowTestCase<DomainInfoFlow, Dom
domain =
persistResource(
new DomainBase.Builder()
.setFullyQualifiedDomainName(domainName)
.setDomainName(domainName)
.setRepoId("2FF-TLD")
.setPersistedCurrentSponsorClientId("NewRegistrar")
.setCreationClientId("TheRegistrar")
@ -128,7 +128,7 @@ public class DomainInfoFlowTest extends ResourceFlowTestCase<DomainInfoFlow, Dom
host3 =
persistResource(
new HostResource.Builder()
.setFullyQualifiedHostName("ns2.example.tld")
.setHostName("ns2.example.tld")
.setRepoId("3FF-TLD")
.setSuperordinateDomain(domain.createVKey())
.build());
@ -139,7 +139,7 @@ public class DomainInfoFlowTest extends ResourceFlowTestCase<DomainInfoFlow, Dom
.asBuilder()
.setSubordinateHosts(
ImmutableSet.of(
host1.getFullyQualifiedHostName(), host3.getFullyQualifiedHostName()))
host1.getHostName(), host3.getHostName()))
.build());
}

View file

@ -258,7 +258,7 @@ public class DomainTransferApproveFlowTest
OneTime transferBillingEvent =
new BillingEvent.OneTime.Builder()
.setReason(Reason.TRANSFER)
.setTargetId(domain.getFullyQualifiedDomainName())
.setTargetId(domain.getDomainName())
.setEventTime(clock.nowUtc())
.setBillingTime(clock.nowUtc().plus(registry.getTransferGracePeriodLength()))
.setClientId("NewRegistrar")

View file

@ -112,7 +112,7 @@ public class DomainTransferFlowTestCase<F extends Flow, R extends EppResource>
persistResource(
new HostResource.Builder()
.setRepoId("2-".concat(Ascii.toUpperCase(tld)))
.setFullyQualifiedHostName("ns1." + label + "." + tld)
.setHostName("ns1." + label + "." + tld)
.setPersistedCurrentSponsorClientId("TheRegistrar")
.setCreationClientId("TheRegistrar")
.setCreationTimeForTest(DateTime.parse("1999-04-03T22:00:00.0Z"))
@ -122,7 +122,7 @@ public class DomainTransferFlowTestCase<F extends Flow, R extends EppResource>
persistResource(
domain
.asBuilder()
.addSubordinateHost(subordinateHost.getFullyQualifiedHostName())
.addSubordinateHost(subordinateHost.getHostName())
.build());
historyEntryDomainCreate = getOnlyHistoryEntryOfType(domain, DOMAIN_CREATE);
}
@ -142,7 +142,7 @@ public class DomainTransferFlowTestCase<F extends Flow, R extends EppResource>
return new BillingEvent.Recurring.Builder()
.setReason(Reason.RENEW)
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
.setTargetId(domain.getFullyQualifiedDomainName())
.setTargetId(domain.getDomainName())
.setClientId("TheRegistrar")
.setEventTime(REGISTRATION_EXPIRATION_TIME)
.setRecurrenceEndTime(TRANSFER_EXPIRATION_TIME)
@ -155,7 +155,7 @@ public class DomainTransferFlowTestCase<F extends Flow, R extends EppResource>
return new BillingEvent.Recurring.Builder()
.setReason(Reason.RENEW)
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
.setTargetId(domain.getFullyQualifiedDomainName())
.setTargetId(domain.getDomainName())
.setClientId("NewRegistrar")
.setEventTime(EXTENDED_REGISTRATION_EXPIRATION_TIME)
.setRecurrenceEndTime(END_OF_TIME)

View file

@ -252,7 +252,7 @@ public class DomainTransferRequestFlowTest
Optional.of(
new BillingEvent.OneTime.Builder()
.setReason(Reason.TRANSFER)
.setTargetId(domain.getFullyQualifiedDomainName())
.setTargetId(domain.getDomainName())
.setEventTime(implicitTransferTime)
.setBillingTime(
implicitTransferTime.plus(registry.getTransferGracePeriodLength()))
@ -594,7 +594,7 @@ public class DomainTransferRequestFlowTest
// The transfer is going to happen immediately. To observe the domain in the pending transfer
// state, grab it directly from the database.
domain = Iterables.getOnlyElement(ofy().load().type(DomainBase.class).list());
assertThat(domain.getFullyQualifiedDomainName()).isEqualTo("example.tld");
assertThat(domain.getDomainName()).isEqualTo("example.tld");
} else {
// Transfer should have been requested.
domain = reloadResourceByForeignKey();

View file

@ -54,7 +54,7 @@ public class HostInfoFlowTest extends ResourceFlowTestCase<HostInfoFlow, HostRes
private HostResource persistHostResource() throws Exception {
return persistResource(
new HostResource.Builder()
.setFullyQualifiedHostName(getUniqueIdFromCommand())
.setHostName(getUniqueIdFromCommand())
.setRepoId("1FF-FOOBAR")
.setPersistedCurrentSponsorClientId("my sponsor")
.setStatusValues(ImmutableSet.of(StatusValue.CLIENT_UPDATE_PROHIBITED))

View file

@ -75,7 +75,7 @@ public class DomainBaseSqlTest {
domain =
new DomainBase.Builder()
.setFullyQualifiedDomainName("example.com")
.setDomainName("example.com")
.setRepoId("4-COM")
.setCreationClientId("registrar1")
.setLastEppUpdateTime(fakeClock.nowUtc())
@ -105,7 +105,7 @@ public class DomainBaseSqlTest {
host =
new HostResource.Builder()
.setRepoId("host1")
.setFullyQualifiedHostName("ns1.example.com")
.setHostName("ns1.example.com")
.setCreationClientId("registrar1")
.setPersistedCurrentSponsorClientId("registrar2")
.build();

View file

@ -75,7 +75,7 @@ public class DomainBaseTest extends EntityTestCase {
VKey<HostResource> hostKey =
persistResource(
new HostResource.Builder()
.setFullyQualifiedHostName("ns1.example.com")
.setHostName("ns1.example.com")
.setSuperordinateDomain(VKey.createOfy(DomainBase.class, domainKey))
.setRepoId("1-COM")
.build())
@ -107,7 +107,7 @@ public class DomainBaseTest extends EntityTestCase {
persistResource(
cloneAndSetAutoTimestamps(
new DomainBase.Builder()
.setFullyQualifiedDomainName("example.com")
.setDomainName("example.com")
.setRepoId("4-COM")
.setCreationClientId("a registrar")
.setLastEppUpdateTime(fakeClock.nowUtc())
@ -611,7 +611,7 @@ public class DomainBaseTest extends EntityTestCase {
IllegalArgumentException thrown =
assertThrows(
IllegalArgumentException.class,
() -> domain.asBuilder().setFullyQualifiedDomainName("AAA.BBB"));
() -> domain.asBuilder().setDomainName("AAA.BBB"));
assertThat(thrown)
.hasMessageThat()
.contains("Domain name must be in puny-coded, lower-case form");
@ -622,7 +622,7 @@ public class DomainBaseTest extends EntityTestCase {
IllegalArgumentException thrown =
assertThrows(
IllegalArgumentException.class,
() -> domain.asBuilder().setFullyQualifiedDomainName("みんな.みんな"));
() -> domain.asBuilder().setDomainName("みんな.みんな"));
assertThat(thrown)
.hasMessageThat()
.contains("Domain name must be in puny-coded, lower-case form");

View file

@ -42,7 +42,7 @@ public class HostHistoryTest extends EntityTestCase {
HostResource host =
new HostResource.Builder()
.setRepoId("host1")
.setFullyQualifiedHostName("ns1.example.com")
.setHostName("ns1.example.com")
.setCreationClientId("TheRegistrar")
.setPersistedCurrentSponsorClientId("TheRegistrar")
.setInetAddresses(ImmutableSet.of())
@ -81,7 +81,7 @@ public class HostHistoryTest extends EntityTestCase {
assertThat(one.getReason()).isEqualTo(two.getReason());
assertThat(one.getTrid()).isEqualTo(two.getTrid());
assertThat(one.getType()).isEqualTo(two.getType());
assertThat(one.getHostBase().getFullyQualifiedHostName())
.isEqualTo(two.getHostBase().getFullyQualifiedHostName());
assertThat(one.getHostBase().getHostName())
.isEqualTo(two.getHostBase().getHostName());
}
}

View file

@ -74,7 +74,7 @@ public class HostResourceTest extends EntityTestCase {
cloneAndSetAutoTimestamps(
new HostResource.Builder()
.setRepoId("DEADBEEF-COM")
.setFullyQualifiedHostName("ns1.example.com")
.setHostName("ns1.example.com")
.setCreationClientId("a registrar")
.setLastEppUpdateTime(fakeClock.nowUtc())
.setLastEppUpdateClientId("another registrar")
@ -172,7 +172,7 @@ public class HostResourceTest extends EntityTestCase {
IllegalArgumentException thrown =
assertThrows(
IllegalArgumentException.class,
() -> host.asBuilder().setFullyQualifiedHostName("AAA.BBB.CCC"));
() -> host.asBuilder().setHostName("AAA.BBB.CCC"));
assertThat(thrown)
.hasMessageThat()
.contains("Host name must be in puny-coded, lower-case form");
@ -183,7 +183,7 @@ public class HostResourceTest extends EntityTestCase {
IllegalArgumentException thrown =
assertThrows(
IllegalArgumentException.class,
() -> host.asBuilder().setFullyQualifiedHostName("みんな.みんな.みんな"));
() -> host.asBuilder().setHostName("みんな.みんな.みんな"));
assertThat(thrown)
.hasMessageThat()
.contains("Host name must be in puny-coded, lower-case form");
@ -222,7 +222,7 @@ public class HostResourceTest extends EntityTestCase {
new HostResource.Builder()
.setCreationTime(day2)
.setRepoId("DEADBEEF-COM")
.setFullyQualifiedHostName("ns1.example.com")
.setHostName("ns1.example.com")
.setCreationClientId("a registrar")
.setLastEppUpdateTime(fakeClock.nowUtc())
.setLastEppUpdateClientId("another registrar")

View file

@ -136,7 +136,7 @@ public class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDom
}
private HostResource addHostToMap(HostResource host) {
hostNameToHostMap.put(host.getFullyQualifiedHostName(), host);
hostNameToHostMap.put(host.getHostName(), host);
return host;
}

View file

@ -262,7 +262,7 @@ public class DomainBaseToXjcConverterTest {
.setDsData(
ImmutableSet.of(
DelegationSignerData.create(123, 200, 230, base16().decode("1234567890"))))
.setFullyQualifiedDomainName(Idn.toASCII("love.みんな"))
.setDomainName(Idn.toASCII("love.みんな"))
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
.setLastEppUpdateClientId("IntoTheTempest")
.setLastEppUpdateTime(DateTime.parse("1920-01-01T00:00:00Z"))
@ -407,7 +407,7 @@ public class DomainBaseToXjcConverterTest {
.setCreationClientId("LawyerCat")
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
.setPersistedCurrentSponsorClientId("BusinessCat")
.setFullyQualifiedHostName(Idn.toASCII(fqhn))
.setHostName(Idn.toASCII(fqhn))
.setInetAddresses(ImmutableSet.of(InetAddresses.forString(ip)))
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
.setLastEppUpdateClientId("CeilingCat")

View file

@ -71,7 +71,7 @@ public class HostResourceToXjcConverterTest {
.setCreationClientId("LawyerCat")
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
.setPersistedCurrentSponsorClientId("BusinessCat")
.setFullyQualifiedHostName("ns1.love.foobar")
.setHostName("ns1.love.foobar")
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("127.0.0.1")))
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
.setLastEppUpdateClientId("CeilingCat")
@ -127,7 +127,7 @@ public class HostResourceToXjcConverterTest {
.setCreationClientId("LawyerCat")
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
.setPersistedCurrentSponsorClientId("BusinessCat")
.setFullyQualifiedHostName("ns1.love.lol")
.setHostName("ns1.love.lol")
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("127.0.0.1")))
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
.setLastEppUpdateClientId("CeilingCat")
@ -176,7 +176,7 @@ public class HostResourceToXjcConverterTest {
.setCreationClientId("LawyerCat")
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
.setPersistedCurrentSponsorClientId("BusinessCat")
.setFullyQualifiedHostName("ns1.love.lol")
.setHostName("ns1.love.lol")
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("cafe::abba")))
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
.setLastEppUpdateClientId("CeilingCat")
@ -199,7 +199,7 @@ public class HostResourceToXjcConverterTest {
.setCreationClientId("LawyerCat")
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
.setPersistedCurrentSponsorClientId("BusinessCat")
.setFullyQualifiedHostName("ns1.love.lol")
.setHostName("ns1.love.lol")
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("cafe::abba")))
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
.setLastEppUpdateClientId("CeilingCat")
@ -218,7 +218,7 @@ public class HostResourceToXjcConverterTest {
.setCreationClientId("LawyerCat")
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
.setPersistedCurrentSponsorClientId("BusinessCat")
.setFullyQualifiedHostName("ns1.love.lol")
.setHostName("ns1.love.lol")
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("cafe::abba")))
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
.setLastEppUpdateClientId("CeilingCat")

View file

@ -60,7 +60,7 @@ final class RdeFixtures {
static DomainBase makeDomainBase(FakeClock clock, String tld) {
DomainBase domain =
new DomainBase.Builder()
.setFullyQualifiedDomainName("example." + tld)
.setDomainName("example." + tld)
.setRepoId(generateNewDomainRoid(tld))
.setRegistrant(
makeContactResource(clock, "5372808-ERL", "(◕‿◕) nevermore", "prophet@evil.みんな")
@ -109,7 +109,7 @@ final class RdeFixtures {
.setDsData(
ImmutableSet.of(
DelegationSignerData.create(123, 200, 230, base16().decode("1234567890"))))
.setFullyQualifiedDomainName(Idn.toASCII("love." + tld))
.setDomainName(Idn.toASCII("love." + tld))
.setLastTransferTime(DateTime.parse("1990-01-01T00:00:00Z"))
.setLastEppUpdateClientId("IntoTheTempest")
.setLastEppUpdateTime(clock.nowUtc())
@ -250,7 +250,7 @@ final class RdeFixtures {
.setCreationClientId("LawyerCat")
.setCreationTimeForTest(clock.nowUtc())
.setPersistedCurrentSponsorClientId("BusinessCat")
.setFullyQualifiedHostName(Idn.toASCII(fqhn))
.setHostName(Idn.toASCII(fqhn))
.setInetAddresses(ImmutableSet.of(InetAddresses.forString(ip)))
.setLastTransferTime(DateTime.parse("1990-01-01T00:00:00Z"))
.setLastEppUpdateClientId("CeilingCat")

View file

@ -120,7 +120,7 @@ public class DatastoreHelper {
public static HostResource newHostResource(String hostName) {
return new HostResource.Builder()
.setFullyQualifiedHostName(hostName)
.setHostName(hostName)
.setCreationClientId("TheRegistrar")
.setPersistedCurrentSponsorClientId("TheRegistrar")
.setCreationTimeForTest(START_OF_TIME)
@ -150,7 +150,7 @@ public class DatastoreHelper {
VKey<ContactResource> contactKey = contact.createVKey();
return new DomainBase.Builder()
.setRepoId(repoId)
.setFullyQualifiedDomainName(domainName)
.setDomainName(domainName)
.setCreationClientId("TheRegistrar")
.setPersistedCurrentSponsorClientId("TheRegistrar")
.setCreationTimeForTest(START_OF_TIME)
@ -433,13 +433,13 @@ public class DatastoreHelper {
DateTime eventTime) {
return new BillingEvent.OneTime.Builder()
.setReason(Reason.TRANSFER)
.setTargetId(domain.getFullyQualifiedDomainName())
.setTargetId(domain.getDomainName())
.setEventTime(eventTime)
.setBillingTime(
eventTime.plus(Registry.get(domain.getTld()).getTransferGracePeriodLength()))
.setClientId("NewRegistrar")
.setPeriodYears(1)
.setCost(getDomainRenewCost(domain.getFullyQualifiedDomainName(), costLookupTime, 1))
.setCost(getDomainRenewCost(domain.getDomainName(), costLookupTime, 1))
.setParent(historyEntry)
.build();
}
@ -500,7 +500,7 @@ public class DatastoreHelper {
DomainBase domain =
new DomainBase.Builder()
.setRepoId(generateNewDomainRoid(tld))
.setFullyQualifiedDomainName(domainName)
.setDomainName(domainName)
.setPersistedCurrentSponsorClientId("TheRegistrar")
.setCreationClientId("TheRegistrar")
.setCreationTimeForTest(creationTime)
@ -568,7 +568,7 @@ public class DatastoreHelper {
new BillingEvent.Recurring.Builder()
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
.setReason(Reason.RENEW)
.setTargetId(domain.getFullyQualifiedDomainName())
.setTargetId(domain.getDomainName())
.setClientId("NewRegistrar")
.setEventTime(extendedRegistrationExpirationTime)
.setRecurrenceEndTime(END_OF_TIME)
@ -576,7 +576,7 @@ public class DatastoreHelper {
.build());
PollMessage.Autorenew gainingClientAutorenewPollMessage = persistResource(
new PollMessage.Autorenew.Builder()
.setTargetId(domain.getFullyQualifiedDomainName())
.setTargetId(domain.getDomainName())
.setClientId("NewRegistrar")
.setEventTime(extendedRegistrationExpirationTime)
.setAutorenewEndTime(END_OF_TIME)

View file

@ -43,7 +43,7 @@ public final class DomainBaseSubject
public And<DomainBaseSubject> hasFullyQualifiedDomainName(String fullyQualifiedDomainName) {
return hasValue(
fullyQualifiedDomainName,
actual.getFullyQualifiedDomainName(),
actual.getDomainName(),
"has fullyQualifiedDomainName");
}

View file

@ -136,7 +136,7 @@ public final class FullFieldsTestEntityHelper {
HostResource.Builder builder =
new HostResource.Builder()
.setRepoId(generateNewContactHostRoid())
.setFullyQualifiedHostName(Idn.toASCII(fqhn))
.setHostName(Idn.toASCII(fqhn))
.setCreationTimeForTest(DateTime.parse("2000-10-08T00:45:00Z"))
.setPersistedCurrentSponsorClientId(registrarClientId);
if ((ip1 != null) || (ip2 != null)) {
@ -344,7 +344,7 @@ public final class FullFieldsTestEntityHelper {
Registrar registrar) {
DomainBase.Builder builder =
new DomainBase.Builder()
.setFullyQualifiedDomainName(Idn.toASCII(domain))
.setDomainName(Idn.toASCII(domain))
.setRepoId(generateNewDomainRoid(getTldFromDomainName(Idn.toASCII(domain))))
.setLastEppUpdateTime(DateTime.parse("2009-05-29T20:13:00Z"))
.setCreationTimeForTest(DateTime.parse("2000-10-08T00:45:00Z"))

View file

@ -61,7 +61,7 @@ public class LordnTaskUtilsTest {
private DomainBase.Builder newDomainBuilder() {
return new DomainBase.Builder()
.setFullyQualifiedDomainName("fleece.example")
.setDomainName("fleece.example")
.setRegistrant(persistActiveContact("jd1234").createVKey())
.setSmdId("smdzzzz")
.setCreationClientId("TheRegistrar");

View file

@ -146,7 +146,7 @@ public class EppLifecycleToolsTest extends EppTestCase {
BillingEvent.OneTime renewBillingEvent =
new BillingEvent.OneTime.Builder()
.setReason(Reason.RENEW)
.setTargetId(domain.getFullyQualifiedDomainName())
.setTargetId(domain.getDomainName())
.setClientId(domain.getCurrentSponsorClientId())
.setCost(Money.parse("USD 44.00"))
.setPeriodYears(4)

View file

@ -90,7 +90,7 @@ public class LockDomainCommandTest extends CommandTestCase<LockDomainCommand> {
.add("--client=NewRegistrar")
.addAll(
domains.stream()
.map(DomainBase::getFullyQualifiedDomainName)
.map(DomainBase::getDomainName)
.collect(Collectors.toList()))
.build());
for (DomainBase domain : domains) {

View file

@ -101,7 +101,7 @@ public class UnlockDomainCommandTest extends CommandTestCase<UnlockDomainCommand
.add("--client=NewRegistrar")
.addAll(
domains.stream()
.map(DomainBase::getFullyQualifiedDomainName)
.map(DomainBase::getDomainName)
.collect(Collectors.toList()))
.build());
for (DomainBase domain : domains) {

View file

@ -124,7 +124,7 @@ public class UnrenewDomainCommandTest extends CommandTestCase<UnrenewDomainComma
.setParent(synthetic)
.setReason(Reason.RENEW)
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
.setTargetId(domain.getFullyQualifiedDomainName())
.setTargetId(domain.getDomainName())
.setClientId("TheRegistrar")
.setEventTime(newExpirationTime)
.build());

View file

@ -111,7 +111,7 @@ public class BackfillRegistryLocksCommandTest
.isSuperuser(true)
.setRegistrarId("adminreg")
.setRepoId(domain.getRepoId())
.setDomainName(domain.getFullyQualifiedDomainName())
.setDomainName(domain.getDomainName())
.setLockCompletionTimestamp(fakeClock.nowUtc())
.setVerificationCode(command.stringGenerator.createString(32))
.build());

View file

@ -189,7 +189,7 @@ public final class RegistryLockGetActionTest {
"locks",
ImmutableList.of(
new ImmutableMap.Builder<>()
.put("fullyQualifiedDomainName", "adminexample.test")
.put("domainName", "adminexample.test")
.put("lockedTime", "2000-06-09T22:00:00.001Z")
.put("lockedBy", "admin")
.put("userCanUnlock", false)
@ -197,7 +197,7 @@ public final class RegistryLockGetActionTest {
.put("isUnlockPending", false)
.build(),
new ImmutableMap.Builder<>()
.put("fullyQualifiedDomainName", "example.test")
.put("domainName", "example.test")
.put("lockedTime", "2000-06-09T22:00:00.000Z")
.put("lockedBy", "johndoe@theregistrar.com")
.put("userCanUnlock", true)
@ -205,7 +205,7 @@ public final class RegistryLockGetActionTest {
.put("isUnlockPending", false)
.build(),
new ImmutableMap.Builder<>()
.put("fullyQualifiedDomainName", "expiredunlock.test")
.put("domainName", "expiredunlock.test")
.put("lockedTime", "2000-06-08T22:00:00.000Z")
.put("lockedBy", "johndoe@theregistrar.com")
.put("userCanUnlock", true)
@ -213,7 +213,7 @@ public final class RegistryLockGetActionTest {
.put("isUnlockPending", false)
.build(),
new ImmutableMap.Builder<>()
.put("fullyQualifiedDomainName", "incompleteunlock.test")
.put("domainName", "incompleteunlock.test")
.put("lockedTime", "2000-06-09T22:00:00.001Z")
.put("lockedBy", "johndoe@theregistrar.com")
.put("userCanUnlock", true)
@ -221,7 +221,7 @@ public final class RegistryLockGetActionTest {
.put("isUnlockPending", true)
.build(),
new ImmutableMap.Builder<>()
.put("fullyQualifiedDomainName", "pending.test")
.put("domainName", "pending.test")
.put("lockedTime", "")
.put("lockedBy", "johndoe@theregistrar.com")
.put("userCanUnlock", true)

View file

@ -225,7 +225,7 @@ public final class RegistryLockPostActionTest {
action.handleJsonRequest(
ImmutableMap.of(
"clientId", "TheRegistrar",
"fullyQualifiedDomainName", "example.tld",
"domainName", "example.tld",
"isLock", true));
assertSuccess(response, "lock", "johndoe@theregistrar.com");
}
@ -253,7 +253,7 @@ public final class RegistryLockPostActionTest {
Map<String, ?> response =
action.handleJsonRequest(
ImmutableMap.of("clientId", "TheRegistrar", "password", "hi", "isLock", true));
assertFailureWithMessage(response, "Missing key for fullyQualifiedDomainName");
assertFailureWithMessage(response, "Missing key for domainName");
}
@Test
@ -262,7 +262,7 @@ public final class RegistryLockPostActionTest {
action.handleJsonRequest(
ImmutableMap.of(
"clientId", "TheRegistrar",
"fullyQualifiedDomainName", "example.tld",
"domainName", "example.tld",
"password", "hi"));
assertFailureWithMessage(response, "Missing key for isLock");
}
@ -281,7 +281,7 @@ public final class RegistryLockPostActionTest {
action.handleJsonRequest(
ImmutableMap.of(
"clientId", "TheRegistrar",
"fullyQualifiedDomainName", "example.tld",
"domainName", "example.tld",
"isLock", true));
assertFailureWithMessage(response, "Incorrect registry lock password for contact");
}
@ -295,7 +295,7 @@ public final class RegistryLockPostActionTest {
action.handleJsonRequest(
ImmutableMap.of(
"clientId", "TheRegistrar",
"fullyQualifiedDomainName", "example.tld",
"domainName", "example.tld",
"isLock", true,
"password", "hi"));
assertFailureWithMessage(response, "Incorrect registry lock password for contact");
@ -307,7 +307,7 @@ public final class RegistryLockPostActionTest {
action.handleJsonRequest(
ImmutableMap.of(
"clientId", "TheRegistrar",
"fullyQualifiedDomainName", "example.tld",
"domainName", "example.tld",
"isLock", true,
"password", "badPassword"));
assertFailureWithMessage(response, "Incorrect registry lock password for contact");
@ -319,7 +319,7 @@ public final class RegistryLockPostActionTest {
action.handleJsonRequest(
ImmutableMap.of(
"clientId", "TheRegistrar",
"fullyQualifiedDomainName", "bad.tld",
"domainName", "bad.tld",
"isLock", true,
"password", "hi"));
assertFailureWithMessage(response, "Unknown domain bad.tld");
@ -382,7 +382,7 @@ public final class RegistryLockPostActionTest {
return ImmutableMap.of(
"isLock", lock,
"clientId", "TheRegistrar",
"fullyQualifiedDomainName", "example.tld",
"domainName", "example.tld",
"password", "hi");
}

View file

@ -488,7 +488,7 @@ public class RegistrarConsoleScreenshotTest extends WebDriverTestCase {
.isSuperuser(false)
.setRegistrarId("TheRegistrar")
.setRegistrarPocId("Marla.Singer@crr.com")
.setDomainName(pendingUnlockDomain.getFullyQualifiedDomainName())
.setDomainName(pendingUnlockDomain.getDomainName())
.setRepoId(pendingUnlockDomain.getRepoId())
.setLockCompletionTimestamp(START_OF_TIME)
.setUnlockRequestTimestamp(START_OF_TIME)
@ -561,7 +561,7 @@ public class RegistrarConsoleScreenshotTest extends WebDriverTestCase {
.setRegistrarId("TheRegistrar")
.setRegistrarPocId("Marla.Singer@crr.com")
.setLockCompletionTimestamp(START_OF_TIME)
.setDomainName(domainBase.getFullyQualifiedDomainName())
.setDomainName(domainBase.getDomainName())
.setRepoId(domainBase.getRepoId())
.build();
}

View file

@ -86,12 +86,12 @@ public class DomainWhoisResponseTest {
createTld("tld");
hostResource1 = persistResource(new HostResource.Builder()
.setFullyQualifiedHostName("ns01.exampleregistrar.tld")
.setHostName("ns01.exampleregistrar.tld")
.setRepoId("1-ROID")
.build());
hostResource2 = persistResource(new HostResource.Builder()
.setFullyQualifiedHostName("ns02.exampleregistrar.tld")
.setHostName("ns02.exampleregistrar.tld")
.setRepoId("2-ROID")
.build());
@ -229,7 +229,7 @@ public class DomainWhoisResponseTest {
domainBase =
persistResource(
new DomainBase.Builder()
.setFullyQualifiedDomainName("example.tld")
.setDomainName("example.tld")
.setRepoId("3-TLD")
.setLastEppUpdateTime(DateTime.parse("2009-05-29T20:13:00Z"))
.setCreationTimeForTest(DateTime.parse("2000-10-08T00:45:00Z"))

View file

@ -55,7 +55,7 @@ public class NameserverWhoisResponseTest {
createTld("tld");
hostResource1 = new HostResource.Builder()
.setFullyQualifiedHostName("ns1.example.tld")
.setHostName("ns1.example.tld")
.setPersistedCurrentSponsorClientId("example")
.setInetAddresses(ImmutableSet.of(
InetAddresses.forString("192.0.2.123"),
@ -64,7 +64,7 @@ public class NameserverWhoisResponseTest {
.build();
hostResource2 = new HostResource.Builder()
.setFullyQualifiedHostName("ns2.example.tld")
.setHostName("ns2.example.tld")
.setPersistedCurrentSponsorClientId("example")
.setInetAddresses(ImmutableSet.of(
InetAddresses.forString("192.0.2.123"),