mirror of
https://github.com/google/nomulus
synced 2026-02-08 14:00:32 +00:00
Remove ofy support from registrar (#1762)
Also fixes some warnings about the use of raw types.
This commit is contained in:
@@ -26,7 +26,6 @@ import google.registry.model.index.EppResourceIndexBucket;
|
||||
import google.registry.model.index.ForeignKeyIndex.ForeignKeyContactIndex;
|
||||
import google.registry.model.index.ForeignKeyIndex.ForeignKeyDomainIndex;
|
||||
import google.registry.model.index.ForeignKeyIndex.ForeignKeyHostIndex;
|
||||
import google.registry.model.registrar.Registrar;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
import google.registry.model.server.Lock;
|
||||
import google.registry.model.server.ServerSecret;
|
||||
@@ -49,7 +48,6 @@ public class ClassPathManagerTest {
|
||||
assertThat(ClassPathManager.getClass("ForeignKeyContactIndex"))
|
||||
.isEqualTo(ForeignKeyContactIndex.class);
|
||||
assertThat(ClassPathManager.getClass("Host")).isEqualTo(Host.class);
|
||||
assertThat(ClassPathManager.getClass("Registrar")).isEqualTo(Registrar.class);
|
||||
assertThat(ClassPathManager.getClass("Contact")).isEqualTo(Contact.class);
|
||||
assertThat(ClassPathManager.getClass("GaeUserIdConverter")).isEqualTo(GaeUserIdConverter.class);
|
||||
assertThat(ClassPathManager.getClass("EppResourceIndexBucket"))
|
||||
@@ -99,7 +97,6 @@ public class ClassPathManagerTest {
|
||||
assertThat(ClassPathManager.getClassName(ForeignKeyContactIndex.class))
|
||||
.isEqualTo("ForeignKeyContactIndex");
|
||||
assertThat(ClassPathManager.getClassName(Host.class)).isEqualTo("Host");
|
||||
assertThat(ClassPathManager.getClassName(Registrar.class)).isEqualTo("Registrar");
|
||||
assertThat(ClassPathManager.getClassName(Contact.class)).isEqualTo("Contact");
|
||||
assertThat(ClassPathManager.getClassName(GaeUserIdConverter.class))
|
||||
.isEqualTo("GaeUserIdConverter");
|
||||
|
||||
@@ -28,13 +28,13 @@ import static org.joda.time.DateTimeZone.UTC;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.googlecode.objectify.Key;
|
||||
import google.registry.model.ImmutableObject;
|
||||
import google.registry.model.host.Host;
|
||||
import google.registry.model.registrar.Registrar;
|
||||
import google.registry.persistence.VKey;
|
||||
import google.registry.testing.AppEngineExtension;
|
||||
import java.util.Arrays;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
import org.joda.time.DateTime;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -119,19 +119,20 @@ public class MutatingCommandTest {
|
||||
@Test
|
||||
void testSuccess_create() throws Exception {
|
||||
ImmutableList<VKey<?>> keys =
|
||||
Arrays.asList(host1, host2, registrar1, registrar2).stream()
|
||||
.map(entity -> VKey.from(Key.create(entity)))
|
||||
Stream.of(host1, host2, registrar1, registrar2)
|
||||
.map(ImmutableObject::createVKey)
|
||||
.collect(toImmutableList());
|
||||
tm().transact(() -> tm().delete(keys));
|
||||
MutatingCommand command = new MutatingCommand() {
|
||||
@Override
|
||||
protected void init() {
|
||||
stageEntityChange(null, newHost1);
|
||||
stageEntityChange(null, newHost2);
|
||||
stageEntityChange(null, newRegistrar1);
|
||||
stageEntityChange(null, newRegistrar2);
|
||||
}
|
||||
};
|
||||
MutatingCommand command =
|
||||
new MutatingCommand() {
|
||||
@Override
|
||||
protected void init() {
|
||||
stageEntityChange(null, newHost1);
|
||||
stageEntityChange(null, newHost2);
|
||||
stageEntityChange(null, newRegistrar1);
|
||||
stageEntityChange(null, newRegistrar2);
|
||||
}
|
||||
};
|
||||
command.init();
|
||||
String changes = command.prompt();
|
||||
assertThat(changes)
|
||||
|
||||
@@ -366,7 +366,7 @@ class SetupOteCommandTest extends CommandTestCase<SetupOteCommand> {
|
||||
"--registrar=blobio",
|
||||
"--email=contact@email.com",
|
||||
"--certfile=" + getCertFilename()));
|
||||
assertThat(thrown).hasMessageThat().contains("VKey<Registrar>(sql:blobio-1,ofy:blobio-1)");
|
||||
assertThat(thrown).hasMessageThat().contains("VKey<Registrar>(sql:blobio-1)");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -312,54 +312,6 @@ class google.registry.model.index.ForeignKeyIndex$ForeignKeyHostIndex {
|
||||
google.registry.persistence.VKey<E> topReference;
|
||||
org.joda.time.DateTime deletionTime;
|
||||
}
|
||||
class google.registry.model.registrar.Registrar {
|
||||
@Id java.lang.String clientIdentifier;
|
||||
@Parent com.googlecode.objectify.Key<google.registry.model.common.EntityGroupRoot> parent;
|
||||
boolean blockPremiumNames;
|
||||
boolean contactsRequireSyncing;
|
||||
boolean registryLockAllowed;
|
||||
google.registry.model.registrar.Registrar$State state;
|
||||
google.registry.model.registrar.Registrar$Type type;
|
||||
java.lang.Long ianaIdentifier;
|
||||
java.lang.String clientCertificate;
|
||||
java.lang.String clientCertificateHash;
|
||||
java.lang.String driveFolderId;
|
||||
java.lang.String emailAddress;
|
||||
java.lang.String failoverClientCertificate;
|
||||
java.lang.String failoverClientCertificateHash;
|
||||
java.lang.String faxNumber;
|
||||
java.lang.String icannReferralEmail;
|
||||
java.lang.String passwordHash;
|
||||
java.lang.String phoneNumber;
|
||||
java.lang.String phonePasscode;
|
||||
java.lang.String poNumber;
|
||||
java.lang.String registrarName;
|
||||
java.lang.String salt;
|
||||
java.lang.String url;
|
||||
java.lang.String whoisServer;
|
||||
java.util.List<google.registry.util.CidrAddressBlock> ipAddressWhitelist;
|
||||
java.util.Map<org.joda.money.CurrencyUnit, java.lang.String> billingAccountMap;
|
||||
java.util.Set<java.lang.String> allowedTlds;
|
||||
java.util.Set<java.lang.String> rdapBaseUrls;
|
||||
org.joda.time.DateTime lastCertificateUpdateTime;
|
||||
org.joda.time.DateTime lastExpiringCertNotificationSentDate;
|
||||
org.joda.time.DateTime lastExpiringFailoverCertNotificationSentDate;
|
||||
}
|
||||
enum google.registry.model.registrar.Registrar$State {
|
||||
ACTIVE;
|
||||
DISABLED;
|
||||
PENDING;
|
||||
SUSPENDED;
|
||||
}
|
||||
enum google.registry.model.registrar.Registrar$Type {
|
||||
EXTERNAL_MONITORING;
|
||||
INTERNAL;
|
||||
MONITORING;
|
||||
OTE;
|
||||
PDT;
|
||||
REAL;
|
||||
TEST;
|
||||
}
|
||||
class google.registry.model.reporting.DomainTransactionRecord {
|
||||
google.registry.model.reporting.DomainTransactionRecord$TransactionReportField reportField;
|
||||
java.lang.Integer reportAmount;
|
||||
|
||||
Reference in New Issue
Block a user