mirror of
https://github.com/google/nomulus.git
synced 2025-07-23 03:06:01 +02:00
Delete all Limited Release Program (LRP) code
We never used it and don't have any plans to use it going forward. All conceivable parts of its functionality that we might use going forward have already been subsumed into allocation tokens, which are a simpler way of handling the same use case that are also standards-compliant. Also gets rid of the hideous ANCHOR_ prefix on anchor tenant EPP authcodes that was only ever necessary because of overloading the authcode for anchor tenant creation. Going forward it'll be based on allocation tokens, so there's no risk of conflicts. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=209418194
This commit is contained in:
parent
f7bc17fbe8
commit
7b87ba41c7
34 changed files with 12 additions and 1601 deletions
|
@ -1,89 +0,0 @@
|
|||
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.model.domain;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveDomainApplication;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.googlecode.objectify.Key;
|
||||
import google.registry.model.EntityTestCase;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
/** Unit tests for {@link LrpTokenEntity}. */
|
||||
public class LrpTokenEntityTest extends EntityTestCase {
|
||||
|
||||
LrpTokenEntity unredeemedToken;
|
||||
LrpTokenEntity redeemedToken;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
createTld("tld");
|
||||
DomainApplication lrpApplication = persistActiveDomainApplication("domain.tld");
|
||||
HistoryEntry applicationCreateHistoryEntry = persistResource(new HistoryEntry.Builder()
|
||||
.setParent(lrpApplication)
|
||||
.setType(HistoryEntry.Type.DOMAIN_APPLICATION_CREATE)
|
||||
.build());
|
||||
unredeemedToken = persistResource(
|
||||
new LrpTokenEntity.Builder()
|
||||
.setAssignee("1:1020304")
|
||||
.setToken("a0b1c2d3e4f5g6")
|
||||
.setValidTlds(ImmutableSet.of("tld"))
|
||||
.setMetadata(ImmutableMap.of("foo", "bar"))
|
||||
.build());
|
||||
redeemedToken = persistResource(
|
||||
new LrpTokenEntity.Builder()
|
||||
.setAssignee("2:org.testdomain")
|
||||
.setToken("h0i1j2k3l4m")
|
||||
.setRedemptionHistoryEntry(Key.create(applicationCreateHistoryEntry))
|
||||
.setValidTlds(ImmutableSet.of("tld"))
|
||||
.setMetadata(ImmutableMap.of("bar", "foo"))
|
||||
.build());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPersistence() {
|
||||
assertThat(ofy().load().entity(redeemedToken).now()).isEqualTo(redeemedToken);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_loadByToken() {
|
||||
assertThat(ofy().load().key(Key.create(LrpTokenEntity.class, "a0b1c2d3e4f5g6")).now())
|
||||
.isEqualTo(unredeemedToken);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_loadByAssignee() {
|
||||
assertThat(
|
||||
ofy().load().type(LrpTokenEntity.class).filter("assignee", "1:1020304").first().now())
|
||||
.isEqualTo(unredeemedToken);
|
||||
}
|
||||
@Test
|
||||
public void testSuccess_isRedeemed() {
|
||||
assertThat(redeemedToken.isRedeemed()).isTrue();
|
||||
assertThat(unredeemedToken.isRedeemed()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIndexing() throws Exception {
|
||||
verifyIndexing(redeemedToken, "assignee", "token");
|
||||
}
|
||||
}
|
|
@ -243,14 +243,6 @@ class google.registry.model.domain.GracePeriod {
|
|||
java.lang.String clientId;
|
||||
org.joda.time.DateTime expirationTime;
|
||||
}
|
||||
class google.registry.model.domain.LrpTokenEntity {
|
||||
@Id java.lang.String token;
|
||||
com.googlecode.objectify.Key<google.registry.model.reporting.HistoryEntry> redemptionHistoryEntry;
|
||||
google.registry.model.UpdateAutoTimestamp updateTimestamp;
|
||||
java.lang.String assignee;
|
||||
java.util.Map<java.lang.String, java.lang.String> metadata;
|
||||
java.util.Set<java.lang.String> validTlds;
|
||||
}
|
||||
class google.registry.model.domain.Period {
|
||||
google.registry.model.domain.Period$Unit unit;
|
||||
java.lang.Integer value;
|
||||
|
@ -663,8 +655,6 @@ class google.registry.model.registry.Registry {
|
|||
org.joda.money.Money restoreBillingCost;
|
||||
org.joda.money.Money serverStatusChangeBillingCost;
|
||||
org.joda.time.DateTime claimsPeriodEnd;
|
||||
org.joda.time.DateTime lrpPeriodEnd;
|
||||
org.joda.time.DateTime lrpPeriodStart;
|
||||
org.joda.time.Duration addGracePeriodLength;
|
||||
org.joda.time.Duration anchorTenantAddGracePeriodLength;
|
||||
org.joda.time.Duration autoRenewGracePeriodLength;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue