mirror of
https://github.com/google/nomulus.git
synced 2025-07-24 03:30:46 +02:00
Rename Java packages to use the .google TLD
The dark lord Gosling designed the Java package naming system so that ownership flows from the DNS system. Since we own the domain name registry.google, it seems only appropriate that we should use google.registry as our package name.
This commit is contained in:
parent
5012893c1d
commit
c458c05801
1309 changed files with 10981 additions and 10378 deletions
|
@ -1,7 +1,10 @@
|
|||
package(
|
||||
default_visibility = ["//java/com/google/domain/registry:registry_project"],
|
||||
default_testonly = 1,
|
||||
default_visibility = ["//java/google/registry:registry_project"],
|
||||
)
|
||||
|
||||
licenses(["notice"]) # Apache 2.0
|
||||
|
||||
load("//java/com/google/testing/builddefs:GenTestRules.bzl", "GenTestRules")
|
||||
|
||||
|
||||
|
@ -12,15 +15,6 @@ java_library(
|
|||
deps = [
|
||||
"//java/com/google/common/base",
|
||||
"//java/com/google/common/collect",
|
||||
"//java/com/google/domain/registry/groups",
|
||||
"//java/com/google/domain/registry/mapreduce",
|
||||
"//java/com/google/domain/registry/model",
|
||||
"//java/com/google/domain/registry/request",
|
||||
"//java/com/google/domain/registry/tools/server",
|
||||
"//java/com/google/domain/registry/util",
|
||||
"//javatests/com/google/domain/registry/model",
|
||||
"//javatests/com/google/domain/registry/testing",
|
||||
"//javatests/com/google/domain/registry/testing/mapreduce",
|
||||
"//third_party/java/appengine:appengine-api-testonly",
|
||||
"//third_party/java/appengine_gcs_client",
|
||||
"//third_party/java/appengine_mapreduce2:appengine_mapreduce",
|
||||
|
@ -31,6 +25,15 @@ java_library(
|
|||
"//third_party/java/objectify:objectify-v4_1",
|
||||
"//third_party/java/servlet/servlet_api",
|
||||
"//third_party/java/truth",
|
||||
"//java/google/registry/groups",
|
||||
"//java/google/registry/mapreduce",
|
||||
"//java/google/registry/model",
|
||||
"//java/google/registry/request",
|
||||
"//java/google/registry/tools/server",
|
||||
"//java/google/registry/util",
|
||||
"//javatests/google/registry/model",
|
||||
"//javatests/google/registry/testing",
|
||||
"//javatests/google/registry/testing/mapreduce",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.tools.server;
|
||||
package google.registry.tools.server;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static javax.servlet.http.HttpServletResponse.SC_OK;
|
||||
|
@ -21,14 +21,15 @@ import static org.mockito.Mockito.verify;
|
|||
import static org.mockito.Mockito.when;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.domain.registry.groups.DirectoryGroupsConnection;
|
||||
import com.google.domain.registry.groups.GroupsConnection.Role;
|
||||
import com.google.domain.registry.request.HttpException.BadRequestException;
|
||||
import com.google.domain.registry.request.HttpException.InternalServerErrorException;
|
||||
import com.google.domain.registry.request.Response;
|
||||
import com.google.domain.registry.testing.AppEngineRule;
|
||||
import com.google.domain.registry.testing.ExceptionRule;
|
||||
import com.google.domain.registry.testing.InjectRule;
|
||||
|
||||
import google.registry.groups.DirectoryGroupsConnection;
|
||||
import google.registry.groups.GroupsConnection.Role;
|
||||
import google.registry.request.HttpException.BadRequestException;
|
||||
import google.registry.request.HttpException.InternalServerErrorException;
|
||||
import google.registry.request.Response;
|
||||
import google.registry.testing.AppEngineRule;
|
||||
import google.registry.testing.ExceptionRule;
|
||||
import google.registry.testing.InjectRule;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Rule;
|
||||
|
|
|
@ -12,16 +12,16 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.tools.server;
|
||||
package google.registry.tools.server;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.createTlds;
|
||||
import static google.registry.testing.DatastoreHelper.createTlds;
|
||||
import static javax.servlet.http.HttpServletResponse.SC_OK;
|
||||
|
||||
import com.google.domain.registry.model.registry.label.PremiumList;
|
||||
import com.google.domain.registry.testing.AppEngineRule;
|
||||
import com.google.domain.registry.testing.ExceptionRule;
|
||||
import com.google.domain.registry.testing.FakeJsonResponse;
|
||||
import google.registry.model.registry.label.PremiumList;
|
||||
import google.registry.testing.AppEngineRule;
|
||||
import google.registry.testing.ExceptionRule;
|
||||
import google.registry.testing.FakeJsonResponse;
|
||||
|
||||
import org.joda.money.Money;
|
||||
import org.junit.Before;
|
||||
|
|
|
@ -12,20 +12,21 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.tools.server;
|
||||
package google.registry.tools.server;
|
||||
|
||||
import static com.google.appengine.api.datastore.DatastoreServiceFactory.getDatastoreService;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.domain.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static com.googlecode.objectify.Key.create;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
|
||||
import com.google.appengine.api.datastore.Entity;
|
||||
import com.google.appengine.api.datastore.KeyFactory;
|
||||
import com.google.domain.registry.model.registry.label.ReservedList;
|
||||
import com.google.domain.registry.request.HttpException.BadRequestException;
|
||||
import com.google.domain.registry.testing.AppEngineRule;
|
||||
import com.google.domain.registry.testing.ExceptionRule;
|
||||
import com.google.domain.registry.testing.FakeResponse;
|
||||
|
||||
import google.registry.model.registry.label.ReservedList;
|
||||
import google.registry.request.HttpException.BadRequestException;
|
||||
import google.registry.testing.AppEngineRule;
|
||||
import google.registry.testing.ExceptionRule;
|
||||
import google.registry.testing.FakeResponse;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
|
|
|
@ -12,36 +12,37 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.tools.server;
|
||||
package google.registry.tools.server;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.domain.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.createTld;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistActiveDomain;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistDeletedDomain;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistResource;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistSimpleResource;
|
||||
import static com.google.domain.registry.util.DateTimeUtils.START_OF_TIME;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveDomain;
|
||||
import static google.registry.testing.DatastoreHelper.persistDeletedDomain;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.testing.DatastoreHelper.persistSimpleResource;
|
||||
import static google.registry.util.DateTimeUtils.START_OF_TIME;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.domain.registry.mapreduce.MapreduceRunner;
|
||||
import com.google.domain.registry.model.ImmutableObject;
|
||||
import com.google.domain.registry.model.billing.BillingEvent;
|
||||
import com.google.domain.registry.model.billing.BillingEvent.Reason;
|
||||
import com.google.domain.registry.model.domain.DomainResource;
|
||||
import com.google.domain.registry.model.index.EppResourceIndex;
|
||||
import com.google.domain.registry.model.index.ForeignKeyIndex;
|
||||
import com.google.domain.registry.model.poll.PollMessage;
|
||||
import com.google.domain.registry.model.registry.Registry;
|
||||
import com.google.domain.registry.model.registry.Registry.TldType;
|
||||
import com.google.domain.registry.model.reporting.HistoryEntry;
|
||||
import com.google.domain.registry.testing.ExceptionRule;
|
||||
import com.google.domain.registry.testing.FakeResponse;
|
||||
import com.google.domain.registry.testing.mapreduce.MapreduceTestCase;
|
||||
|
||||
import com.googlecode.objectify.Key;
|
||||
|
||||
import google.registry.mapreduce.MapreduceRunner;
|
||||
import google.registry.model.ImmutableObject;
|
||||
import google.registry.model.billing.BillingEvent;
|
||||
import google.registry.model.billing.BillingEvent.Reason;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.index.EppResourceIndex;
|
||||
import google.registry.model.index.ForeignKeyIndex;
|
||||
import google.registry.model.poll.PollMessage;
|
||||
import google.registry.model.registry.Registry;
|
||||
import google.registry.model.registry.Registry.TldType;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
import google.registry.testing.ExceptionRule;
|
||||
import google.registry.testing.FakeResponse;
|
||||
import google.registry.testing.mapreduce.MapreduceTestCase;
|
||||
|
||||
import org.joda.money.Money;
|
||||
import org.joda.time.DateTime;
|
||||
import org.junit.Before;
|
||||
|
|
|
@ -12,20 +12,20 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.tools.server;
|
||||
package google.registry.tools.server;
|
||||
|
||||
import static com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.createTld;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.newDomainResource;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.newHostResource;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistActiveContact;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistActiveDomain;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistActiveDomainApplication;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistActiveHost;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistResource;
|
||||
import static com.google.domain.registry.testing.GcsTestingUtils.readGcsFile;
|
||||
import static com.google.domain.registry.util.ResourceUtils.readResourceUtf8;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.newDomainResource;
|
||||
import static google.registry.testing.DatastoreHelper.newHostResource;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveContact;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveDomain;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveDomainApplication;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveHost;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.testing.GcsTestingUtils.readGcsFile;
|
||||
import static google.registry.util.ResourceUtils.readResourceUtf8;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
import static org.joda.time.Duration.standardDays;
|
||||
|
||||
|
@ -36,12 +36,13 @@ import com.google.common.base.Splitter;
|
|||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.domain.registry.mapreduce.MapreduceRunner;
|
||||
import com.google.domain.registry.model.domain.ReferenceUnion;
|
||||
import com.google.domain.registry.model.domain.secdns.DelegationSignerData;
|
||||
import com.google.domain.registry.model.host.HostResource;
|
||||
import com.google.domain.registry.testing.FakeClock;
|
||||
import com.google.domain.registry.testing.mapreduce.MapreduceTestCase;
|
||||
|
||||
import google.registry.mapreduce.MapreduceRunner;
|
||||
import google.registry.model.domain.ReferenceUnion;
|
||||
import google.registry.model.domain.secdns.DelegationSignerData;
|
||||
import google.registry.model.host.HostResource;
|
||||
import google.registry.testing.FakeClock;
|
||||
import google.registry.testing.mapreduce.MapreduceTestCase;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.DateTimeZone;
|
||||
|
|
|
@ -1,240 +0,0 @@
|
|||
// Copyright 2016 The Domain Registry 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 com.google.domain.registry.tools.server;
|
||||
|
||||
import static com.google.appengine.api.datastore.DatastoreServiceFactory.getDatastoreService;
|
||||
import static com.google.common.base.Predicates.in;
|
||||
import static com.google.common.base.Predicates.instanceOf;
|
||||
import static com.google.common.base.Predicates.not;
|
||||
import static com.google.common.collect.Multimaps.filterKeys;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.domain.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static com.google.domain.registry.model.server.ServerSecret.getServerSecret;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.createTld;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.newContactResource;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.newDomainApplication;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.newDomainResource;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.newHostResource;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistPremiumList;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistReservedList;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistResource;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistResourceWithCommitLog;
|
||||
import static com.google.domain.registry.util.DateTimeUtils.END_OF_TIME;
|
||||
import static com.google.domain.registry.util.DateTimeUtils.START_OF_TIME;
|
||||
import static java.util.Arrays.asList;
|
||||
import static org.joda.money.CurrencyUnit.USD;
|
||||
|
||||
import com.google.appengine.api.datastore.Entity;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.FluentIterable;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableMultimap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.domain.registry.mapreduce.MapreduceAction;
|
||||
import com.google.domain.registry.model.EntityClasses;
|
||||
import com.google.domain.registry.model.EppResource;
|
||||
import com.google.domain.registry.model.ImmutableObject;
|
||||
import com.google.domain.registry.model.annotations.VirtualEntity;
|
||||
import com.google.domain.registry.model.billing.BillingEvent;
|
||||
import com.google.domain.registry.model.billing.BillingEvent.Reason;
|
||||
import com.google.domain.registry.model.billing.RegistrarBillingEntry;
|
||||
import com.google.domain.registry.model.billing.RegistrarCredit;
|
||||
import com.google.domain.registry.model.billing.RegistrarCredit.CreditType;
|
||||
import com.google.domain.registry.model.billing.RegistrarCreditBalance;
|
||||
import com.google.domain.registry.model.common.EntityGroupRoot;
|
||||
import com.google.domain.registry.model.common.GaeUserIdConverter;
|
||||
import com.google.domain.registry.model.export.LogsExportCursor;
|
||||
import com.google.domain.registry.model.ofy.CommitLogCheckpoint;
|
||||
import com.google.domain.registry.model.ofy.CommitLogCheckpointRoot;
|
||||
import com.google.domain.registry.model.poll.PollMessage;
|
||||
import com.google.domain.registry.model.rde.RdeMode;
|
||||
import com.google.domain.registry.model.rde.RdeRevision;
|
||||
import com.google.domain.registry.model.registrar.Registrar;
|
||||
import com.google.domain.registry.model.registry.Registry;
|
||||
import com.google.domain.registry.model.registry.RegistryCursor;
|
||||
import com.google.domain.registry.model.registry.RegistryCursor.CursorType;
|
||||
import com.google.domain.registry.model.reporting.HistoryEntry;
|
||||
import com.google.domain.registry.model.server.Lock;
|
||||
import com.google.domain.registry.model.smd.SignedMarkRevocationList;
|
||||
import com.google.domain.registry.model.tmch.ClaimsListShard;
|
||||
import com.google.domain.registry.model.tmch.TmchCrl;
|
||||
import com.google.domain.registry.testing.mapreduce.MapreduceTestCase;
|
||||
|
||||
import com.googlecode.objectify.Key;
|
||||
import com.googlecode.objectify.Ref;
|
||||
import com.googlecode.objectify.VoidWork;
|
||||
|
||||
import org.joda.money.Money;
|
||||
import org.junit.Test;
|
||||
|
||||
public abstract class KillAllActionTestCase<T> extends MapreduceTestCase<T>{
|
||||
|
||||
private final ImmutableSet<String> affectedKinds;
|
||||
|
||||
private static final ImmutableSet<String> ALL_PERSISTED_KINDS = FluentIterable
|
||||
.from(EntityClasses.ALL_CLASSES)
|
||||
.filter(
|
||||
new Predicate<Class<?>>() {
|
||||
@Override
|
||||
public boolean apply(Class<?> clazz) {
|
||||
return !clazz.isAnnotationPresent(VirtualEntity.class);
|
||||
}})
|
||||
.transform(EntityClasses.CLASS_TO_KIND_FUNCTION)
|
||||
.toSet();
|
||||
|
||||
|
||||
public KillAllActionTestCase(ImmutableSet<String> affectedKinds) {
|
||||
this.affectedKinds = affectedKinds;
|
||||
}
|
||||
|
||||
/** Create at least one of each type of entity in the schema. */
|
||||
void createData() {
|
||||
createTld("tld1");
|
||||
createTld("tld2");
|
||||
persistResource(CommitLogCheckpointRoot.create(START_OF_TIME.plusDays(1)));
|
||||
persistResource(
|
||||
CommitLogCheckpoint.create(
|
||||
START_OF_TIME.plusDays(1),
|
||||
ImmutableMap.of(1, START_OF_TIME.plusDays(2))));
|
||||
for (EppResource resource : asList(
|
||||
newDomainResource("foo.tld1"),
|
||||
newDomainResource("foo.tld2"),
|
||||
newDomainApplication("foo.tld1"),
|
||||
newDomainApplication("foo.tld2"),
|
||||
newContactResource("foo1"),
|
||||
newContactResource("foo2"),
|
||||
newHostResource("ns.foo.tld1"),
|
||||
newHostResource("ns.foo.tld2"))) {
|
||||
persistResourceWithCommitLog(resource);
|
||||
HistoryEntry history =
|
||||
persistResource(new HistoryEntry.Builder().setParent(resource).build());
|
||||
BillingEvent.OneTime oneTime = persistResource(new BillingEvent.OneTime.Builder()
|
||||
.setParent(history)
|
||||
.setBillingTime(START_OF_TIME)
|
||||
.setEventTime(START_OF_TIME)
|
||||
.setClientId("")
|
||||
.setTargetId("")
|
||||
.setReason(Reason.ERROR)
|
||||
.setCost(Money.of(USD, 1))
|
||||
.build());
|
||||
for (ImmutableObject descendant : asList(
|
||||
new PollMessage.OneTime.Builder()
|
||||
.setParent(history)
|
||||
.setClientId("")
|
||||
.setEventTime(START_OF_TIME)
|
||||
.build(),
|
||||
new PollMessage.Autorenew.Builder()
|
||||
.setParent(history)
|
||||
.setClientId("")
|
||||
.setEventTime(START_OF_TIME)
|
||||
.build(),
|
||||
new BillingEvent.Cancellation.Builder()
|
||||
.setOneTimeEventRef(Ref.create(oneTime))
|
||||
.setParent(history)
|
||||
.setBillingTime(START_OF_TIME)
|
||||
.setEventTime(START_OF_TIME)
|
||||
.setClientId("")
|
||||
.setTargetId("")
|
||||
.setReason(Reason.ERROR)
|
||||
.build(),
|
||||
new BillingEvent.Modification.Builder()
|
||||
.setEventRef(Ref.create(oneTime))
|
||||
.setParent(history)
|
||||
.setEventTime(START_OF_TIME)
|
||||
.setClientId("")
|
||||
.setTargetId("")
|
||||
.setReason(Reason.ERROR)
|
||||
.setCost(Money.of(USD, 1))
|
||||
.build(),
|
||||
new BillingEvent.Recurring.Builder()
|
||||
.setParent(history)
|
||||
.setEventTime(START_OF_TIME)
|
||||
.setClientId("")
|
||||
.setTargetId("")
|
||||
.setReason(Reason.ERROR)
|
||||
.build())) {
|
||||
persistResource(descendant);
|
||||
}
|
||||
}
|
||||
persistResource(new RegistrarBillingEntry.Builder()
|
||||
.setParent(Registrar.loadByClientId("TheRegistrar"))
|
||||
.setCreated(START_OF_TIME)
|
||||
.setDescription("description")
|
||||
.setAmount(Money.of(USD, 1))
|
||||
.build());
|
||||
RegistrarCredit credit = persistResource(new RegistrarCredit.Builder()
|
||||
.setParent(Registrar.loadByClientId("TheRegistrar"))
|
||||
.setCreationTime(START_OF_TIME)
|
||||
.setCurrency(USD)
|
||||
.setDescription("description")
|
||||
.setTld("tld1")
|
||||
.setType(CreditType.AUCTION)
|
||||
.build());
|
||||
persistResource(new RegistrarCreditBalance.Builder()
|
||||
.setParent(credit)
|
||||
.setAmount(Money.of(USD, 1))
|
||||
.setEffectiveTime(START_OF_TIME)
|
||||
.setWrittenTime(START_OF_TIME)
|
||||
.build());
|
||||
persistPremiumList("premium", "a,USD 100", "b,USD 200");
|
||||
persistReservedList("reserved", "lol,RESERVED_FOR_ANCHOR_TENANT,foobar1");
|
||||
getServerSecret(); // Forces persist.
|
||||
TmchCrl.set("crl content");
|
||||
persistResource(new LogsExportCursor.Builder().build());
|
||||
persistPremiumList("premium", "a,USD 100", "b,USD 200");
|
||||
SignedMarkRevocationList.create(
|
||||
START_OF_TIME, ImmutableMap.of("a", START_OF_TIME, "b", END_OF_TIME)).save();
|
||||
ClaimsListShard.create(START_OF_TIME, ImmutableMap.of("a", "1", "b", "2")).save();
|
||||
// These entities must be saved within a transaction.
|
||||
ofy().transact(new VoidWork() {
|
||||
@Override
|
||||
public void vrun() {
|
||||
RegistryCursor.save(Registry.get("tld1"), CursorType.BRDA, START_OF_TIME);
|
||||
RdeRevision.saveRevision("tld1", START_OF_TIME, RdeMode.FULL, 0);
|
||||
}});
|
||||
// These entities intentionally don't expose constructors or factory methods.
|
||||
getDatastoreService().put(new Entity(EntityGroupRoot.getCrossTldKey().getRaw()));
|
||||
getDatastoreService().put(new Entity(Key.getKind(GaeUserIdConverter.class), 1));
|
||||
getDatastoreService().put(new Entity(Key.getKind(Lock.class), 1));
|
||||
}
|
||||
|
||||
abstract MapreduceAction createAction();
|
||||
|
||||
@Test
|
||||
public void testKill() throws Exception {
|
||||
createData();
|
||||
ImmutableMultimap<String, Object> beforeContents = getDatastoreContents();
|
||||
assertThat(beforeContents.keySet()).named("persisted test data")
|
||||
.containsAllIn(ALL_PERSISTED_KINDS);
|
||||
MapreduceAction action = createAction();
|
||||
action.run();
|
||||
executeTasksUntilEmpty("mapreduce");
|
||||
ImmutableMultimap<String, Object> afterContents = getDatastoreContents();
|
||||
assertThat(afterContents.keySet()).containsNoneIn(affectedKinds);
|
||||
assertThat(afterContents)
|
||||
.containsExactlyEntriesIn(filterKeys(beforeContents, not(in(affectedKinds))));
|
||||
}
|
||||
|
||||
private ImmutableMultimap<String, Object> getDatastoreContents() {
|
||||
ofy().clearSessionCache();
|
||||
ImmutableMultimap.Builder<String, Object> contentsBuilder = new ImmutableMultimap.Builder<>();
|
||||
// Filter out raw Entity objects created by the mapreduce.
|
||||
for (Object obj : Iterables.filter(ofy().load(), not(instanceOf(Entity.class)))) {
|
||||
contentsBuilder.put(Key.getKind(obj.getClass()), obj);
|
||||
}
|
||||
return contentsBuilder.build();
|
||||
}
|
||||
}
|
|
@ -12,46 +12,92 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.tools.server;
|
||||
package google.registry.tools.server;
|
||||
|
||||
import static com.google.domain.registry.model.EntityClasses.CLASS_TO_KIND_FUNCTION;
|
||||
import static com.google.common.base.Predicates.instanceOf;
|
||||
import static com.google.common.base.Predicates.not;
|
||||
import static com.google.common.collect.Iterables.filter;
|
||||
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.newContactResource;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.testing.DatastoreHelper.persistResourceWithCommitLog;
|
||||
import static google.registry.util.DateTimeUtils.START_OF_TIME;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
import com.google.appengine.api.datastore.Entity;
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.FluentIterable;
|
||||
import com.google.domain.registry.mapreduce.MapreduceAction;
|
||||
import com.google.domain.registry.mapreduce.MapreduceRunner;
|
||||
import com.google.domain.registry.model.ofy.CommitLogBucket;
|
||||
import com.google.domain.registry.model.ofy.CommitLogCheckpoint;
|
||||
import com.google.domain.registry.model.ofy.CommitLogCheckpointRoot;
|
||||
import com.google.domain.registry.model.ofy.CommitLogManifest;
|
||||
import com.google.domain.registry.model.ofy.CommitLogMutation;
|
||||
import com.google.domain.registry.testing.FakeResponse;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import google.registry.mapreduce.MapreduceRunner;
|
||||
import google.registry.model.ImmutableObject;
|
||||
import google.registry.model.ofy.CommitLogBucket;
|
||||
import google.registry.model.ofy.CommitLogCheckpoint;
|
||||
import google.registry.model.ofy.CommitLogCheckpointRoot;
|
||||
import google.registry.model.ofy.CommitLogManifest;
|
||||
import google.registry.model.ofy.CommitLogMutation;
|
||||
import google.registry.testing.FakeResponse;
|
||||
import google.registry.testing.mapreduce.MapreduceTestCase;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/** Tests for {@link KillAllCommitLogsAction}.*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class KillAllCommitLogsActionTest extends KillAllActionTestCase<KillAllCommitLogsAction> {
|
||||
public class KillAllCommitLogsActionTest extends MapreduceTestCase<KillAllCommitLogsAction> {
|
||||
|
||||
public KillAllCommitLogsActionTest() {
|
||||
super(FluentIterable
|
||||
.from(asList(
|
||||
CommitLogBucket.class,
|
||||
CommitLogCheckpoint.class,
|
||||
CommitLogCheckpointRoot.class,
|
||||
CommitLogMutation.class,
|
||||
CommitLogManifest.class))
|
||||
.transform(CLASS_TO_KIND_FUNCTION)
|
||||
.toSet());
|
||||
}
|
||||
static final List<Class<? extends ImmutableObject>> AFFECTED_TYPES = ImmutableList.of(
|
||||
CommitLogBucket.class,
|
||||
CommitLogCheckpoint.class,
|
||||
CommitLogCheckpointRoot.class,
|
||||
CommitLogMutation.class,
|
||||
CommitLogManifest.class);
|
||||
|
||||
@Override
|
||||
MapreduceAction createAction() {
|
||||
private void runMapreduce() throws Exception {
|
||||
action = new KillAllCommitLogsAction();
|
||||
action.mrRunner = new MapreduceRunner(Optional.<Integer>absent(), Optional.<Integer>absent());
|
||||
action.response = new FakeResponse();
|
||||
return action;
|
||||
action.run();
|
||||
executeTasksUntilEmpty("mapreduce");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testKill() throws Exception {
|
||||
int nextContactId = 5432;
|
||||
for (String tld : asList("tld1", "tld2")) {
|
||||
createTld(tld);
|
||||
persistResourceWithCommitLog(
|
||||
newContactResource(String.format("abc%d", nextContactId++)));
|
||||
}
|
||||
persistResource(CommitLogCheckpointRoot.create(START_OF_TIME.plusDays(1)));
|
||||
persistResource(
|
||||
CommitLogCheckpoint.create(
|
||||
START_OF_TIME.plusDays(1),
|
||||
ImmutableMap.of(1, START_OF_TIME.plusDays(2))));
|
||||
for (Class<?> clazz : AFFECTED_TYPES) {
|
||||
assertThat(ofy().load().type(clazz)).named("entities of type " + clazz).isNotEmpty();
|
||||
}
|
||||
ImmutableList<?> otherStuff = FluentIterable.from(ofy().load())
|
||||
.filter(new Predicate<Object>() {
|
||||
@Override
|
||||
public boolean apply(Object obj) {
|
||||
return !AFFECTED_TYPES.contains(obj.getClass());
|
||||
}})
|
||||
.toList();
|
||||
assertThat(otherStuff).isNotEmpty();
|
||||
runMapreduce();
|
||||
for (Class<?> clazz : AFFECTED_TYPES) {
|
||||
assertThat(ofy().load().type(clazz)).named("entities of type " + clazz).isEmpty();
|
||||
}
|
||||
// Filter out raw Entity objects created by the mapreduce.
|
||||
assertThat(filter(ofy().load(), not(instanceOf(Entity.class))))
|
||||
.containsExactlyElementsIn(otherStuff);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,82 +0,0 @@
|
|||
// Copyright 2016 The Domain Registry 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 com.google.domain.registry.tools.server;
|
||||
|
||||
import static com.google.domain.registry.model.EntityClasses.CLASS_TO_KIND_FUNCTION;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.collect.FluentIterable;
|
||||
import com.google.domain.registry.mapreduce.MapreduceAction;
|
||||
import com.google.domain.registry.mapreduce.MapreduceRunner;
|
||||
import com.google.domain.registry.model.billing.RegistrarBillingEntry;
|
||||
import com.google.domain.registry.model.billing.RegistrarCredit;
|
||||
import com.google.domain.registry.model.billing.RegistrarCreditBalance;
|
||||
import com.google.domain.registry.model.common.EntityGroupRoot;
|
||||
import com.google.domain.registry.model.export.LogsExportCursor;
|
||||
import com.google.domain.registry.model.registrar.Registrar;
|
||||
import com.google.domain.registry.model.registrar.RegistrarContact;
|
||||
import com.google.domain.registry.model.registry.Registry;
|
||||
import com.google.domain.registry.model.registry.RegistryCursor;
|
||||
import com.google.domain.registry.model.registry.label.PremiumList;
|
||||
import com.google.domain.registry.model.registry.label.PremiumList.PremiumListEntry;
|
||||
import com.google.domain.registry.model.registry.label.ReservedList;
|
||||
import com.google.domain.registry.model.server.ServerSecret;
|
||||
import com.google.domain.registry.model.smd.SignedMarkRevocationList;
|
||||
import com.google.domain.registry.model.tmch.ClaimsListShard;
|
||||
import com.google.domain.registry.model.tmch.ClaimsListShard.ClaimsListSingleton;
|
||||
import com.google.domain.registry.model.tmch.TmchCrl;
|
||||
import com.google.domain.registry.testing.FakeResponse;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
/** Tests for {@link KillAllCommitLogsAction}.*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class KillAllCrossTldEntitiesActionTest
|
||||
extends KillAllActionTestCase<KillAllCrossTldEntitiesAction> {
|
||||
|
||||
public KillAllCrossTldEntitiesActionTest() {
|
||||
super(FluentIterable
|
||||
.from(asList(
|
||||
ClaimsListShard.class,
|
||||
ClaimsListSingleton.class,
|
||||
EntityGroupRoot.class,
|
||||
LogsExportCursor.class,
|
||||
PremiumList.class,
|
||||
PremiumListEntry.class,
|
||||
Registrar.class,
|
||||
RegistrarBillingEntry.class,
|
||||
RegistrarContact.class,
|
||||
RegistrarCredit.class,
|
||||
RegistrarCreditBalance.class,
|
||||
Registry.class,
|
||||
RegistryCursor.class,
|
||||
ReservedList.class,
|
||||
ServerSecret.class,
|
||||
SignedMarkRevocationList.class,
|
||||
TmchCrl.class))
|
||||
.transform(CLASS_TO_KIND_FUNCTION)
|
||||
.toSet());
|
||||
}
|
||||
|
||||
@Override
|
||||
MapreduceAction createAction() {
|
||||
action = new KillAllCrossTldEntitiesAction();
|
||||
action.mrRunner = new MapreduceRunner(Optional.<Integer>absent(), Optional.<Integer>absent());
|
||||
action.response = new FakeResponse();
|
||||
return action;
|
||||
}
|
||||
}
|
|
@ -12,62 +12,150 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.tools.server;
|
||||
package google.registry.tools.server;
|
||||
|
||||
import static com.google.domain.registry.model.EntityClasses.CLASS_TO_KIND_FUNCTION;
|
||||
import static com.google.common.base.Predicates.in;
|
||||
import static com.google.common.base.Predicates.instanceOf;
|
||||
import static com.google.common.base.Predicates.not;
|
||||
import static com.google.common.collect.Multimaps.filterKeys;
|
||||
import static com.google.common.collect.Sets.difference;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.model.EntityClasses.CLASS_TO_KIND_FUNCTION;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveContact;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveDomain;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveDomainApplication;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveHost;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.util.DateTimeUtils.START_OF_TIME;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
import com.google.appengine.api.datastore.Entity;
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.collect.FluentIterable;
|
||||
import com.google.domain.registry.mapreduce.MapreduceAction;
|
||||
import com.google.domain.registry.mapreduce.MapreduceRunner;
|
||||
import com.google.domain.registry.model.billing.BillingEvent;
|
||||
import com.google.domain.registry.model.contact.ContactResource;
|
||||
import com.google.domain.registry.model.domain.DomainBase;
|
||||
import com.google.domain.registry.model.host.HostResource;
|
||||
import com.google.domain.registry.model.index.DomainApplicationIndex;
|
||||
import com.google.domain.registry.model.index.EppResourceIndex;
|
||||
import com.google.domain.registry.model.index.ForeignKeyIndex.ForeignKeyContactIndex;
|
||||
import com.google.domain.registry.model.index.ForeignKeyIndex.ForeignKeyDomainIndex;
|
||||
import com.google.domain.registry.model.index.ForeignKeyIndex.ForeignKeyHostIndex;
|
||||
import com.google.domain.registry.model.poll.PollMessage;
|
||||
import com.google.domain.registry.model.reporting.HistoryEntry;
|
||||
import com.google.domain.registry.testing.FakeResponse;
|
||||
import com.google.common.collect.ImmutableMultimap;
|
||||
import com.google.common.collect.Iterables;
|
||||
|
||||
import com.googlecode.objectify.Key;
|
||||
|
||||
import google.registry.mapreduce.MapreduceRunner;
|
||||
import google.registry.model.EppResource;
|
||||
import google.registry.model.ImmutableObject;
|
||||
import google.registry.model.billing.BillingEvent;
|
||||
import google.registry.model.billing.BillingEvent.Reason;
|
||||
import google.registry.model.contact.ContactResource;
|
||||
import google.registry.model.domain.DomainBase;
|
||||
import google.registry.model.host.HostResource;
|
||||
import google.registry.model.index.DomainApplicationIndex;
|
||||
import google.registry.model.index.EppResourceIndex;
|
||||
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.poll.PollMessage;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
import google.registry.testing.FakeResponse;
|
||||
import google.registry.testing.mapreduce.MapreduceTestCase;
|
||||
|
||||
import org.joda.money.CurrencyUnit;
|
||||
import org.joda.money.Money;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/** Tests for {@link KillAllEppResourcesAction}.*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class KillAllEppResourcesActionTest
|
||||
extends KillAllActionTestCase<KillAllEppResourcesAction> {
|
||||
public class KillAllEppResourcesActionTest extends MapreduceTestCase<KillAllEppResourcesAction> {
|
||||
|
||||
public KillAllEppResourcesActionTest() {
|
||||
super(FluentIterable
|
||||
.from(asList(
|
||||
EppResourceIndex.class,
|
||||
ForeignKeyContactIndex.class,
|
||||
ForeignKeyDomainIndex.class,
|
||||
ForeignKeyHostIndex.class,
|
||||
DomainApplicationIndex.class,
|
||||
DomainBase.class,
|
||||
ContactResource.class,
|
||||
HostResource.class,
|
||||
HistoryEntry.class,
|
||||
PollMessage.class,
|
||||
BillingEvent.OneTime.class,
|
||||
BillingEvent.Recurring.class,
|
||||
BillingEvent.Cancellation.class,
|
||||
BillingEvent.Modification.class))
|
||||
.transform(CLASS_TO_KIND_FUNCTION)
|
||||
.toSet());
|
||||
}
|
||||
static final Set<String> AFFECTED_KINDS = FluentIterable
|
||||
.from(asList(
|
||||
EppResourceIndex.class,
|
||||
ForeignKeyContactIndex.class,
|
||||
ForeignKeyDomainIndex.class,
|
||||
ForeignKeyHostIndex.class,
|
||||
DomainApplicationIndex.class,
|
||||
DomainBase.class,
|
||||
ContactResource.class,
|
||||
HostResource.class,
|
||||
HistoryEntry.class,
|
||||
PollMessage.class,
|
||||
BillingEvent.OneTime.class,
|
||||
BillingEvent.Recurring.class))
|
||||
.transform(CLASS_TO_KIND_FUNCTION)
|
||||
.toSet();
|
||||
|
||||
@Override
|
||||
MapreduceAction createAction() {
|
||||
private void runMapreduce() throws Exception {
|
||||
action = new KillAllEppResourcesAction();
|
||||
action.mrRunner = new MapreduceRunner(Optional.<Integer>absent(), Optional.<Integer>absent());
|
||||
action.response = new FakeResponse();
|
||||
return action;
|
||||
action.run();
|
||||
executeTasksUntilEmpty("mapreduce");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testKill() throws Exception {
|
||||
createTld("tld1");
|
||||
createTld("tld2");
|
||||
for (EppResource resource : asList(
|
||||
persistActiveDomain("foo.tld1"),
|
||||
persistActiveDomain("foo.tld2"),
|
||||
persistActiveDomainApplication("foo.tld1"),
|
||||
persistActiveDomainApplication("foo.tld2"),
|
||||
persistActiveContact("foo"),
|
||||
persistActiveContact("foo"),
|
||||
persistActiveHost("ns.foo.tld1"),
|
||||
persistActiveHost("ns.foo.tld2"))) {
|
||||
HistoryEntry history = new HistoryEntry.Builder().setParent(resource).build();
|
||||
for (ImmutableObject descendant : asList(
|
||||
history,
|
||||
new PollMessage.OneTime.Builder()
|
||||
.setParent(history)
|
||||
.setClientId("")
|
||||
.setEventTime(START_OF_TIME)
|
||||
.build(),
|
||||
new PollMessage.Autorenew.Builder()
|
||||
.setParent(history)
|
||||
.setClientId("")
|
||||
.setEventTime(START_OF_TIME)
|
||||
.build(),
|
||||
new BillingEvent.OneTime.Builder()
|
||||
.setParent(history)
|
||||
.setBillingTime(START_OF_TIME)
|
||||
.setEventTime(START_OF_TIME)
|
||||
.setClientId("")
|
||||
.setTargetId("")
|
||||
.setReason(Reason.ERROR)
|
||||
.setCost(Money.of(CurrencyUnit.USD, 1))
|
||||
.build(),
|
||||
new BillingEvent.Recurring.Builder()
|
||||
.setParent(history)
|
||||
.setEventTime(START_OF_TIME)
|
||||
.setClientId("")
|
||||
.setTargetId("")
|
||||
.setReason(Reason.ERROR)
|
||||
.build())) {
|
||||
persistResource(descendant);
|
||||
}
|
||||
}
|
||||
ImmutableMultimap<String, Object> beforeContents = getDatastoreContents();
|
||||
assertThat(beforeContents.keySet()).containsAllIn(AFFECTED_KINDS);
|
||||
assertThat(difference(beforeContents.keySet(), AFFECTED_KINDS)).isNotEmpty();
|
||||
runMapreduce();
|
||||
ofy().clearSessionCache();
|
||||
ImmutableMultimap<String, Object> afterContents = getDatastoreContents();
|
||||
assertThat(afterContents.keySet()).containsNoneIn(AFFECTED_KINDS);
|
||||
assertThat(afterContents)
|
||||
.containsExactlyEntriesIn(filterKeys(beforeContents, not(in(AFFECTED_KINDS))));
|
||||
}
|
||||
|
||||
private ImmutableMultimap<String, Object> getDatastoreContents() {
|
||||
ImmutableMultimap.Builder<String, Object> contentsBuilder = new ImmutableMultimap.Builder<>();
|
||||
// Filter out raw Entity objects created by the mapreduce.
|
||||
for (Object obj : Iterables.filter(ofy().load(), not(instanceOf(Entity.class)))) {
|
||||
contentsBuilder.put(Key.getKind(obj.getClass()), obj);
|
||||
}
|
||||
return contentsBuilder.build();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,15 +12,16 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.tools.server;
|
||||
package google.registry.tools.server;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static javax.servlet.http.HttpServletResponse.SC_OK;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.domain.registry.testing.AppEngineRule;
|
||||
import com.google.domain.registry.testing.ExceptionRule;
|
||||
import com.google.domain.registry.testing.FakeJsonResponse;
|
||||
|
||||
import google.registry.testing.AppEngineRule;
|
||||
import google.registry.testing.ExceptionRule;
|
||||
import google.registry.testing.FakeJsonResponse;
|
||||
|
||||
import org.junit.Rule;
|
||||
|
||||
|
|
|
@ -12,14 +12,15 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.tools.server;
|
||||
package google.registry.tools.server;
|
||||
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.createTld;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.createTlds;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistActiveDomain;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.createTlds;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveDomain;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.domain.registry.testing.FakeClock;
|
||||
|
||||
import google.registry.testing.FakeClock;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
import org.junit.Before;
|
||||
|
|
|
@ -12,13 +12,14 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.tools.server;
|
||||
package google.registry.tools.server;
|
||||
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.createTld;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistActiveHost;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveHost;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.domain.registry.testing.FakeClock;
|
||||
|
||||
import google.registry.testing.FakeClock;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
import org.junit.Before;
|
||||
|
|
|
@ -12,12 +12,13 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.tools.server;
|
||||
package google.registry.tools.server;
|
||||
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistPremiumList;
|
||||
import static google.registry.testing.DatastoreHelper.persistPremiumList;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.domain.registry.model.registry.label.PremiumList;
|
||||
|
||||
import google.registry.model.registry.label.PremiumList;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
|
|
@ -12,14 +12,15 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.tools.server;
|
||||
package google.registry.tools.server;
|
||||
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.createTlds;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.testing.DatastoreHelper.createTlds;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.domain.registry.model.registrar.Registrar;
|
||||
|
||||
import google.registry.model.registrar.Registrar;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
|
|
@ -12,15 +12,16 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.tools.server;
|
||||
package google.registry.tools.server;
|
||||
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.createTld;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistReservedList;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.persistReservedList;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.domain.registry.model.registry.Registry;
|
||||
import com.google.domain.registry.model.registry.label.ReservedList;
|
||||
|
||||
import google.registry.model.registry.Registry;
|
||||
import google.registry.model.registry.label.ReservedList;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
|
|
@ -12,12 +12,13 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.tools.server;
|
||||
package google.registry.tools.server;
|
||||
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.domain.registry.testing.FakeClock;
|
||||
|
||||
import google.registry.testing.FakeClock;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
import org.junit.Before;
|
||||
|
|
|
@ -12,17 +12,18 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.tools.server;
|
||||
package google.registry.tools.server;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.domain.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.persistActiveContact;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveContact;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.domain.registry.mapreduce.MapreduceRunner;
|
||||
import com.google.domain.registry.model.contact.ContactResource;
|
||||
import com.google.domain.registry.testing.FakeResponse;
|
||||
import com.google.domain.registry.testing.mapreduce.MapreduceTestCase;
|
||||
|
||||
import google.registry.mapreduce.MapreduceRunner;
|
||||
import google.registry.model.contact.ContactResource;
|
||||
import google.registry.testing.FakeResponse;
|
||||
import google.registry.testing.mapreduce.MapreduceTestCase;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
import org.junit.Before;
|
||||
|
|
|
@ -12,16 +12,16 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.tools.server;
|
||||
package google.registry.tools.server;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.createTlds;
|
||||
import static google.registry.testing.DatastoreHelper.createTlds;
|
||||
import static javax.servlet.http.HttpServletResponse.SC_OK;
|
||||
|
||||
import com.google.domain.registry.model.registry.label.PremiumList;
|
||||
import com.google.domain.registry.testing.AppEngineRule;
|
||||
import com.google.domain.registry.testing.ExceptionRule;
|
||||
import com.google.domain.registry.testing.FakeJsonResponse;
|
||||
import google.registry.model.registry.label.PremiumList;
|
||||
import google.registry.testing.AppEngineRule;
|
||||
import google.registry.testing.ExceptionRule;
|
||||
import google.registry.testing.FakeJsonResponse;
|
||||
|
||||
import org.joda.money.Money;
|
||||
import org.junit.Before;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue