mirror of
https://github.com/google/nomulus
synced 2026-09-10 18:16:24 +00:00
Remove ClaimsList from Datastore Schema (#1298)
* Remove ClaimsList from Datastore schema * Remove some Datastore references * Remove unnecessary annotations
This commit is contained in:
@@ -62,7 +62,7 @@ import google.registry.model.replay.SqlReplayCheckpoint;
|
||||
import google.registry.model.server.Lock;
|
||||
import google.registry.model.tld.label.PremiumList;
|
||||
import google.registry.model.tld.label.PremiumList.PremiumEntry;
|
||||
import google.registry.model.tmch.ClaimsList;
|
||||
import google.registry.model.tmch.TmchCrl;
|
||||
import google.registry.model.translators.VKeyTranslatorFactory;
|
||||
import google.registry.persistence.VKey;
|
||||
import google.registry.persistence.transaction.JpaTransactionManager;
|
||||
@@ -455,7 +455,7 @@ public class ReplayCommitLogsToSqlActionTest {
|
||||
|
||||
jpaTm().transact(() -> SqlReplayCheckpoint.set(now.minusMinutes(1).minusMillis(1)));
|
||||
// Save a couple deletes that aren't propagated to SQL (the objects deleted are irrelevant)
|
||||
Key<ClaimsList> claimsListKey = Key.create(ClaimsList.class, 1L);
|
||||
Key<TmchCrl> tmchCrlKey = Key.create(TmchCrl.class, 1L);
|
||||
saveDiffFile(
|
||||
gcsUtils,
|
||||
createCheckpoint(now.minusMinutes(1)),
|
||||
@@ -463,7 +463,7 @@ public class ReplayCommitLogsToSqlActionTest {
|
||||
getBucketKey(1),
|
||||
now.minusMinutes(1),
|
||||
// one object only exists in Datastore, one is dually-written (so isn't replicated)
|
||||
ImmutableSet.of(getCrossTldKey(), claimsListKey)));
|
||||
ImmutableSet.of(getCrossTldKey(), tmchCrlKey)));
|
||||
|
||||
runAndAssertSuccess(now.minusMinutes(1), 1, 1);
|
||||
verify(spy, times(0)).delete(any(VKey.class));
|
||||
|
||||
@@ -758,11 +758,11 @@ class EppLifecycleDomainTest extends EppTestCase {
|
||||
.hasResponse(
|
||||
"poll_response_autorenew.xml",
|
||||
ImmutableMap.of(
|
||||
"ID", "1-C-EXAMPLE-13-16-2002",
|
||||
"ID", "1-B-EXAMPLE-12-15-2002",
|
||||
"QDATE", "2002-06-01T00:04:00Z",
|
||||
"DOMAIN", "fakesite.example",
|
||||
"EXDATE", "2003-06-01T00:04:00Z"));
|
||||
assertThatCommand("poll_ack.xml", ImmutableMap.of("ID", "1-C-EXAMPLE-13-16-2002"))
|
||||
assertThatCommand("poll_ack.xml", ImmutableMap.of("ID", "1-B-EXAMPLE-12-15-2002"))
|
||||
.atTime("2002-07-01T00:02:00Z")
|
||||
.hasResponse("poll_ack_response_empty.xml");
|
||||
|
||||
@@ -776,13 +776,13 @@ class EppLifecycleDomainTest extends EppTestCase {
|
||||
.hasResponse(
|
||||
"poll_response_autorenew.xml",
|
||||
ImmutableMap.of(
|
||||
"ID", "1-C-EXAMPLE-13-16-2003", // Note -- Year is different from previous ID.
|
||||
"ID", "1-B-EXAMPLE-12-15-2003", // Note -- Year is different from previous ID.
|
||||
"QDATE", "2003-06-01T00:04:00Z",
|
||||
"DOMAIN", "fakesite.example",
|
||||
"EXDATE", "2004-06-01T00:04:00Z"));
|
||||
|
||||
// Ack the second poll message and verify that none remain.
|
||||
assertThatCommand("poll_ack.xml", ImmutableMap.of("ID", "1-C-EXAMPLE-13-16-2003"))
|
||||
assertThatCommand("poll_ack.xml", ImmutableMap.of("ID", "1-B-EXAMPLE-12-15-2003"))
|
||||
.atTime("2003-07-01T00:05:05Z")
|
||||
.hasResponse("poll_ack_response_empty.xml");
|
||||
assertThatCommand("poll.xml")
|
||||
@@ -812,7 +812,7 @@ class EppLifecycleDomainTest extends EppTestCase {
|
||||
|
||||
// As the losing registrar, read the request poll message, and then ack it.
|
||||
assertThatLoginSucceeds("NewRegistrar", "foo-BAR2");
|
||||
String messageId = "1-C-EXAMPLE-19-25-2001";
|
||||
String messageId = "1-B-EXAMPLE-18-24-2001";
|
||||
assertThatCommand("poll.xml")
|
||||
.atTime("2001-01-01T00:01:00Z")
|
||||
.hasResponse("poll_response_domain_transfer_request.xml", ImmutableMap.of("ID", messageId));
|
||||
@@ -821,7 +821,7 @@ class EppLifecycleDomainTest extends EppTestCase {
|
||||
.hasResponse("poll_ack_response_empty.xml");
|
||||
|
||||
// Five days in the future, expect a server approval poll message to the loser, and ack it.
|
||||
messageId = "1-C-EXAMPLE-19-24-2001";
|
||||
messageId = "1-B-EXAMPLE-18-23-2001";
|
||||
assertThatCommand("poll.xml")
|
||||
.atTime("2001-01-06T00:01:00Z")
|
||||
.hasResponse(
|
||||
@@ -833,7 +833,7 @@ class EppLifecycleDomainTest extends EppTestCase {
|
||||
assertThatLogoutSucceeds();
|
||||
|
||||
// Also expect a server approval poll message to the winner, with the transfer request trid.
|
||||
messageId = "1-C-EXAMPLE-19-23-2001";
|
||||
messageId = "1-B-EXAMPLE-18-22-2001";
|
||||
assertThatLoginSucceeds("TheRegistrar", "password2");
|
||||
assertThatCommand("poll.xml")
|
||||
.atTime("2001-01-06T00:02:00Z")
|
||||
|
||||
@@ -20,10 +20,8 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import google.registry.persistence.transaction.JpaTestRules;
|
||||
import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationWithCoverageExtension;
|
||||
import google.registry.testing.DatastoreEntityExtension;
|
||||
import google.registry.testing.FakeClock;
|
||||
import javax.persistence.PersistenceException;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
|
||||
@@ -36,10 +34,6 @@ public class ClaimsListDaoTest {
|
||||
final JpaIntegrationWithCoverageExtension jpa =
|
||||
new JpaTestRules.Builder().withClock(fakeClock).buildIntegrationWithCoverageExtension();
|
||||
|
||||
@RegisterExtension
|
||||
@Order(value = 1)
|
||||
final DatastoreEntityExtension datastoreEntityExtension = new DatastoreEntityExtension();
|
||||
|
||||
@Test
|
||||
void save_insertsClaimsListSuccessfully() {
|
||||
ClaimsList claimsList =
|
||||
|
||||
@@ -109,7 +109,7 @@ class EppLifecycleToolsTest extends EppTestCase {
|
||||
.atTime("2001-06-08T00:00:00Z")
|
||||
.hasResponse("poll_response_unrenew.xml");
|
||||
|
||||
assertThatCommand("poll_ack.xml", ImmutableMap.of("ID", "1-8-TLD-21-22-2001"))
|
||||
assertThatCommand("poll_ack.xml", ImmutableMap.of("ID", "1-7-TLD-20-21-2001"))
|
||||
.atTime("2001-06-08T00:00:01Z")
|
||||
.hasResponse("poll_ack_response_empty.xml");
|
||||
|
||||
@@ -130,7 +130,7 @@ class EppLifecycleToolsTest extends EppTestCase {
|
||||
.hasResponse(
|
||||
"poll_response_autorenew.xml",
|
||||
ImmutableMap.of(
|
||||
"ID", "1-8-TLD-21-24-2003",
|
||||
"ID", "1-7-TLD-20-23-2003",
|
||||
"QDATE", "2003-06-01T00:02:00Z",
|
||||
"DOMAIN", "example.tld",
|
||||
"EXDATE", "2004-06-01T00:02:00Z"));
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
ClaimsList
|
||||
ClaimsListSingleton
|
||||
Cursor
|
||||
Registrar
|
||||
RegistrarContact
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<result code="1301">
|
||||
<msg>Command completed successfully; ack to dequeue</msg>
|
||||
</result>
|
||||
<msgQ count="1" id="1-8-TLD-21-22-2001">
|
||||
<msgQ count="1" id="1-7-TLD-20-21-2001">
|
||||
<qDate>2001-06-07T00:00:00Z</qDate>
|
||||
<msg>Domain example.tld was unrenewed by 3 years; now expires at 2003-06-01T00:02:00.000Z.</msg>
|
||||
</msgQ>
|
||||
|
||||
@@ -789,21 +789,6 @@ enum google.registry.model.tld.Registry$TldType {
|
||||
REAL;
|
||||
TEST;
|
||||
}
|
||||
class google.registry.model.tmch.ClaimsList {
|
||||
@Id long id;
|
||||
@Parent com.googlecode.objectify.Key<google.registry.model.tmch.ClaimsList$ClaimsListRevision> parent;
|
||||
com.google.common.collect.ImmutableMap<java.lang.String, java.lang.String> labelsToKeys;
|
||||
org.joda.time.DateTime creationTime;
|
||||
}
|
||||
class google.registry.model.tmch.ClaimsList$ClaimsListRevision {
|
||||
@Id long versionId;
|
||||
@Parent com.googlecode.objectify.Key<google.registry.model.tmch.ClaimsList$ClaimsListSingleton> parent;
|
||||
}
|
||||
class google.registry.model.tmch.ClaimsList$ClaimsListSingleton {
|
||||
@Id long id;
|
||||
@Parent com.googlecode.objectify.Key<google.registry.model.common.EntityGroupRoot> parent;
|
||||
com.googlecode.objectify.Key<google.registry.model.tmch.ClaimsList$ClaimsListRevision> activeRevision;
|
||||
}
|
||||
class google.registry.model.tmch.TmchCrl {
|
||||
@Id long id;
|
||||
@Parent com.googlecode.objectify.Key<google.registry.model.common.EntityGroupRoot> parent;
|
||||
|
||||
Reference in New Issue
Block a user