diff --git a/java/google/registry/config/ConfigModule.java b/java/google/registry/config/ConfigModule.java index 6e32b6d6e..06632c726 100644 --- a/java/google/registry/config/ConfigModule.java +++ b/java/google/registry/config/ConfigModule.java @@ -468,8 +468,8 @@ public final class ConfigModule { /** * Returns the Google Cloud Storage bucket for importing escrow files. * - * @see google.registry.rde.RdeContactImportAction - * @see google.registry.rde.RdeHostImportAction + * @see google.registry.rde.imports.RdeContactImportAction + * @see google.registry.rde.imports.RdeHostImportAction */ @Provides @Config("rdeImportBucket") diff --git a/java/google/registry/module/backend/BUILD b/java/google/registry/module/backend/BUILD index 97818a900..ec1da65d5 100644 --- a/java/google/registry/module/backend/BUILD +++ b/java/google/registry/module/backend/BUILD @@ -32,6 +32,7 @@ java_library( "//java/google/registry/monitoring/metrics", "//java/google/registry/monitoring/whitebox", "//java/google/registry/rde", + "//java/google/registry/rde/imports", "//java/google/registry/request", "//java/google/registry/request:modules", "//java/google/registry/tmch", diff --git a/java/google/registry/module/backend/BackendRequestComponent.java b/java/google/registry/module/backend/BackendRequestComponent.java index 0c8682c38..42aa1cef1 100644 --- a/java/google/registry/module/backend/BackendRequestComponent.java +++ b/java/google/registry/module/backend/BackendRequestComponent.java @@ -50,13 +50,14 @@ import google.registry.monitoring.whitebox.MetricsExportAction; import google.registry.monitoring.whitebox.VerifyEntityIntegrityAction; import google.registry.monitoring.whitebox.WhiteboxModule; import google.registry.rde.BrdaCopyAction; -import google.registry.rde.RdeContactImportAction; -import google.registry.rde.RdeHostImportAction; import google.registry.rde.RdeModule; import google.registry.rde.RdeReportAction; import google.registry.rde.RdeReporter; import google.registry.rde.RdeStagingAction; import google.registry.rde.RdeUploadAction; +import google.registry.rde.imports.RdeContactImportAction; +import google.registry.rde.imports.RdeHostImportAction; +import google.registry.rde.imports.RdeImportsModule; import google.registry.request.RequestComponentBuilder; import google.registry.request.RequestModule; import google.registry.request.RequestScope; @@ -82,6 +83,7 @@ import google.registry.tmch.TmchSmdrlAction; ExportRequestModule.class, MapreduceModule.class, RdeModule.class, + RdeImportsModule.class, RequestModule.class, SheetModule.class, TmchModule.class, diff --git a/java/google/registry/rde/RdeModule.java b/java/google/registry/rde/RdeModule.java index 2f21fa9b9..16101ad66 100644 --- a/java/google/registry/rde/RdeModule.java +++ b/java/google/registry/rde/RdeModule.java @@ -28,7 +28,7 @@ import org.joda.time.DateTime; /** * Dagger module for RDE package. * - * @see "google.registry.module.backend.BackendComponent" + * @see "google.registry.module.backend.BackendRequestComponent" */ @Module public final class RdeModule { @@ -53,10 +53,4 @@ public final class RdeModule { static Queue provideQueueRdeReport() { return getQueue("rde-report"); } - - @Provides - @Parameter(PATH) - static String providePath(HttpServletRequest req) { - return RequestParameters.extractRequiredParameter(req, PATH); - } } diff --git a/java/google/registry/rde/imports/BUILD b/java/google/registry/rde/imports/BUILD new file mode 100644 index 000000000..3bb667eff --- /dev/null +++ b/java/google/registry/rde/imports/BUILD @@ -0,0 +1,37 @@ +package( + default_visibility = ["//visibility:public"], +) + +licenses(["notice"]) # Apache 2.0 + +java_library( + name = "imports", + srcs = glob(["*.java"]), + deps = [ + "//java/com/google/common/annotations", + "//java/com/google/common/base", + "//java/com/google/common/collect", + "//java/com/google/common/html", + "//java/com/google/common/io", + "//java/com/google/common/math", + "//java/com/google/common/net", + "//java/google/registry/config", + "//java/google/registry/gcs", + "//java/google/registry/mapreduce", + "//java/google/registry/model", + "//java/google/registry/request", + "//java/google/registry/util", + "//java/google/registry/xjc", + "//third_party/java/appengine:appengine-api", + "//third_party/java/appengine_gcs_client", + "//third_party/java/appengine_mapreduce2:appengine_mapreduce", + "//third_party/java/auto:auto_factory", + "//third_party/java/auto:auto_value", + "//third_party/java/dagger", + "//third_party/java/joda_time", + "//third_party/java/jsr305_annotations", + "//third_party/java/jsr330_inject", + "//third_party/java/objectify:objectify-v4_1", + "//third_party/java/servlet/servlet_api", + ], +) diff --git a/java/google/registry/rde/RdeContactImportAction.java b/java/google/registry/rde/imports/RdeContactImportAction.java similarity index 97% rename from java/google/registry/rde/RdeContactImportAction.java rename to java/google/registry/rde/imports/RdeContactImportAction.java index 220598b6b..6c813fae7 100644 --- a/java/google/registry/rde/RdeContactImportAction.java +++ b/java/google/registry/rde/imports/RdeContactImportAction.java @@ -12,11 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.rde; +package google.registry.rde.imports; import static google.registry.mapreduce.MapreduceRunner.PARAM_MAP_SHARDS; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.rde.RdeModule.PATH; import static google.registry.util.PipelineUtils.createJobPath; import com.google.appengine.tools.cloudstorage.GcsService; @@ -58,7 +57,7 @@ public class RdeContactImportAction implements Runnable { MapreduceRunner mrRunner, Response response, @Config("rdeImportBucket") String importBucketName, - @Parameter(PATH) String importFileName, + @Parameter("path") String importFileName, @Parameter(PARAM_MAP_SHARDS) Optional mapShards) { this.mrRunner = mrRunner; this.response = response; diff --git a/java/google/registry/rde/RdeContactInput.java b/java/google/registry/rde/imports/RdeContactInput.java similarity index 98% rename from java/google/registry/rde/RdeContactInput.java rename to java/google/registry/rde/imports/RdeContactInput.java index 53f3c84d9..66721ffcc 100644 --- a/java/google/registry/rde/RdeContactInput.java +++ b/java/google/registry/rde/imports/RdeContactInput.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.rde; +package google.registry.rde.imports; import static com.google.common.math.IntMath.divide; import static java.math.RoundingMode.CEILING; @@ -29,7 +29,7 @@ import com.google.common.collect.ImmutableList; import google.registry.config.ConfigModule; import google.registry.gcs.GcsUtils; import google.registry.model.contact.ContactResource; -import google.registry.rde.RdeParser.RdeHeader; +import google.registry.rde.imports.RdeParser.RdeHeader; import java.io.IOException; import java.io.InputStream; import java.util.List; diff --git a/java/google/registry/rde/RdeContactReader.java b/java/google/registry/rde/imports/RdeContactReader.java similarity index 98% rename from java/google/registry/rde/RdeContactReader.java rename to java/google/registry/rde/imports/RdeContactReader.java index b80e7c812..d4664ca20 100644 --- a/java/google/registry/rde/RdeContactReader.java +++ b/java/google/registry/rde/imports/RdeContactReader.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.rde; +package google.registry.rde.imports; import com.google.appengine.tools.cloudstorage.GcsFilename; import com.google.appengine.tools.cloudstorage.GcsService; diff --git a/java/google/registry/rde/RdeHostImportAction.java b/java/google/registry/rde/imports/RdeHostImportAction.java similarity index 96% rename from java/google/registry/rde/RdeHostImportAction.java rename to java/google/registry/rde/imports/RdeHostImportAction.java index 67948fdcb..2d3cb4915 100644 --- a/java/google/registry/rde/RdeHostImportAction.java +++ b/java/google/registry/rde/imports/RdeHostImportAction.java @@ -12,11 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.rde; +package google.registry.rde.imports; import static google.registry.mapreduce.MapreduceRunner.PARAM_MAP_SHARDS; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.rde.RdeModule.PATH; import static google.registry.util.PipelineUtils.createJobPath; import com.google.appengine.tools.cloudstorage.GcsService; @@ -58,7 +57,7 @@ public class RdeHostImportAction implements Runnable { MapreduceRunner mrRunner, Response response, @Config("rdeImportBucket") String importBucketName, - @Parameter(PATH) String importFileName, + @Parameter("path") String importFileName, @Parameter(PARAM_MAP_SHARDS) Optional mapShards) { this.mrRunner = mrRunner; this.response = response; diff --git a/java/google/registry/rde/RdeHostInput.java b/java/google/registry/rde/imports/RdeHostInput.java similarity index 98% rename from java/google/registry/rde/RdeHostInput.java rename to java/google/registry/rde/imports/RdeHostInput.java index cc2832577..572d37b5d 100644 --- a/java/google/registry/rde/RdeHostInput.java +++ b/java/google/registry/rde/imports/RdeHostInput.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.rde; +package google.registry.rde.imports; import static com.google.common.base.Preconditions.checkArgument; @@ -27,7 +27,7 @@ import com.google.common.collect.ImmutableList; import google.registry.config.ConfigModule; import google.registry.gcs.GcsUtils; import google.registry.model.host.HostResource; -import google.registry.rde.RdeParser.RdeHeader; +import google.registry.rde.imports.RdeParser.RdeHeader; import java.io.IOException; import java.io.InputStream; import java.util.List; diff --git a/java/google/registry/rde/RdeHostReader.java b/java/google/registry/rde/imports/RdeHostReader.java similarity index 98% rename from java/google/registry/rde/RdeHostReader.java rename to java/google/registry/rde/imports/RdeHostReader.java index c5e52d75f..897d518af 100644 --- a/java/google/registry/rde/RdeHostReader.java +++ b/java/google/registry/rde/imports/RdeHostReader.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.rde; +package google.registry.rde.imports; import com.google.appengine.tools.cloudstorage.GcsFilename; import com.google.appengine.tools.cloudstorage.GcsService; diff --git a/java/google/registry/rde/RdeImportUtils.java b/java/google/registry/rde/imports/RdeImportUtils.java similarity index 99% rename from java/google/registry/rde/RdeImportUtils.java rename to java/google/registry/rde/imports/RdeImportUtils.java index 920038765..9715c5d6a 100644 --- a/java/google/registry/rde/RdeImportUtils.java +++ b/java/google/registry/rde/imports/RdeImportUtils.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.rde; +package google.registry.rde.imports; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; diff --git a/java/google/registry/rde/imports/RdeImportsModule.java b/java/google/registry/rde/imports/RdeImportsModule.java new file mode 100644 index 000000000..384171e74 --- /dev/null +++ b/java/google/registry/rde/imports/RdeImportsModule.java @@ -0,0 +1,36 @@ +// Copyright 2016 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.rde.imports; + +import dagger.Module; +import dagger.Provides; +import google.registry.request.Parameter; +import google.registry.request.RequestParameters; +import javax.servlet.http.HttpServletRequest; + +/** + * Dagger module for RDE imports package. + * + * @see "google.registry.module.backend.BackendRequestComponent" + */ +@Module +public final class RdeImportsModule { + + @Provides + @Parameter("path") + static String providePath(HttpServletRequest req) { + return RequestParameters.extractRequiredParameter(req, "path"); + } +} diff --git a/java/google/registry/rde/RdeParser.java b/java/google/registry/rde/imports/RdeParser.java similarity index 99% rename from java/google/registry/rde/RdeParser.java rename to java/google/registry/rde/imports/RdeParser.java index 194da91c1..88c357fb4 100644 --- a/java/google/registry/rde/RdeParser.java +++ b/java/google/registry/rde/imports/RdeParser.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.rde; +package google.registry.rde.imports; import static com.google.common.base.Preconditions.checkArgument; import static google.registry.util.PreconditionsUtils.checkArgumentNotNull; diff --git a/java/google/registry/rde/XjcToContactResourceConverter.java b/java/google/registry/rde/imports/XjcToContactResourceConverter.java similarity index 99% rename from java/google/registry/rde/XjcToContactResourceConverter.java rename to java/google/registry/rde/imports/XjcToContactResourceConverter.java index 6b8415d55..507307902 100644 --- a/java/google/registry/rde/XjcToContactResourceConverter.java +++ b/java/google/registry/rde/imports/XjcToContactResourceConverter.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.rde; +package google.registry.rde.imports; import com.google.common.base.Function; import com.google.common.collect.ImmutableList; diff --git a/java/google/registry/rde/XjcToDomainResourceConverter.java b/java/google/registry/rde/imports/XjcToDomainResourceConverter.java similarity index 99% rename from java/google/registry/rde/XjcToDomainResourceConverter.java rename to java/google/registry/rde/imports/XjcToDomainResourceConverter.java index f5881a406..f3c84e04a 100644 --- a/java/google/registry/rde/XjcToDomainResourceConverter.java +++ b/java/google/registry/rde/imports/XjcToDomainResourceConverter.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.rde; +package google.registry.rde.imports; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; diff --git a/java/google/registry/rde/XjcToEppResourceConverter.java b/java/google/registry/rde/imports/XjcToEppResourceConverter.java similarity index 98% rename from java/google/registry/rde/XjcToEppResourceConverter.java rename to java/google/registry/rde/imports/XjcToEppResourceConverter.java index 715339223..1dda9bd7d 100644 --- a/java/google/registry/rde/XjcToEppResourceConverter.java +++ b/java/google/registry/rde/imports/XjcToEppResourceConverter.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.rde; +package google.registry.rde.imports; import com.google.common.base.Joiner; import google.registry.model.EppResource; diff --git a/java/google/registry/rde/XjcToHostResourceConverter.java b/java/google/registry/rde/imports/XjcToHostResourceConverter.java similarity index 98% rename from java/google/registry/rde/XjcToHostResourceConverter.java rename to java/google/registry/rde/imports/XjcToHostResourceConverter.java index caca20273..bf50f6aa5 100644 --- a/java/google/registry/rde/XjcToHostResourceConverter.java +++ b/java/google/registry/rde/imports/XjcToHostResourceConverter.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.rde; +package google.registry.rde.imports; import com.google.common.base.Function; import com.google.common.collect.ImmutableSet; diff --git a/javatests/google/registry/rde/RdeContactImportActionTest.java b/javatests/google/registry/rde/RdeContactImportActionTest.java deleted file mode 100644 index 64a2ca6f6..000000000 --- a/javatests/google/registry/rde/RdeContactImportActionTest.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2016 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.rde; - -import static com.google.common.truth.Truth.assertThat; -import static google.registry.model.ofy.ObjectifyService.ofy; - -import com.google.appengine.tools.cloudstorage.GcsFilename; -import com.google.appengine.tools.cloudstorage.GcsService; -import com.google.appengine.tools.cloudstorage.GcsServiceFactory; -import com.google.appengine.tools.cloudstorage.RetryParams; -import com.google.common.base.Optional; -import com.google.common.io.ByteSource; -import com.google.common.io.ByteStreams; -import google.registry.config.ConfigModule; -import google.registry.gcs.GcsUtils; -import google.registry.mapreduce.MapreduceRunner; -import google.registry.model.contact.ContactResource; -import google.registry.request.Response; -import google.registry.testing.FakeResponse; -import google.registry.testing.mapreduce.MapreduceTestCase; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.List; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; - -/** Unit tests for {@link RdeContactImportAction}. */ -@RunWith(MockitoJUnitRunner.class) -public class RdeContactImportActionTest extends MapreduceTestCase { - - private static final ByteSource DEPOSIT_1_CONTACT = RdeTestData.get("deposit_1_contact.xml"); - private static final String IMPORT_BUCKET_NAME = "import-bucket"; - private static final String IMPORT_FILE_NAME = "escrow-file.xml"; - - private static final GcsService GCS_SERVICE = - GcsServiceFactory.createGcsService(RetryParams.getDefaultInstance()); - - private MapreduceRunner mrRunner; - - private Response response; - - @Before - public void before() throws Exception { - response = new FakeResponse(); - mrRunner = makeDefaultRunner(); - action = new RdeContactImportAction( - mrRunner, - response, - IMPORT_BUCKET_NAME, - IMPORT_FILE_NAME, - Optional.of(3)); - } - - @Test - public void test_mapreduceSuccessfullyImportsContact() throws Exception { - pushToGcs(DEPOSIT_1_CONTACT); - runMapreduce(); - List contacts = ofy().load().type(ContactResource.class).list(); - assertThat(contacts).hasSize(1); - checkContact(contacts.get(0)); - } - - /** Verifies that contact id and ROID match expected values */ - private void checkContact(ContactResource contact) { - assertThat(contact.getContactId()).isEqualTo("contact1"); - assertThat(contact.getRepoId()).isEqualTo("contact1-TEST"); - } - - private void runMapreduce() throws Exception { - action.run(); - executeTasksUntilEmpty("mapreduce"); - } - - private void pushToGcs(ByteSource source) throws IOException { - try (OutputStream outStream = - new GcsUtils(GCS_SERVICE, ConfigModule.provideGcsBufferSize()) - .openOutputStream(new GcsFilename(IMPORT_BUCKET_NAME, IMPORT_FILE_NAME)); - InputStream inStream = source.openStream()) { - ByteStreams.copy(inStream, outStream); - } - } -} diff --git a/javatests/google/registry/rde/RdeContactInputTest.java b/javatests/google/registry/rde/RdeContactInputTest.java deleted file mode 100644 index a8514f478..000000000 --- a/javatests/google/registry/rde/RdeContactInputTest.java +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright 2016 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.rde; - -import static com.google.common.truth.Truth.assertThat; - -import com.google.appengine.tools.cloudstorage.GcsFilename; -import com.google.appengine.tools.cloudstorage.GcsService; -import com.google.appengine.tools.cloudstorage.GcsServiceFactory; -import com.google.appengine.tools.cloudstorage.RetryParams; -import com.google.common.base.Optional; -import com.google.common.io.ByteSource; -import com.google.common.io.ByteStreams; -import google.registry.config.ConfigModule; -import google.registry.gcs.GcsUtils; -import google.registry.testing.AppEngineRule; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.List; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; - -/** Unit tests for {@link RdeContactInput} */ -@RunWith(MockitoJUnitRunner.class) -public class RdeContactInputTest { - - private static final ByteSource DEPOSIT_0_CONTACT = - RdeTestData.get("deposit_0_contact_header.xml"); - private static final ByteSource DEPOSIT_1_CONTACT = - RdeTestData.get("deposit_1_contact.xml"); - private static final ByteSource DEPOSIT_199_CONTACT = - RdeTestData.get("deposit_199_contact_header.xml"); - private static final ByteSource DEPOSIT_200_CONTACT = - RdeTestData.get("deposit_200_contact_header.xml"); - private static final ByteSource DEPOSIT_1000_CONTACT = - RdeTestData.get("deposit_1000_contact_header.xml"); - private static final ByteSource DEPOSIT_10000_CONTACT = - RdeTestData.get("deposit_10000_contact_header.xml"); - private static final String IMPORT_BUCKET_NAME = "import-bucket"; - private static final String IMPORT_FILE_NAME = "escrow-file.xml"; - - private static final GcsService GCS_SERVICE = - GcsServiceFactory.createGcsService(RetryParams.getDefaultInstance()); - - @Rule - public final AppEngineRule appEngine = AppEngineRule.builder() - .withDatastore() - .build(); - - /** Escrow file with zero contacts results in one reader */ - @Test - public void testZeroContactsDefaultShards_returnsOneReader() throws Exception { - pushToGcs(DEPOSIT_0_CONTACT); - assertNumberOfReaders(Optional.absent(), 1); - } - - /** Escrow file with zero contacts results in expected reader configuration */ - @Test - public void testZeroContactsDefaultShardsReaderConfigurations() throws Exception { - pushToGcs(DEPOSIT_0_CONTACT); - assertReaderConfigurations(Optional.absent(), 0, 0, 100); - } - - /** Escrow file with zero contacts and 75 shards results in one reader */ - @Test - public void testZeroContacts75Shards_returnsOneReader() throws Exception { - pushToGcs(DEPOSIT_0_CONTACT); - assertNumberOfReaders(Optional.of(75), 1); - } - - /** Escrow file with one contact results in one reader */ - @Test - public void testOneContactDefaultShards_returnsOneReader() throws Exception { - pushToGcs(DEPOSIT_1_CONTACT); - assertNumberOfReaders(Optional.absent(), 1); - } - - /** Escrow file with one contact results in expected reader configuration */ - @Test - public void testOneContactDefaultShardsReaderConfigurations() throws Exception { - pushToGcs(DEPOSIT_1_CONTACT); - assertReaderConfigurations(Optional.absent(), 0, 0, 100); - } - - /** Escrow file with one contact and 75 shards results in one reader */ - @Test - public void testOneContact75Shards_returnsOneReader() throws Exception { - pushToGcs(DEPOSIT_1_CONTACT); - assertNumberOfReaders(Optional.of(75), 1); - } - - /** Escrow file with 199 contacts results in one reader */ - @Test - public void test199ContactsDefaultShards_returnsOneReader() throws Exception { - pushToGcs(DEPOSIT_199_CONTACT); - assertNumberOfReaders(Optional.absent(), 1); - } - - /** Escrow file with 199 contacts results in expected reader configuration */ - @Test - public void test199ContactsDefaultShardsReaderConfigurations() throws Exception { - pushToGcs(DEPOSIT_199_CONTACT); - assertReaderConfigurations(Optional.absent(), 0, 0, 199); - } - - /** Escrow file with 199 contacts and 75 shards results in one reader */ - @Test - public void test199Contacts75Shards_returnsOneReader() throws Exception { - pushToGcs(DEPOSIT_199_CONTACT); - assertNumberOfReaders(Optional.of(75), 1); - } - - /** Escrow file with 200 contacts results in two readers */ - @Test - public void test200ContactsDefaultShards_returnsTwoReaders() throws Exception { - pushToGcs(DEPOSIT_200_CONTACT); - assertNumberOfReaders(Optional.absent(), 2); - } - - /** Escrow file with 200 contacts results in expected reader configurations */ - @Test - public void test200ContactsDefaultShardsReaderConfigurations() throws Exception { - pushToGcs(DEPOSIT_200_CONTACT); - assertReaderConfigurations(Optional.absent(), 0, 0, 100); - assertReaderConfigurations(Optional.absent(), 1, 100, 100); - } - - /** Escrow file with 200 contacts and 75 shards results in two readers */ - @Test - public void test200Contacts75Shards_returnsOneReader() throws Exception { - pushToGcs(DEPOSIT_200_CONTACT); - assertNumberOfReaders(Optional.of(75), 2); - } - - /** Escrow file with 1000 contacts results in ten readers */ - @Test - public void test1000ContactsDefaultShards_returns10Readers() throws Exception { - pushToGcs(DEPOSIT_1000_CONTACT); - assertNumberOfReaders(Optional.absent(), 10); - } - - /** Escrow file with 1000 contacts results in expected reader configurations */ - @Test - public void test1000ContactsDefaultShardsReaderConfigurations() throws Exception { - pushToGcs(DEPOSIT_1000_CONTACT); - for (int i = 0; i < 10; i++) { - assertReaderConfigurations(Optional.absent(), i, i * 100, 100); - } - } - - /** Escrow file with 1000 contacts and 75 shards results in ten readers */ - @Test - public void test1000Contacts75Shards_returns10Readers() throws Exception { - pushToGcs(DEPOSIT_1000_CONTACT); - assertNumberOfReaders(Optional.of(75), 10); - } - - /** Escrow file with 10000 contacts results in 50 readers */ - @Test - public void test10000ContactsDefaultShards_returns50Readers() throws Exception { - pushToGcs(DEPOSIT_10000_CONTACT); - assertNumberOfReaders(Optional.absent(), 50); - } - - /** Escrow file with 10000 contacts results in expected reader configurations */ - @Test - public void test10000ContactsDefaultShardsReaderConfigurations() throws Exception { - pushToGcs(DEPOSIT_10000_CONTACT); - for (int i = 0; i < 50; i++) { - assertReaderConfigurations(Optional.absent(), i, i * 200, 200); - } - } - - /** Escrow file with 10000 contacts and 75 shards results in 75 readers */ - @Test - public void test10000Contacts75Shards_returns75Readers() throws Exception { - pushToGcs(DEPOSIT_10000_CONTACT); - assertNumberOfReaders(Optional.of(75), 75); - } - - /** Escrow file with 10000 contacts and 150 shards results in 100 readers */ - @Test - public void test10000Contacts150Shards_returns100Readers() throws Exception { - pushToGcs(DEPOSIT_10000_CONTACT); - assertNumberOfReaders(Optional.of(150), 100); - } - - /** - * Verify bucket, filename, offset and max results for a specific reader - * - * @param numberOfShards Number of desired shards ({@code Optional.absent()} uses default of 50) - * @param whichReader Index of the reader in the list that is produced by the - * {@link RdeContactInput} - * @param expectedOffset Expected offset of the reader - * @param expectedMaxResults Expected maxResults of the reader - */ - private void assertReaderConfigurations( - Optional numberOfShards, - int whichReader, - int expectedOffset, - int expectedMaxResults) throws Exception { - RdeContactInput input = getInput(numberOfShards); - List readers = input.createReaders(); - RdeContactReader reader = (RdeContactReader) readers.get(whichReader); - assertImportBucketAndFilename(reader); - assertThat(reader.offset).isEqualTo(expectedOffset); - assertThat(reader.maxResults).isEqualTo(expectedMaxResults); - } - - private void pushToGcs(ByteSource source) throws IOException { - try (OutputStream outStream = - new GcsUtils(GCS_SERVICE, ConfigModule.provideGcsBufferSize()) - .openOutputStream(new GcsFilename(IMPORT_BUCKET_NAME, IMPORT_FILE_NAME)); - InputStream inStream = source.openStream()) { - ByteStreams.copy(inStream, outStream); - } - } - - /** - * Verify the number of readers produced by the {@link RdeContactInput} - * - * @param numberOfShards Number of desired shards ({@code Optional.absent()} uses default of 50) - * @param expectedNumberOfReaders Expected size of the list returned - */ - private void assertNumberOfReaders(Optional numberOfShards, - int expectedNumberOfReaders) throws Exception { - RdeContactInput input = getInput(numberOfShards); - List readers = input.createReaders(); - assertThat(readers).hasSize(expectedNumberOfReaders); - } - - /** - * Creates a new testable instance of {@link RdeContactInput} - * @param mapShards Number of desired shards ({@code Optional.absent()} uses default of 50) - */ - private RdeContactInput getInput(Optional mapShards) { - return new RdeContactInput(mapShards, IMPORT_BUCKET_NAME, IMPORT_FILE_NAME); - } - - /** - * Verifies the configured import bucket and file names. - */ - private void assertImportBucketAndFilename(RdeContactReader reader) { - assertThat(reader.importBucketName).isEqualTo("import-bucket"); - assertThat(reader.importFileName).isEqualTo("escrow-file.xml"); - } -} diff --git a/javatests/google/registry/rde/RdeContactReaderTest.java b/javatests/google/registry/rde/RdeContactReaderTest.java deleted file mode 100644 index 7a3c4da06..000000000 --- a/javatests/google/registry/rde/RdeContactReaderTest.java +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright 2016 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.rde; - -import static com.google.common.truth.Truth.assertThat; - -import com.google.appengine.tools.cloudstorage.GcsFilename; -import com.google.appengine.tools.cloudstorage.GcsService; -import com.google.appengine.tools.cloudstorage.GcsServiceFactory; -import com.google.appengine.tools.cloudstorage.RetryParams; -import com.google.common.io.ByteSource; -import com.google.common.io.ByteStreams; -import google.registry.config.ConfigModule; -import google.registry.gcs.GcsUtils; -import google.registry.model.contact.ContactResource; -import google.registry.testing.AppEngineRule; -import google.registry.testing.ExceptionRule; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.OutputStream; -import java.util.NoSuchElementException; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; - -/** Unit tests for {@link RdeContactReader} */ -@RunWith(MockitoJUnitRunner.class) -public class RdeContactReaderTest { - - private static final ByteSource DEPOSIT_1_CONTACT = RdeTestData.get("deposit_1_contact.xml"); - private static final ByteSource DEPOSIT_3_CONTACT = RdeTestData.get("deposit_3_contact.xml"); - private static final ByteSource DEPOSIT_4_CONTACT = RdeTestData.get("deposit_4_contact.xml"); - private static final ByteSource DEPOSIT_10_CONTACT = RdeTestData.get("deposit_10_contact.xml"); - private static final String IMPORT_BUCKET_NAME = "rde-import"; - private static final String IMPORT_FILE_NAME = "escrow-file.xml"; - - private static final GcsService GCS_SERVICE = - GcsServiceFactory.createGcsService(RetryParams.getDefaultInstance()); - - @Rule - public final AppEngineRule appEngine = AppEngineRule.builder() - .withDatastore() - .build(); - - @Rule - public final ExceptionRule thrown = new ExceptionRule(); - - /** Reads at least one result at 0 offset 1 maxResults */ - @Test - public void testZeroOffsetOneResult_readsOne() throws Exception { - pushToGcs(DEPOSIT_1_CONTACT); - RdeContactReader reader = getReader(0, 1); - ContactResource contact1 = reader.next(); - checkContact(contact1, "contact1", "contact1-TEST"); - } - - /** Reads at most one at 0 offset 1 maxResults */ - @Test - public void testZeroOffsetOneResult_stopsAfterOne() throws Exception { - pushToGcs(DEPOSIT_3_CONTACT); - RdeContactReader reader = getReader(0, 1); - reader.next(); - thrown.expect(NoSuchElementException.class); - reader.next(); - } - - /** Skips already-processed records after rehydration */ - @Test - public void testZeroOffsetOneResult_skipsOneAfterRehydration() throws Exception { - pushToGcs(DEPOSIT_3_CONTACT); - RdeContactReader reader = getReader(0, 1); - reader.next(); - reader.endSlice(); - - reader = cloneReader(reader); - reader.beginSlice(); - // reader will not advance any further - thrown.expect(NoSuchElementException.class); - reader.next(); - } - - /** Reads three contacts */ - @Test - public void testZeroOffsetThreeResult_readsThree() throws Exception { - pushToGcs(DEPOSIT_3_CONTACT); - RdeContactReader reader = getReader(0, 3); - checkContact(reader.next(), "contact1", "contact1-TEST"); - checkContact(reader.next(), "contact2", "contact2-TEST"); - checkContact(reader.next(), "contact3", "contact3-TEST"); - } - - /** Stops reading at 3 maxResults */ - @Test - public void testZeroOffsetThreeResult_stopsAtThree() throws Exception { - pushToGcs(DEPOSIT_4_CONTACT); - RdeContactReader reader = getReader(0, 3); - for (int i = 0; i < 3; i++) { - reader.next(); - } - thrown.expect(NoSuchElementException.class); - reader.next(); - } - - /** Reads one contact from file then stops at end of file */ - @Test - public void testZeroOffsetThreeResult_endOfFile() throws Exception { - pushToGcs(DEPOSIT_1_CONTACT); - RdeContactReader reader = getReader(0, 3); - reader.next(); - thrown.expect(NoSuchElementException.class); - reader.next(); - } - - /** Skips three contacts with offset of three */ - @Test - public void testThreeOffsetOneResult_skipsThree() throws Exception { - pushToGcs(DEPOSIT_4_CONTACT); - RdeContactReader reader = getReader(3, 1); - checkContact(reader.next(), "contact4", "contact4-TEST"); - } - - /** Skips four contacts after advancing once at three offset, then rehydrating */ - @Test - public void testThreeOffsetTwoResult_skipsFourAfterRehydration() throws Exception { - pushToGcs(DEPOSIT_10_CONTACT); - RdeContactReader reader = getReader(3, 2); - reader.next(); - reader.endSlice(); - reader = cloneReader(reader); - reader.beginSlice(); - checkContact(reader.next(), "contact5", "contact5-TEST"); - } - - /** Reads three at zero offset three results with rehydration in the middle */ - @Test - public void testZeroOffsetThreeResult_readsThreeWithRehydration() throws Exception { - pushToGcs(DEPOSIT_4_CONTACT); - RdeContactReader reader = getReader(0, 3); - checkContact(reader.next(), "contact1", "contact1-TEST"); - reader.endSlice(); - reader = cloneReader(reader); - reader.beginSlice(); - checkContact(reader.next(), "contact2", "contact2-TEST"); - checkContact(reader.next(), "contact3", "contact3-TEST"); - } - - /** Stops reading at three with zero offset three results with rehydration in the middle */ - @Test - public void testZeroOffsetThreeResult_stopsAtThreeWithRehydration() throws Exception { - pushToGcs(DEPOSIT_4_CONTACT); - RdeContactReader reader = getReader(0, 3); - reader.next(); - reader.endSlice(); - reader = cloneReader(reader); - reader.beginSlice(); - reader.next(); - reader.next(); - thrown.expect(NoSuchElementException.class); - reader.next(); - } - - private void pushToGcs(ByteSource source) throws IOException { - try (OutputStream outStream = - new GcsUtils(GCS_SERVICE, ConfigModule.provideGcsBufferSize()) - .openOutputStream(new GcsFilename(IMPORT_BUCKET_NAME, IMPORT_FILE_NAME)); - InputStream inStream = source.openStream()) { - ByteStreams.copy(inStream, outStream); - } - } - - /** Creates a deep copy of the {@link RdeContactReader} */ - private RdeContactReader cloneReader( - RdeContactReader reader) throws Exception { - ByteArrayOutputStream bout = new ByteArrayOutputStream(); - ObjectOutputStream oout = new ObjectOutputStream(bout); - oout.writeObject(reader); - ByteArrayInputStream bin = new ByteArrayInputStream(bout.toByteArray()); - ObjectInputStream oin = new ObjectInputStream(bin); - RdeContactReader result = (RdeContactReader) oin.readObject(); - return result; - } - - /** Verifies that contact id and ROID match expected values */ - private void checkContact(ContactResource contact, String contactId, String repoId) { - assertThat(contact).isNotNull(); - assertThat(contact.getContactId()).isEqualTo(contactId); - assertThat(contact.getRepoId()).isEqualTo(repoId); - } - - /** Gets a new {@link RdeContactReader} with specified offset and maxResults */ - private RdeContactReader getReader(int offset, int maxResults) throws Exception { - RdeContactReader reader = - new RdeContactReader(IMPORT_BUCKET_NAME, IMPORT_FILE_NAME, offset, maxResults); - reader.beginSlice(); - return reader; - } -} diff --git a/javatests/google/registry/rde/RdeHostImportActionTest.java b/javatests/google/registry/rde/RdeHostImportActionTest.java deleted file mode 100644 index 3a486bd8b..000000000 --- a/javatests/google/registry/rde/RdeHostImportActionTest.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2016 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.rde; - -import static com.google.common.truth.Truth.assertThat; -import static google.registry.model.ofy.ObjectifyService.ofy; - -import com.google.appengine.tools.cloudstorage.GcsFilename; -import com.google.appengine.tools.cloudstorage.GcsService; -import com.google.appengine.tools.cloudstorage.GcsServiceFactory; -import com.google.appengine.tools.cloudstorage.RetryParams; -import com.google.common.base.Optional; -import com.google.common.io.ByteSource; -import com.google.common.io.ByteStreams; -import google.registry.config.ConfigModule; -import google.registry.gcs.GcsUtils; -import google.registry.mapreduce.MapreduceRunner; -import google.registry.model.host.HostResource; -import google.registry.request.Response; -import google.registry.testing.FakeResponse; -import google.registry.testing.mapreduce.MapreduceTestCase; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.List; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; - -/** Unit tests for {@link RdeHostImportAction}. */ -@RunWith(MockitoJUnitRunner.class) -public class RdeHostImportActionTest extends MapreduceTestCase { - - private static final ByteSource DEPOSIT_1_HOST = RdeTestData.get("deposit_1_host.xml"); - private static final String IMPORT_BUCKET_NAME = "import-bucket"; - private static final String IMPORT_FILE_NAME = "escrow-file.xml"; - - private static final GcsService GCS_SERVICE = - GcsServiceFactory.createGcsService(RetryParams.getDefaultInstance()); - - private MapreduceRunner mrRunner; - - private Response response; - - private final Optional mapShards = Optional.absent(); - - @Before - public void before() throws Exception { - response = new FakeResponse(); - mrRunner = new MapreduceRunner(Optional.absent(), Optional.absent()); - action = new RdeHostImportAction( - mrRunner, - response, - IMPORT_BUCKET_NAME, - IMPORT_FILE_NAME, - mapShards); - } - - @Test - public void test_mapreduceSuccessfullyImportsHost() throws Exception { - pushToGcs(DEPOSIT_1_HOST); - runMapreduce(); - List hosts = ofy().load().type(HostResource.class).list(); - assertThat(hosts).hasSize(1); - checkHost(hosts.get(0)); - } - - /** Verifies that host id and ROID match expected values */ - private void checkHost(HostResource host) { - assertThat(host.getFullyQualifiedHostName()).isEqualTo("ns1.example1.test"); - assertThat(host.getRepoId()).isEqualTo("Hns1_example1_test-TEST"); - } - - private void runMapreduce() throws Exception { - action.run(); - executeTasksUntilEmpty("mapreduce"); - } - - private void pushToGcs(ByteSource source) throws IOException { - try (OutputStream outStream = - new GcsUtils(GCS_SERVICE, ConfigModule.provideGcsBufferSize()) - .openOutputStream(new GcsFilename(IMPORT_BUCKET_NAME, IMPORT_FILE_NAME)); - InputStream inStream = source.openStream()) { - ByteStreams.copy(inStream, outStream); - } - } -} diff --git a/javatests/google/registry/rde/RdeHostInputTest.java b/javatests/google/registry/rde/RdeHostInputTest.java deleted file mode 100644 index 5e1807b6b..000000000 --- a/javatests/google/registry/rde/RdeHostInputTest.java +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright 2016 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.rde; - -import static com.google.common.truth.Truth.assertThat; - -import com.google.appengine.tools.cloudstorage.GcsFilename; -import com.google.appengine.tools.cloudstorage.GcsService; -import com.google.appengine.tools.cloudstorage.GcsServiceFactory; -import com.google.appengine.tools.cloudstorage.RetryParams; -import com.google.common.base.Optional; -import com.google.common.io.ByteSource; -import com.google.common.io.ByteStreams; -import google.registry.config.ConfigModule; -import google.registry.gcs.GcsUtils; -import google.registry.testing.AppEngineRule; -import google.registry.testing.ExceptionRule; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.List; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -/** Unit tests for {@link RdeHostInput} */ -@RunWith(JUnit4.class) -public class RdeHostInputTest { - - private static final ByteSource DEPOSIT_0_HOST = RdeTestData.get("deposit_0_host_header.xml"); - private static final ByteSource DEPOSIT_1_HOST = RdeTestData.get("deposit_1_host.xml"); - private static final ByteSource DEPOSIT_199_HOST = RdeTestData.get("deposit_199_host_header.xml"); - private static final ByteSource DEPOSIT_200_HOST = RdeTestData.get("deposit_200_host_header.xml"); - private static final ByteSource DEPOSIT_1000_HOST = - RdeTestData.get("deposit_1000_host_header.xml"); - private static final ByteSource DEPOSIT_10000_HOST = - RdeTestData.get("deposit_10000_host_header.xml"); - private static final String IMPORT_BUCKET_NAME = "import-bucket"; - private static final String IMPORT_FILE_NAME = "escrow-file.xml"; - - private static final GcsService GCS_SERVICE = - GcsServiceFactory.createGcsService(RetryParams.getDefaultInstance()); - - @Rule - public final AppEngineRule appEngine = AppEngineRule.builder() - .withDatastore() - .build(); - - @Rule - public final ExceptionRule thrown = new ExceptionRule(); - - /** Number of shards cannot be negative */ - @Test - public void testNegativeShards_throwsIllegalArgumentException() throws Exception { - thrown.expect(IllegalArgumentException.class, "Number of shards must be greater than zero"); - getInput(Optional.of(-1)); - } - - /** Number of shards cannot be zero */ - @Test - public void testZeroShards_throwsIllegalArgumentException() throws Exception { - thrown.expect(IllegalArgumentException.class, "Number of shards must be greater than zero"); - getInput(Optional.of(0)); - } - - /** Escrow file with zero hosts results in one reader */ - @Test - public void testZeroHostsDefaultShards_returnsOneReader() throws Exception { - pushToGcs(DEPOSIT_0_HOST); - assertNumberOfReaders(Optional.absent(), 1); - } - - /** Escrow file with zero hosts results in expected reader configuration */ - @Test - public void testZeroHostsDefaultShardsReaderConfigurations() throws Exception { - pushToGcs(DEPOSIT_0_HOST); - assertReaderConfigurations(Optional.absent(), 0, 0, 100); - } - - /** Escrow file with zero hosts and 75 shards results in one reader */ - @Test - public void testZeroHosts75Shards_returnsOneReader() throws Exception { - pushToGcs(DEPOSIT_0_HOST); - assertNumberOfReaders(Optional.of(75), 1); - } - - /** Escrow file with one host results in one reader */ - @Test - public void testOneHostDefaultShards_returnsOneReader() throws Exception { - pushToGcs(DEPOSIT_1_HOST); - assertNumberOfReaders(Optional.absent(), 1); - } - - /** Escrow file with one host results in expected reader configuration */ - @Test - public void testOneHostDefaultShardsReaderConfigurations() throws Exception { - pushToGcs(DEPOSIT_1_HOST); - assertReaderConfigurations(Optional.absent(), 0, 0, 100); - } - - /** Escrow file with one host and 75 shards results in one reader */ - @Test - public void testOneHost75Shards_returnsOneReader() throws Exception { - pushToGcs(DEPOSIT_1_HOST); - assertNumberOfReaders(Optional.of(75), 1); - } - - /** Escrow file with 199 hosts results in one reader */ - @Test - public void test199HostsDefaultShards_returnsOneReader() throws Exception { - pushToGcs(DEPOSIT_199_HOST); - assertNumberOfReaders(Optional.absent(), 1); - } - - /** Escrow file with 199 hosts results in expected reader configuration */ - @Test - public void test199HostsDefaultShardsReaderConfigurations() throws Exception { - pushToGcs(DEPOSIT_199_HOST); - assertReaderConfigurations(Optional.absent(), 0, 0, 199); - } - - /** Escrow file with 199 hosts and 75 shards results in one reader */ - @Test - public void test199Hosts75Shards_returnsOneReader() throws Exception { - pushToGcs(DEPOSIT_199_HOST); - assertNumberOfReaders(Optional.of(75), 1); - } - - /** Escrow file with 200 hosts results in two readers */ - @Test - public void test200HostsDefaultShards_returnsTwoReaders() throws Exception { - pushToGcs(DEPOSIT_200_HOST); - assertNumberOfReaders(Optional.absent(), 2); - } - - /** Escrow file with 200 hosts results in expected reader configurations */ - @Test - public void test200HostsDefaultShardsReaderConfigurations() throws Exception { - pushToGcs(DEPOSIT_200_HOST); - assertReaderConfigurations(Optional.absent(), 0, 0, 100); - assertReaderConfigurations(Optional.absent(), 1, 100, 100); - } - - /** Escrow file with 200 hosts and 75 shards results in two readers */ - @Test - public void test200Hosts75Shards_returnsOneReader() throws Exception { - pushToGcs(DEPOSIT_200_HOST); - assertNumberOfReaders(Optional.of(75), 2); - } - - /** Escrow file with 1000 hosts results in ten readers */ - @Test - public void test1000HostsDefaultShards_returns10Readers() throws Exception { - pushToGcs(DEPOSIT_1000_HOST); - assertNumberOfReaders(Optional.absent(), 10); - } - - /** Escrow file with 1000 hosts results in expected reader configurations */ - @Test - public void test1000HostsDefaultShardsReaderConfigurations() throws Exception { - pushToGcs(DEPOSIT_1000_HOST); - for (int i = 0; i < 10; i++) { - assertReaderConfigurations(Optional.absent(), i, i * 100, 100); - } - } - - /** Escrow file with 1000 hosts and 75 shards results in ten readers */ - @Test - public void test1000Hosts75Shards_returns10Readers() throws Exception { - pushToGcs(DEPOSIT_1000_HOST); - assertNumberOfReaders(Optional.of(75), 10); - } - - /** Escrow file with 10000 hosts results in 50 readers */ - @Test - public void test10000HostsDefaultShards_returns50Readers() throws Exception { - pushToGcs(DEPOSIT_10000_HOST); - assertNumberOfReaders(Optional.absent(), 50); - } - - /** Escrow file with 10000 hosts results in expected reader configurations */ - @Test - public void test10000HostsDefaultShardsReaderConfigurations() throws Exception { - pushToGcs(DEPOSIT_10000_HOST); - for (int i = 0; i < 50; i++) { - assertReaderConfigurations(Optional.absent(), i, i * 200, 200); - } - } - - /** Escrow file with 10000 hosts and 75 shards results in 75 readers */ - @Test - public void test10000Hosts75Shards_returns75Readers() throws Exception { - pushToGcs(DEPOSIT_10000_HOST); - assertNumberOfReaders(Optional.of(75), 75); - } - - /** Escrow file with 10000 hosts and 150 shards results in 100 readers */ - @Test - public void test10000Hosts150Shards_returns100Readers() throws Exception { - pushToGcs(DEPOSIT_10000_HOST); - assertNumberOfReaders(Optional.of(150), 100); - } - - /** - * Verify bucket, filename, offset and max results for a specific reader - * - * @param numberOfShards Number of desired shards ({@link Optional#absent} uses default of 50) - * @param whichReader Index of the reader in the list that is produced by the {@link RdeHostInput} - * @param expectedOffset Expected offset of the reader - * @param expectedMaxResults Expected maxResults of the reader - */ - private void assertReaderConfigurations( - Optional numberOfShards, int whichReader, int expectedOffset, int expectedMaxResults) - throws Exception { - RdeHostInput input = getInput(numberOfShards); - List readers = input.createReaders(); - RdeHostReader reader = (RdeHostReader) readers.get(whichReader); - assertImportBucketAndFilename(reader); - assertThat(reader.offset).isEqualTo(expectedOffset); - assertThat(reader.maxResults).isEqualTo(expectedMaxResults); - } - - private void pushToGcs(ByteSource source) throws IOException { - try (OutputStream outStream = - new GcsUtils(GCS_SERVICE, ConfigModule.provideGcsBufferSize()) - .openOutputStream(new GcsFilename(IMPORT_BUCKET_NAME, IMPORT_FILE_NAME)); - InputStream inStream = source.openStream()) { - ByteStreams.copy(inStream, outStream); - } - } - - /** - * Verify the number of readers produced by the {@link RdeHostInput} - * - * @param numberOfShards Number of desired shards ({@link Optional#absent} uses default of 50) - * @param expectedNumberOfReaders Expected size of the list returned - */ - private void assertNumberOfReaders(Optional numberOfShards, int expectedNumberOfReaders) - throws Exception { - RdeHostInput input = getInput(numberOfShards); - List readers = input.createReaders(); - assertThat(readers).hasSize(expectedNumberOfReaders); - } - - /** - * Creates a new testable instance of {@link RdeHostInput} - * @param mapShards Number of desired shards ({@link Optional#absent} uses default of 50) - */ - private RdeHostInput getInput(Optional mapShards) { - return new RdeHostInput(mapShards, IMPORT_BUCKET_NAME, IMPORT_FILE_NAME); - } - - /** - * Verifies the configured import bucket and file names. - */ - private void assertImportBucketAndFilename(RdeHostReader reader) { - assertThat(reader.importBucketName).isEqualTo("import-bucket"); - assertThat(reader.importFileName).isEqualTo("escrow-file.xml"); - } -} diff --git a/javatests/google/registry/rde/RdeHostReaderTest.java b/javatests/google/registry/rde/RdeHostReaderTest.java deleted file mode 100644 index ef3f37c55..000000000 --- a/javatests/google/registry/rde/RdeHostReaderTest.java +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright 2016 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.rde; - -import static com.google.common.truth.Truth.assertThat; - -import com.google.appengine.tools.cloudstorage.GcsFilename; -import com.google.appengine.tools.cloudstorage.GcsService; -import com.google.appengine.tools.cloudstorage.GcsServiceFactory; -import com.google.appengine.tools.cloudstorage.RetryParams; -import com.google.common.io.ByteSource; -import com.google.common.io.ByteStreams; -import google.registry.config.ConfigModule; -import google.registry.gcs.GcsUtils; -import google.registry.model.host.HostResource; -import google.registry.testing.AppEngineRule; -import google.registry.testing.ExceptionRule; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.OutputStream; -import java.util.NoSuchElementException; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; - -/** Unit tests for {@link RdeHostReader} */ -@RunWith(MockitoJUnitRunner.class) -public class RdeHostReaderTest { - - private static final ByteSource DEPOSIT_1_HOST = RdeTestData.get("deposit_1_host.xml"); - private static final ByteSource DEPOSIT_3_HOST = RdeTestData.get("deposit_3_host.xml"); - private static final ByteSource DEPOSIT_4_HOST = RdeTestData.get("deposit_4_host.xml"); - private static final ByteSource DEPOSIT_10_HOST = RdeTestData.get("deposit_10_host.xml"); - private static final String IMPORT_BUCKET_NAME = "rde-import"; - private static final String IMPORT_FILE_NAME = "escrow-file.xml"; - - private static final GcsService GCS_SERVICE = - GcsServiceFactory.createGcsService(RetryParams.getDefaultInstance()); - - @Rule - public final AppEngineRule appEngine = AppEngineRule.builder() - .withDatastore() - .build(); - - @Rule - public final ExceptionRule thrown = new ExceptionRule(); - - /** Reads at least one result at 0 offset 1 maxResults */ - @Test - public void testZeroOffsetOneResult_readsOne() throws Exception { - pushToGcs(DEPOSIT_1_HOST); - RdeHostReader reader = getReader(0, 1); - HostResource host1 = reader.next(); - checkHost(host1, "ns1.example1.test", "Hns1_example1_test-TEST"); - } - - /** Reads at most one at 0 offset 1 maxResults */ - @Test - public void testZeroOffsetOneResult_stopsAfterOne() throws Exception { - pushToGcs(DEPOSIT_3_HOST); - RdeHostReader reader = getReader(0, 1); - reader.next(); - thrown.expect(NoSuchElementException.class); - reader.next(); - } - - /** Skips already-processed records after rehydration */ - @Test - public void testZeroOffsetOneResult_skipsOneAfterRehydration() throws Exception { - pushToGcs(DEPOSIT_3_HOST); - RdeHostReader reader = getReader(0, 1); - reader.next(); - reader.endSlice(); - - reader = cloneReader(reader); - reader.beginSlice(); - // reader will not advance any further - thrown.expect(NoSuchElementException.class); - reader.next(); - } - - /** Reads three hosts */ - @Test - public void testZeroOffsetThreeResult_readsThree() throws Exception { - pushToGcs(DEPOSIT_3_HOST); - RdeHostReader reader = getReader(0, 3); - checkHost(reader.next(), "ns1.example1.test", "Hns1_example1_test-TEST"); - checkHost(reader.next(), "ns1.example2.test", "Hns1_example2_test-TEST"); - checkHost(reader.next(), "ns1.example3.test", "Hns1_example3_test-TEST"); - } - - /** Stops reading at 3 maxResults */ - @Test - public void testZeroOffsetThreeResult_stopsAtThree() throws Exception { - pushToGcs(DEPOSIT_4_HOST); - RdeHostReader reader = getReader(0, 3); - for (int i = 0; i < 3; i++) { - reader.next(); - } - thrown.expect(NoSuchElementException.class); - reader.next(); - } - - /** Reads one host from file then stops at end of file */ - @Test - public void testZeroOffsetThreeResult_endOfFile() throws Exception { - pushToGcs(DEPOSIT_1_HOST); - RdeHostReader reader = getReader(0, 3); - reader.next(); - thrown.expect(NoSuchElementException.class); - reader.next(); - } - - /** Skips three hosts with offset of three */ - @Test - public void testThreeOffsetOneResult_skipsThree() throws Exception { - pushToGcs(DEPOSIT_4_HOST); - RdeHostReader reader = getReader(3, 1); - checkHost(reader.next(), "ns1.example4.test", "Hns1_example4_test-TEST"); - } - - /** Skips four hosts after advancing once at three offset, then rehydrating */ - @Test - public void testThreeOffsetTwoResult_skipsFourAfterRehydration() throws Exception { - pushToGcs(DEPOSIT_10_HOST); - RdeHostReader reader = getReader(3, 2); - reader.next(); - reader.endSlice(); - reader = cloneReader(reader); - reader.beginSlice(); - checkHost(reader.next(), "ns1.example5.test", "Hns1_example5_test-TEST"); - } - - /** Reads three at zero offset three results with rehydration in the middle */ - @Test - public void testZeroOffsetThreeResult_readsThreeWithRehydration() throws Exception { - pushToGcs(DEPOSIT_4_HOST); - RdeHostReader reader = getReader(0, 3); - checkHost(reader.next(), "ns1.example1.test", "Hns1_example1_test-TEST"); - reader.endSlice(); - reader = cloneReader(reader); - reader.beginSlice(); - checkHost(reader.next(), "ns1.example2.test", "Hns1_example2_test-TEST"); - checkHost(reader.next(), "ns1.example3.test", "Hns1_example3_test-TEST"); - } - - /** Stops reading at three with zero offset three results with rehydration in the middle */ - @Test - public void testZeroOffsetThreeResult_stopsAtThreeWithRehydration() throws Exception { - pushToGcs(DEPOSIT_4_HOST); - RdeHostReader reader = getReader(0, 3); - reader.next(); - reader.endSlice(); - reader = cloneReader(reader); - reader.beginSlice(); - reader.next(); - reader.next(); - thrown.expect(NoSuchElementException.class); - reader.next(); - } - - private void pushToGcs(ByteSource source) throws IOException { - try (OutputStream outStream = - new GcsUtils(GCS_SERVICE, ConfigModule.provideGcsBufferSize()) - .openOutputStream(new GcsFilename(IMPORT_BUCKET_NAME, IMPORT_FILE_NAME)); - InputStream inStream = source.openStream()) { - ByteStreams.copy(inStream, outStream); - } - } - - /** Creates a deep copy of the {@link RdeHostReader} */ - private RdeHostReader cloneReader( - RdeHostReader reader) throws Exception { - ByteArrayOutputStream bout = new ByteArrayOutputStream(); - ObjectOutputStream oout = new ObjectOutputStream(bout); - oout.writeObject(reader); - ByteArrayInputStream bin = new ByteArrayInputStream(bout.toByteArray()); - ObjectInputStream oin = new ObjectInputStream(bin); - RdeHostReader result = (RdeHostReader) oin.readObject(); - return result; - } - - /** Verifies that domain name and ROID match expected values */ - private void checkHost(HostResource host, String domainName, String repoId) { - assertThat(host).isNotNull(); - assertThat(host.getFullyQualifiedHostName()).isEqualTo(domainName); - assertThat(host.getRepoId()).isEqualTo(repoId); - } - - /** Gets a new {@link RdeHostReader} with specified offset and maxResults */ - private RdeHostReader getReader(int offset, int maxResults) throws Exception { - RdeHostReader reader = - new RdeHostReader(IMPORT_BUCKET_NAME, IMPORT_FILE_NAME, offset, maxResults); - reader.beginSlice(); - return reader; - } -} diff --git a/javatests/google/registry/rde/RdeImportUtilsTest.java b/javatests/google/registry/rde/RdeImportUtilsTest.java deleted file mode 100644 index 6c066c28c..000000000 --- a/javatests/google/registry/rde/RdeImportUtilsTest.java +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright 2016 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.rde; - -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.persistNewRegistrar; -import static google.registry.testing.DatastoreHelper.persistResource; -import static org.joda.time.DateTimeZone.UTC; -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -import com.google.appengine.tools.cloudstorage.GcsFilename; -import com.google.common.base.Predicate; -import com.google.common.collect.FluentIterable; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableSet; -import com.google.common.io.ByteSource; -import com.googlecode.objectify.Key; -import com.googlecode.objectify.Work; -import google.registry.gcs.GcsUtils; -import google.registry.model.EppResource; -import google.registry.model.contact.ContactResource; -import google.registry.model.host.HostResource; -import google.registry.model.index.EppResourceIndex; -import google.registry.model.index.EppResourceIndexBucket; -import google.registry.model.index.ForeignKeyIndex; -import google.registry.model.registry.Registry.TldState; -import google.registry.testing.AppEngineRule; -import google.registry.testing.ExceptionRule; -import google.registry.testing.FakeClock; -import google.registry.testing.ShardableTestCase; -import java.io.IOException; -import java.io.InputStream; -import java.net.InetAddress; -import java.net.UnknownHostException; -import org.joda.time.DateTime; -import org.junit.After; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.runners.MockitoJUnitRunner; - -/** Unit tests for {@link RdeImportUtils} */ -@RunWith(MockitoJUnitRunner.class) -public class RdeImportUtilsTest extends ShardableTestCase { - - private static final ByteSource DEPOSIT_XML = RdeTestData.get("deposit_full.xml"); - private static final ByteSource DEPOSIT_BADTLD_XML = RdeTestData.get("deposit_full_badtld.xml"); - private static final ByteSource DEPOSIT_GETLD_XML = RdeTestData.get("deposit_full_getld.xml"); - private static final ByteSource DEPOSIT_BADREGISTRAR_XML = - RdeTestData.get("deposit_full_badregistrar.xml"); - - private InputStream xmlInput; - - @Rule - public final AppEngineRule appEngine = AppEngineRule.builder().withDatastore().build(); - - @Rule - public final ExceptionRule thrown = new ExceptionRule(); - - @Mock - private GcsUtils gcsUtils; - - private RdeImportUtils rdeImportUtils; - private FakeClock clock; - - @Before - public void before() { - clock = new FakeClock(); - clock.setTo(DateTime.now(UTC)); - rdeImportUtils = new RdeImportUtils(ofy(), clock, "import-bucket", gcsUtils); - createTld("test", TldState.PREDELEGATION); - createTld("getld", TldState.GENERAL_AVAILABILITY); - persistNewRegistrar("RegistrarX", 1L); - } - - @After - public void after() throws IOException { - if (xmlInput != null) { - xmlInput.close(); - } - } - - /** Verifies import of a contact that has not been previously imported */ - @Test - public void testImportNewContact() { - ContactResource newContact = buildNewContact(); - assertThat(rdeImportUtils.importContact(newContact)).isTrue(); - assertEppResourceIndexEntityFor(newContact); - assertForeignKeyIndexFor(newContact); - - // verify the new contact was saved - ContactResource saved = getContact("TEST-123"); - assertThat(saved).isNotNull(); - assertThat(saved.getContactId()).isEqualTo(newContact.getContactId()); - assertThat(saved.getEmailAddress()).isEqualTo(newContact.getEmailAddress()); - assertThat(saved.getLastEppUpdateTime()).isEqualTo(newContact.getLastEppUpdateTime()); - } - - /** Verifies that a contact will not be imported more than once */ - @Test - public void testImportExistingContact() { - ContactResource newContact = buildNewContact(); - persistResource(newContact); - ContactResource updatedContact = - newContact - .asBuilder() - .setLastEppUpdateTime(newContact.getLastEppUpdateTime().plusSeconds(1)) - .build(); - assertThat(rdeImportUtils.importContact(updatedContact)).isFalse(); - - // verify the updated contact was saved - ContactResource saved = getContact("TEST-123"); - assertThat(saved).isNotNull(); - assertThat(saved.getContactId()).isEqualTo(newContact.getContactId()); - assertThat(saved.getEmailAddress()).isEqualTo(newContact.getEmailAddress()); - assertThat(saved.getLastEppUpdateTime()).isEqualTo(newContact.getLastEppUpdateTime()); - } - - /** Verifies import of a host that has not been previously imported */ - @Test - public void testImportNewHost() throws UnknownHostException { - HostResource newHost = buildNewHost(); - assertThat(rdeImportUtils.importHost(newHost)).isTrue(); - assertEppResourceIndexEntityFor(newHost); - assertForeignKeyIndexFor(newHost); - - // verify the new contact was saved - HostResource saved = getHost("FOO_ROID"); - assertThat(saved).isNotNull(); - assertThat(saved.getFullyQualifiedHostName()).isEqualTo( - newHost.getFullyQualifiedHostName()); - assertThat(saved.getInetAddresses()).isEqualTo( - newHost.getInetAddresses()); - assertThat(saved.getLastEppUpdateTime()).isEqualTo(newHost.getLastEppUpdateTime()); - } - - /** Verifies that a host will not be imported more than once */ - @Test - public void testImportExistingHost() throws UnknownHostException { - HostResource newHost = buildNewHost(); - persistResource(newHost); - HostResource updatedHost = - newHost - .asBuilder() - .setLastEppUpdateTime(newHost.getLastEppUpdateTime().plusSeconds(1)) - .build(); - assertThat(rdeImportUtils.importHost(updatedHost)).isFalse(); - - // verify the new contact was saved - HostResource saved = getHost("FOO_ROID"); - assertThat(saved).isNotNull(); - assertThat(saved.getFullyQualifiedHostName()).isEqualTo( - newHost.getFullyQualifiedHostName()); - assertThat(saved.getInetAddresses()).isEqualTo( - newHost.getInetAddresses()); - assertThat(saved.getLastEppUpdateTime()).isEqualTo(newHost.getLastEppUpdateTime()); - } - - private static ContactResource buildNewContact() { - return new ContactResource.Builder() - .setContactId("sh8013") - .setEmailAddress("jdoe@example.com") - .setLastEppUpdateTime(DateTime.parse("2010-10-10T00:00:00.000Z")) - .setRepoId("TEST-123") - .build(); - } - - private static HostResource buildNewHost() throws UnknownHostException { - return new HostResource.Builder() - .setFullyQualifiedHostName("foo.bar.example") - .setInetAddresses(ImmutableSet.of( - InetAddress.getByName("192.0.2.2"), - InetAddress.getByName("192.0.2.29"), - InetAddress.getByName("1080:0:0:0:8:800:200C:417A") - )) - .setLastEppUpdateTime(DateTime.parse("2010-10-10T00:00:00.000Z")) - .setRepoId("FOO_ROID") - .build(); - } - - /** Verifies that no errors are thrown when a valid escrow file is validated */ - @Test - @SuppressWarnings("CheckReturnValue") - public void testValidateEscrowFile_valid() throws Exception { - xmlInput = DEPOSIT_XML.openBufferedStream(); - when(gcsUtils.openInputStream(any(GcsFilename.class))).thenReturn(xmlInput); - rdeImportUtils.validateEscrowFileForImport("valid-deposit-file.xml"); - verify(gcsUtils).openInputStream(new GcsFilename("import-bucket", "valid-deposit-file.xml")); - } - - /** Verifies thrown error when tld in escrow file is not in the registry */ - @Test - public void testValidateEscrowFile_tldNotFound() throws Exception { - xmlInput = DEPOSIT_BADTLD_XML.openBufferedStream(); - when(gcsUtils.openInputStream(any(GcsFilename.class))).thenReturn(xmlInput); - thrown.expect(IllegalArgumentException.class, "Tld 'badtld' not found in the registry"); - rdeImportUtils.validateEscrowFileForImport("invalid-deposit-badtld.xml"); - } - - /** Verifies thrown errer when tld in escrow file is not in PREDELEGATION state */ - @Test - public void testValidateEscrowFile_tldWrongState() throws Exception { - xmlInput = DEPOSIT_GETLD_XML.openBufferedStream(); - when(gcsUtils.openInputStream(any(GcsFilename.class))).thenReturn(xmlInput); - thrown.expect( - IllegalArgumentException.class, - "Tld 'getld' is in state GENERAL_AVAILABILITY and cannot be imported"); - rdeImportUtils.validateEscrowFileForImport("invalid-deposit-getld.xml"); - } - - /** Verifies thrown error when registrar in escrow file is not in the registry */ - @Test - public void testValidateEscrowFile_badRegistrar() throws Exception { - xmlInput = DEPOSIT_BADREGISTRAR_XML.openBufferedStream(); - when(gcsUtils.openInputStream(any(GcsFilename.class))).thenReturn(xmlInput); - thrown.expect( - IllegalArgumentException.class, "Registrar 'RegistrarY' not found in the registry"); - rdeImportUtils.validateEscrowFileForImport("invalid-deposit-badregistrar.xml"); - } - - /** Gets the contact with the specified ROID */ - private static ContactResource getContact(String repoId) { - final Key key = Key.create(ContactResource.class, repoId); - return ofy().transact(new Work() { - @Override - public ContactResource run() { - return ofy().load().key(key).now(); - }}); - } - - /** Gets the contact with the specified ROID */ - private static HostResource getHost(String repoId) { - final Key key = Key.create(HostResource.class, repoId); - return ofy().transact(new Work() { - @Override - public HostResource run() { - return ofy().load().key(key).now(); - } - }); - } - - /** Confirms that a ForeignKeyIndex exists in the datastore for a given resource. */ - private void assertForeignKeyIndexFor(final T resource) { - assertThat(ForeignKeyIndex.load(resource.getClass(), resource.getForeignKey(), clock.nowUtc())) - .isNotNull(); - } - - /** Confirms that an EppResourceIndex entity exists in datastore for a given resource. */ - private static void assertEppResourceIndexEntityFor(final T resource) { - ImmutableList indices = FluentIterable - .from(ofy().load() - .type(EppResourceIndex.class) - .filter("kind", Key.getKind(resource.getClass()))) - .filter(new Predicate() { - @Override - public boolean apply(EppResourceIndex index) { - return ofy().load().key(index.getKey()).now().equals(resource); - }}) - .toList(); - assertThat(indices).hasSize(1); - assertThat(indices.get(0).getBucket()) - .isEqualTo(EppResourceIndexBucket.getBucketKey(Key.create(resource))); - } -} diff --git a/javatests/google/registry/rde/RdeParserTest.java b/javatests/google/registry/rde/RdeParserTest.java deleted file mode 100644 index 1429ec25a..000000000 --- a/javatests/google/registry/rde/RdeParserTest.java +++ /dev/null @@ -1,530 +0,0 @@ -// Copyright 2016 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.rde; - -import static com.google.common.truth.Truth.assertThat; - -import com.google.common.io.ByteSource; -import google.registry.rde.RdeParser.RdeHeader; -import google.registry.testing.ExceptionRule; -import google.registry.xjc.rdecontact.XjcRdeContact; -import google.registry.xjc.rdedomain.XjcRdeDomain; -import google.registry.xjc.rdeeppparams.XjcRdeEppParams; -import google.registry.xjc.rdehost.XjcRdeHost; -import google.registry.xjc.rdeidn.XjcRdeIdn; -import google.registry.xjc.rdenndn.XjcRdeNndn; -import google.registry.xjc.rderegistrar.XjcRdeRegistrar; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import org.junit.After; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -/** Unit tests for {@link RdeParser}. */ -@RunWith(JUnit4.class) -public class RdeParserTest { - - private static final ByteSource DEPOSIT_XML = RdeTestData.get("deposit_full_parser.xml"); - - private InputStream xml; - - @Rule public final ExceptionRule thrown = new ExceptionRule(); - - private void checkHeader(RdeHeader header) { - assertThat(header.getTld()).isEqualTo("test"); - assertThat(header.getContactCount()).isEqualTo(1L); - assertThat(header.getDomainCount()).isEqualTo(2L); - assertThat(header.getEppParamsCount()).isEqualTo(1L); - assertThat(header.getHostCount()).isEqualTo(1L); - assertThat(header.getIdnCount()).isEqualTo(1L); - assertThat(header.getNndnCount()).isEqualTo(1L); - assertThat(header.getRegistrarCount()).isEqualTo(1L); - } - - @Before - public void before() throws IOException { - xml = new ByteArrayInputStream(DEPOSIT_XML.read()); - } - - @After - public void after() throws IOException { - xml.close(); - } - - @Test - public void testGetHeader_returnsHeader() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - checkHeader(parser.getHeader()); - } - } - - @Test - public void testGetContactNotAtElement_throwsIllegalStateException() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - thrown.expect( - IllegalStateException.class, - "Not at element urn:ietf:params:xml:ns:rdeContact-1.0:contact"); - parser.getContact(); - } - } - - @Test - public void testGetContactAtElement_returnsContact() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - parser.nextContact(); - XjcRdeContact contact = parser.getContact(); - assertThat(contact.getId()).isEqualTo("sh8013"); - assertThat(contact.getClID()).isEqualTo("RegistrarX"); - } - } - - @Test - public void testNextContact_advancesParser() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - assertThat(parser.isAtContact()).isFalse(); - // there is only one contact in the escrow file - assertThat(parser.nextContact()).isTrue(); - assertThat(parser.isAtContact()).isTrue(); - assertThat(parser.nextContact()).isFalse(); - assertThat(parser.isAtContact()).isFalse(); - } - } - - @Test - public void testSkipZeroContacts_skipsZero() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - assertThat(parser.skipContacts(0)).isEqualTo(0); - assertThat(parser.nextContact()).isTrue(); - } - } - - @Test - public void testSkipOneContactFromBeginning_skipsOne() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - assertThat(parser.skipContacts(1)).isEqualTo(1); - assertThat(parser.isAtContact()).isFalse(); - } - } - - @Test - public void testSkipOneContactFromFirstContact_skipsOne() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - parser.nextContact(); - assertThat(parser.skipContacts(1)).isEqualTo(1); - assertThat(parser.isAtContact()).isFalse(); - } - } - - @Test - public void testSkip9999Contacts_skipsOne() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - assertThat(parser.skipContacts(9999)).isEqualTo(1); - assertThat(parser.isAtContact()).isFalse(); - } - } - - @Test - public void testSkipContactsFromEnd_skipsZero() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - parser.nextContact(); - parser.nextContact(); - assertThat(parser.skipContacts(1)).isEqualTo(0); - assertThat(parser.isAtContact()).isFalse(); - } - } - - @Test - public void testGetHeaderAfterNextContact_returnsHeader() throws Exception { - // verify that the header is still available after advancing to next contact - try (RdeParser parser = new RdeParser(xml)) { - parser.nextContact(); - checkHeader(parser.getHeader()); - } - } - - @Test - public void testGetDomainNotAtElement_throwsIllegalStateException() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - thrown.expect( - IllegalStateException.class, - "Not at element urn:ietf:params:xml:ns:rdeDomain-1.0:domain"); - parser.getDomain(); - } - } - - @Test - public void testGetDomainAtElement_returnsDomain() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - parser.nextDomain(); - XjcRdeDomain domain = parser.getDomain(); - assertThat(domain.getName()).isEqualTo("example1.test"); - } - } - - @Test - public void testNextDomain_advancesParser() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - // there are 2 domains in the escrow file - assertThat(parser.isAtDomain()).isFalse(); - assertThat(parser.nextDomain()).isTrue(); - assertThat(parser.isAtDomain()).isTrue(); - assertThat(parser.nextDomain()).isTrue(); - assertThat(parser.isAtDomain()).isTrue(); - assertThat(parser.nextDomain()).isFalse(); - assertThat(parser.isAtDomain()).isFalse(); - } - } - - @Test - public void testSkipZeroDomains_skipsZero() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - assertThat(parser.skipDomains(0)).isEqualTo(0); - assertThat(parser.nextDomain()).isTrue(); - } - } - - @Test - public void testSkipOneDomainFromBeginning_skipsOne() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - assertThat(parser.skipDomains(1)).isEqualTo(1); - // there are two domains - assertThat(parser.isAtDomain()).isTrue(); - // prove that the parser advanced to the second domain - assertThat(parser.nextDomain()).isFalse(); - assertThat(parser.isAtDomain()).isFalse(); - } - } - - @Test - public void testSkipTwoDomainsFromBeginning_skipsTwo() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - assertThat(parser.skipDomains(2)).isEqualTo(2); - // there are two domains - assertThat(parser.isAtDomain()).isFalse(); - } - } - - @Test - public void testSkipOneDomainFromFirstDomain_skipsOne() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - parser.nextDomain(); - assertThat(parser.skipDomains(1)).isEqualTo(1); - // there are two domains - assertThat(parser.isAtDomain()).isTrue(); - // prove that the parser advanced to the second domain - assertThat(parser.nextDomain()).isFalse(); - assertThat(parser.isAtDomain()).isFalse(); - } - } - - @Test - public void testSkipTwoDomainsFromFirstDomain_skipsTwo() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - parser.nextDomain(); - assertThat(parser.skipDomains(2)).isEqualTo(2); - // there are two domains - assertThat(parser.isAtDomain()).isFalse(); - } - } - - @Test - public void testSkip9999Domains_skipsTwo() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - assertThat(parser.skipDomains(9999)).isEqualTo(2); - assertThat(parser.isAtDomain()).isFalse(); - } - } - - @Test - public void testSkipDomainsFromEnd_skipsZero() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - parser.nextDomain(); - parser.nextDomain(); - parser.nextDomain(); - assertThat(parser.skipDomains(1)).isEqualTo(0); - } - } - - @Test - public void testGetHeaderAfterNextDomain_returnsHeader() throws Exception { - // verify that the header is still available after advancing to next domain - try (RdeParser parser = new RdeParser(xml)) { - parser.nextDomain(); - checkHeader(parser.getHeader()); - } - } - - @Test - public void testGetHostNotAtElement_throwsIllegalStateException() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - thrown.expect( - IllegalStateException.class, "Not at element urn:ietf:params:xml:ns:rdeHost-1.0:host"); - parser.getHost(); - } - } - - @Test - public void testGetHostAtElement_returnsHost() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - parser.nextHost(); - XjcRdeHost host = parser.getHost(); - assertThat(host.getName()).isEqualTo("ns1.example.com"); - } - } - - @Test - public void testNextHost_advancesParser() throws Exception { - // the header lies, there are 2 hosts in the file - try (RdeParser parser = new RdeParser(xml)) { - assertThat(parser.isAtHost()).isFalse(); - assertThat(parser.nextHost()).isTrue(); - assertThat(parser.isAtHost()).isTrue(); - assertThat(parser.nextHost()).isTrue(); - assertThat(parser.isAtHost()).isTrue(); - assertThat(parser.nextHost()).isFalse(); - assertThat(parser.isAtHost()).isFalse(); - } - } - - @Test - public void testSkipZeroHosts_skipsZero() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - assertThat(parser.skipHosts(0)).isEqualTo(0); - assertThat(parser.nextHost()).isTrue(); - } - } - - @Test - public void testSkipOneHostFromBeginning_skipsOne() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - assertThat(parser.skipHosts(1)).isEqualTo(1); - // there are two hosts - assertThat(parser.isAtHost()).isTrue(); - // prove that the parser advanced to the second host - assertThat(parser.nextHost()).isFalse(); - assertThat(parser.isAtHost()).isFalse(); - } - } - - @Test - public void testSkipTwoHostsFromBeginning_skipsTwo() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - assertThat(parser.skipHosts(2)).isEqualTo(2); - // there are two hosts - assertThat(parser.isAtHost()).isFalse(); - } - } - - @Test - public void testSkipOneHostFromFirstHost_skipsOne() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - parser.nextHost(); - assertThat(parser.skipHosts(1)).isEqualTo(1); - // there are two hosts - assertThat(parser.isAtHost()).isTrue(); - // prove that the parser advanced to the second host - assertThat(parser.nextHost()).isFalse(); - assertThat(parser.isAtHost()).isFalse(); - } - } - - @Test - public void testSkipTwoHostsFromFirstHost_skipsTwo() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - parser.nextHost(); - assertThat(parser.skipHosts(2)).isEqualTo(2); - // there are two hosts - assertThat(parser.isAtHost()).isFalse(); - } - } - - @Test - public void testSkip9999Hosts_skipsTwo() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - assertThat(parser.skipHosts(9999)).isEqualTo(2); - // there are two hosts - assertThat(parser.isAtHost()).isFalse(); - } - } - - @Test - public void testSkipHostFromEnd_skipsZero() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - parser.nextHost(); - parser.nextHost(); - parser.nextHost(); - assertThat(parser.skipHosts(1)).isEqualTo(0); - } - } - - @Test - public void testGetHeaderAfterNextHost_returnsHeader() throws Exception { - // verify that the header is still available after advancing to next host - try (RdeParser parser = new RdeParser(xml)) { - parser.nextHost(); - checkHeader(parser.getHeader()); - } - } - - @Test - public void testGetRegistrarNotAtElement_throwsIllegalStateException() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - thrown.expect( - IllegalStateException.class, - "Not at element urn:ietf:params:xml:ns:rdeRegistrar-1.0:registrar"); - parser.getRegistrar(); - } - } - - @Test - public void testGetRegistrarAtElement_returnsRegistrar() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - parser.nextRegistrar(); - XjcRdeRegistrar registrar = parser.getRegistrar(); - assertThat(registrar.getId()).isEqualTo("RegistrarX"); - assertThat(registrar.getName()).isEqualTo("Registrar X"); - } - } - - @Test - public void testNextRegistrar_advancesParser() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - assertThat(parser.isAtRegistrar()).isFalse(); - assertThat(parser.nextRegistrar()).isTrue(); - assertThat(parser.isAtRegistrar()).isTrue(); - assertThat(parser.nextRegistrar()).isFalse(); - assertThat(parser.isAtRegistrar()).isFalse(); - } - } - - @Test - public void testGetHeaderAfterNextRegistrar_returnsHeader() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - parser.nextRegistrar(); - checkHeader(parser.getHeader()); - } - } - - @Test - public void testGetNndnNotAtElement_throwsIllegalStateException() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - thrown.expect( - IllegalStateException.class, "Not at element urn:ietf:params:xml:ns:rdeNNDN-1.0:NNDN"); - parser.getNndn(); - } - } - - @Test - public void testGetNndnAtElement_returnsNndn() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - parser.nextNndn(); - XjcRdeNndn nndn = parser.getNndn(); - assertThat(nndn.getAName()).isEqualTo("xn--exampl-gva.test"); - } - } - - @Test - public void testNextNndn_advancesParser() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - assertThat(parser.isAtNndn()).isFalse(); - assertThat(parser.nextNndn()).isTrue(); - assertThat(parser.isAtNndn()).isTrue(); - assertThat(parser.nextNndn()).isFalse(); - assertThat(parser.isAtNndn()).isFalse(); - } - } - - @Test - public void testGetHeaderAfterNextNndn_returnsHeader() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - parser.nextNndn(); - checkHeader(parser.getHeader()); - } - } - - @Test - public void testGetIdnNotAtElement_throwsIllegalStateException() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - thrown.expect( - IllegalStateException.class, - "Not at element urn:ietf:params:xml:ns:rdeIDN-1.0:idnTableRef"); - parser.getIdn(); - } - } - - @Test - public void testGetIdnAtElement_returnsIdn() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - parser.nextIdn(); - XjcRdeIdn idn = parser.getIdn(); - // url contains whitespace - assertThat(idn.getUrl().trim()) - .isEqualTo("http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html"); - } - } - - @Test - public void testNextIdn_advancesParser() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - assertThat(parser.isAtIdn()).isFalse(); - assertThat(parser.nextIdn()).isTrue(); - assertThat(parser.isAtIdn()).isTrue(); - assertThat(parser.nextIdn()).isFalse(); - assertThat(parser.isAtIdn()).isFalse(); - } - } - - @Test - public void testGetHeaderAfterNextIdn_returnsHeader() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - parser.nextIdn(); - checkHeader(parser.getHeader()); - } - } - - @Test - public void testGetEppParamsNotAtElement_throwsIllegalStateException() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - thrown.expect( - IllegalStateException.class, - "Not at element urn:ietf:params:xml:ns:rdeEppParams-1.0:eppParams"); - parser.getEppParams(); - } - } - - @Test - public void testGetEppParamsAtElement_returnsEppParams() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - parser.nextEppParams(); - XjcRdeEppParams eppParams = parser.getEppParams(); - assertThat(eppParams.getVersions()).containsExactly("1.0"); - } - } - - @Test - public void testNextEppParamsAdvancesParser() throws Exception { - try (RdeParser parser = new RdeParser(xml)) { - assertThat(parser.isAtEppParams()).isFalse(); - assertThat(parser.nextEppParams()).isTrue(); - assertThat(parser.isAtEppParams()).isTrue(); - assertThat(parser.nextEppParams()).isFalse(); - assertThat(parser.isAtEppParams()).isFalse(); - } - } -} diff --git a/javatests/google/registry/rde/XjcToContactResourceConverterTest.java b/javatests/google/registry/rde/XjcToContactResourceConverterTest.java deleted file mode 100644 index 233d2a44d..000000000 --- a/javatests/google/registry/rde/XjcToContactResourceConverterTest.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright 2016 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.rde; - -import static com.google.common.truth.Truth.assertThat; -import static google.registry.testing.DatastoreHelper.createTld; - -import com.google.common.io.ByteSource; -import google.registry.model.contact.ContactResource; -import google.registry.model.contact.PostalInfo; -import google.registry.model.eppcommon.StatusValue; -import google.registry.model.transfer.TransferData; -import google.registry.model.transfer.TransferStatus; -import google.registry.testing.AppEngineRule; -import google.registry.xjc.XjcXmlTransformer; -import google.registry.xjc.rdecontact.XjcRdeContact; -import google.registry.xjc.rdecontact.XjcRdeContactElement; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.InputStream; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamReader; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.stax.StAXSource; -import javax.xml.transform.stream.StreamResult; -import org.joda.time.DateTime; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public class XjcToContactResourceConverterTest { - - private static final ByteSource CONTACT_XML = RdeTestData.get("contact_fragment.xml"); - - @Rule - public final AppEngineRule appEngine = AppEngineRule.builder() - .withDatastore() - .build(); - - @Before - public void before() throws Exception { - createTld("xn--q9jyb4c"); - } - - @Test - public void testConvertContact() throws Exception { - XjcRdeContact contact = getContact(); - ContactResource resource = XjcToContactResourceConverter.convertContact(contact); - assertThat(resource.getContactId()).isEqualTo("love-id"); - assertThat(resource.getRepoId()).isEqualTo("2-ROID"); - assertThat(resource.getStatusValues()) - .containsExactly( - StatusValue.CLIENT_DELETE_PROHIBITED, - StatusValue.SERVER_UPDATE_PROHIBITED); - - assertThat(resource.getInternationalizedPostalInfo()).isNotNull(); - PostalInfo postalInfo = resource.getInternationalizedPostalInfo(); - assertThat(postalInfo.getName()).isEqualTo("Dipsy Doodle"); - assertThat(postalInfo.getOrg()).isEqualTo("Charleston Road Registry Incorporated"); - assertThat(postalInfo.getAddress().getStreet()).hasSize(2); - assertThat(postalInfo.getAddress().getStreet().get(0)).isEqualTo("123 Charleston Road"); - assertThat(postalInfo.getAddress().getStreet().get(1)).isEqualTo("Suite 123"); - assertThat(postalInfo.getAddress().getState()).isEqualTo("CA"); - assertThat(postalInfo.getAddress().getZip()).isEqualTo("31337"); - assertThat(postalInfo.getAddress().getCountryCode()).isEqualTo("US"); - - assertThat(resource.getLocalizedPostalInfo()).isNull(); - - assertThat(resource.getVoiceNumber()).isNotNull(); - assertThat(resource.getVoiceNumber().getPhoneNumber()).isEqualTo("+1.2126660000"); - assertThat(resource.getVoiceNumber().getExtension()).isEqualTo("123"); - - assertThat(resource.getFaxNumber()).isNotNull(); - assertThat(resource.getFaxNumber().getPhoneNumber()).isEqualTo("+1.2126660001"); - assertThat(resource.getFaxNumber().getExtension()).isNull(); - - assertThat(resource.getEmailAddress()).isEqualTo("justine@crr.com"); - assertThat(resource.getCurrentSponsorClientId()).isEqualTo("TheRegistrar"); - assertThat(resource.getCreationClientId()).isEqualTo("NewRegistrar"); - assertThat(resource.getCreationTime()).isEqualTo(DateTime.parse("1900-01-01TZ")); - assertThat(resource.getLastEppUpdateClientId()).isEqualTo("TheRegistrar"); - assertThat(resource.getLastEppUpdateTime()).isEqualTo(DateTime.parse("1930-04-20TZ")); - assertThat(resource.getLastTransferTime()).isEqualTo(DateTime.parse("1925-04-20TZ")); - - assertThat(resource.getTransferData()).isNotNull(); - assertThat(resource.getTransferData().getTransferStatus()) - .isEqualTo(TransferStatus.SERVER_APPROVED); - assertThat(resource.getTransferData().getGainingClientId()).isEqualTo("TheRegistrar"); - assertThat(resource.getTransferData().getTransferRequestTime()) - .isEqualTo(DateTime.parse("1925-04-19TZ")); - assertThat(resource.getTransferData().getLosingClientId()).isEqualTo("NewRegistrar"); - assertThat(resource.getTransferData().getPendingTransferExpirationTime()) - .isEqualTo(DateTime.parse("1925-04-21TZ")); - - assertThat(resource.getDisclose()).isNotNull(); - assertThat(resource.getDisclose().getFlag()).isTrue(); - assertThat(resource.getDisclose().getAddrs()).hasSize(1); - assertThat(resource.getDisclose().getAddrs().get(0).getType()) - .isEqualTo(PostalInfo.Type.INTERNATIONALIZED); - assertThat(resource.getDisclose().getNames()).hasSize(1); - assertThat(resource.getDisclose().getNames().get(0).getType()) - .isEqualTo(PostalInfo.Type.INTERNATIONALIZED); - assertThat(resource.getDisclose().getOrgs()).isEmpty(); - } - - @Test - public void testConvertContact_absentVoiceAndFaxNumbers() throws Exception { - XjcRdeContact contact = getContact(); - contact.setVoice(null); - contact.setFax(null); - ContactResource resource = XjcToContactResourceConverter.convertContact(contact); - assertThat(resource.getVoiceNumber()).isNull(); - assertThat(resource.getFaxNumber()).isNull(); - } - - @Test - public void testConvertContact_absentDisclose() throws Exception { - XjcRdeContact contact = getContact(); - contact.setDisclose(null); - ContactResource resource = XjcToContactResourceConverter.convertContact(contact); - assertThat(resource.getDisclose()).isNull(); - } - - @Test - public void testConvertContact_absentTransferData() throws Exception { - XjcRdeContact contact = getContact(); - contact.setTrDate(null); - contact.setTrnData(null); - ContactResource resource = XjcToContactResourceConverter.convertContact(contact); - assertThat(resource.getLastTransferTime()).isNull(); - assertThat(resource.getTransferData()).isSameAs(TransferData.EMPTY); - } - - private XjcRdeContact getContact() throws Exception { - InputStream in = null; - try { - in = CONTACT_XML.openBufferedStream(); - XMLInputFactory factory = XMLInputFactory.newInstance(); - XMLStreamReader reader = factory.createXMLStreamReader(in); - TransformerFactory tf = TransformerFactory.newInstance(); - Transformer t = tf.newTransformer(); - ByteArrayOutputStream bout = new ByteArrayOutputStream(); - t.transform(new StAXSource(reader), new StreamResult(bout)); - ByteArrayInputStream bin = new ByteArrayInputStream(bout.toByteArray()); - XjcRdeContactElement element = XjcXmlTransformer.unmarshal(XjcRdeContactElement.class, bin); - return element.getValue(); - } finally { - if (in != null) { - in.close(); - } - } - } -} diff --git a/javatests/google/registry/rde/XjcToDomainResourceConverterTest.java b/javatests/google/registry/rde/XjcToDomainResourceConverterTest.java deleted file mode 100644 index 090cbab69..000000000 --- a/javatests/google/registry/rde/XjcToDomainResourceConverterTest.java +++ /dev/null @@ -1,375 +0,0 @@ -// Copyright 2016 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.rde; - -import static com.google.common.io.BaseEncoding.base16; -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.getHistoryEntries; -import static google.registry.testing.DatastoreHelper.persistActiveContact; -import static google.registry.testing.DatastoreHelper.persistActiveHost; -import static google.registry.testing.DatastoreHelper.persistResource; -import static google.registry.util.DateTimeUtils.END_OF_TIME; -import static java.util.Arrays.asList; - -import com.google.common.base.Joiner; -import com.google.common.collect.ImmutableSet; -import com.google.common.io.ByteSource; -import com.googlecode.objectify.Key; -import com.googlecode.objectify.Work; -import google.registry.model.billing.BillingEvent; -import google.registry.model.billing.BillingEvent.Flag; -import google.registry.model.billing.BillingEvent.Reason; -import google.registry.model.contact.ContactResource; -import google.registry.model.domain.DesignatedContact; -import google.registry.model.domain.DomainResource; -import google.registry.model.domain.GracePeriod; -import google.registry.model.domain.rgp.GracePeriodStatus; -import google.registry.model.domain.secdns.DelegationSignerData; -import google.registry.model.eppcommon.StatusValue; -import google.registry.model.host.HostResource; -import google.registry.model.poll.PollMessage; -import google.registry.model.reporting.HistoryEntry; -import google.registry.testing.AppEngineRule; -import google.registry.testing.ExceptionRule; -import google.registry.xjc.rdedomain.XjcRdeDomain; -import google.registry.xjc.rdedomain.XjcRdeDomainElement; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.List; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; -import org.joda.time.DateTime; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -/** Tests for {@link XjcToDomainResourceConverter} */ -@RunWith(JUnit4.class) -public class XjcToDomainResourceConverterTest { - - //List of packages to initialize JAXBContext - private static final String JAXB_CONTEXT_PACKAGES = Joiner.on(":").join(asList( - "google.registry.xjc.contact", - "google.registry.xjc.domain", - "google.registry.xjc.host", - "google.registry.xjc.mark", - "google.registry.xjc.rde", - "google.registry.xjc.rdecontact", - "google.registry.xjc.rdedomain", - "google.registry.xjc.rdeeppparams", - "google.registry.xjc.rdeheader", - "google.registry.xjc.rdeidn", - "google.registry.xjc.rdenndn", - "google.registry.xjc.rderegistrar", - "google.registry.xjc.smd")); - - @Rule public final AppEngineRule appEngine = AppEngineRule.builder().withDatastore().build(); - - @Rule public final ExceptionRule thrown = new ExceptionRule(); - - private Unmarshaller unmarshaller; - - @Before - public void before() throws Exception { - createTld("example"); - unmarshaller = JAXBContext.newInstance(JAXB_CONTEXT_PACKAGES).createUnmarshaller(); - } - - @Test - public void testConvertDomainResource() throws Exception { - final ContactResource jd1234 = persistActiveContact("jd1234"); - final ContactResource sh8013 = persistActiveContact("sh8013"); - ImmutableSet expectedContacts = - ImmutableSet.of( - DesignatedContact.create(DesignatedContact.Type.ADMIN, Key.create(sh8013)), - DesignatedContact.create(DesignatedContact.Type.TECH, Key.create(sh8013))); - final XjcRdeDomain xjcDomain = loadDomainFromRdeXml("domain_fragment.xml"); - DomainResource domain = convertDomainInTransaction(xjcDomain); - assertThat(domain.getFullyQualifiedDomainName()).isEqualTo("example1.example"); - assertThat(domain.getRepoId()).isEqualTo("Dexample1-TEST"); - // A DomainResource has status INACTIVE if there are no nameservers. - assertThat(domain.getStatusValues()).isEqualTo(ImmutableSet.of(StatusValue.INACTIVE)); - assertThat(domain.getRegistrant().getName()).isEqualTo(jd1234.getRepoId()); - assertThat(domain.getContacts()).isEqualTo(expectedContacts); - assertThat(domain.getCurrentSponsorClientId()).isEqualTo("RegistrarX"); - assertThat(domain.getCreationClientId()).isEqualTo("RegistrarX"); - assertThat(domain.getCreationTime()).isEqualTo(DateTime.parse("1999-04-03T22:00:00.0Z")); - assertThat(domain.getRegistrationExpirationTime()) - .isEqualTo(DateTime.parse("2015-04-03T22:00:00.0Z")); - assertThat(domain.getGracePeriods()).isEmpty(); - assertThat(domain.getLastEppUpdateClientId()).isNull(); - assertThat(domain.getLastEppUpdateTime()).isNull(); - } - - @Test - public void testConvertDomainResourceAddPeriod() throws Exception { - persistActiveContact("jd1234"); - persistActiveContact("sh8013"); - final XjcRdeDomain xjcDomain = loadDomainFromRdeXml("domain_fragment_addPeriod.xml"); - DomainResource domain = convertDomainInTransaction(xjcDomain); - assertThat(domain.getGracePeriods()).hasSize(1); - GracePeriod gracePeriod = domain.getGracePeriods().asList().get(0); - assertThat(gracePeriod.getType()).isEqualTo(GracePeriodStatus.ADD); - assertThat(gracePeriod.getClientId()).isEqualTo(xjcDomain.getCrRr().getClient()); - assertThat(gracePeriod.getExpirationTime()).isEqualTo(xjcDomain.getCrDate().plusDays(5)); - } - - @Test - public void testConvertDomainResourceAutoRenewPeriod() throws Exception { - persistActiveContact("jd1234"); - persistActiveContact("sh8013"); - final XjcRdeDomain xjcDomain = loadDomainFromRdeXml("domain_fragment_autoRenewPeriod.xml"); - DomainResource domain = convertDomainInTransaction(xjcDomain); - assertThat(domain.getGracePeriods()).hasSize(1); - GracePeriod gracePeriod = domain.getGracePeriods().asList().get(0); - assertThat(gracePeriod.getType()).isEqualTo(GracePeriodStatus.AUTO_RENEW); - assertThat(gracePeriod.getClientId()).isEqualTo(xjcDomain.getClID()); - assertThat(gracePeriod.getExpirationTime()).isEqualTo(xjcDomain.getUpDate().plusDays(45)); - } - - @Test - public void testConvertDomainResourceRedemptionPeriod() throws Exception { - persistActiveContact("jd1234"); - persistActiveContact("sh8013"); - final XjcRdeDomain xjcDomain = loadDomainFromRdeXml("domain_fragment_redemptionPeriod.xml"); - DomainResource domain = convertDomainInTransaction(xjcDomain); - assertThat(domain.getGracePeriods()).hasSize(1); - GracePeriod gracePeriod = domain.getGracePeriods().asList().get(0); - assertThat(gracePeriod.getType()).isEqualTo(GracePeriodStatus.REDEMPTION); - assertThat(gracePeriod.getClientId()).isEqualTo(xjcDomain.getClID()); - assertThat(gracePeriod.getExpirationTime()).isEqualTo(xjcDomain.getUpDate().plusDays(30)); - } - - @Test - public void testConvertDomainResourceRenewPeriod() throws Exception { - persistActiveContact("jd1234"); - persistActiveContact("sh8013"); - final XjcRdeDomain xjcDomain = loadDomainFromRdeXml("domain_fragment_renewPeriod.xml"); - DomainResource domain = convertDomainInTransaction(xjcDomain); - assertThat(domain.getGracePeriods()).hasSize(1); - GracePeriod gracePeriod = domain.getGracePeriods().asList().get(0); - assertThat(gracePeriod.getType()).isEqualTo(GracePeriodStatus.RENEW); - assertThat(gracePeriod.getClientId()).isEqualTo(xjcDomain.getClID()); - assertThat(gracePeriod.getExpirationTime()).isEqualTo(xjcDomain.getUpDate().plusDays(5)); - } - - @Test - public void testConvertDomainResourcePendingDeletePeriod() throws Exception { - persistActiveContact("jd1234"); - persistActiveContact("sh8013"); - final XjcRdeDomain xjcDomain = loadDomainFromRdeXml("domain_fragment_pendingDeletePeriod.xml"); - DomainResource domain = convertDomainInTransaction(xjcDomain); - assertThat(domain.getGracePeriods()).hasSize(1); - GracePeriod gracePeriod = domain.getGracePeriods().asList().get(0); - assertThat(gracePeriod.getType()).isEqualTo(GracePeriodStatus.PENDING_DELETE); - assertThat(gracePeriod.getClientId()).isEqualTo(xjcDomain.getClID()); - assertThat(gracePeriod.getExpirationTime()).isEqualTo(xjcDomain.getUpDate().plusDays(5)); - } - - @Test - public void testConvertDomainResourcePendingRestorePeriodUnsupported() throws Exception { - persistActiveContact("jd1234"); - persistActiveContact("sh8013"); - final XjcRdeDomain xjcDomain = loadDomainFromRdeXml("domain_fragment_pendingRestorePeriod.xml"); - thrown.expect( - IllegalArgumentException.class, "Unsupported grace period status: PENDING_RESTORE"); - convertDomainInTransaction(xjcDomain); - } - - @Test - public void testConvertDomainResourceTransferPeriod() throws Exception { - persistActiveContact("jd1234"); - persistActiveContact("sh8013"); - final XjcRdeDomain xjcDomain = loadDomainFromRdeXml("domain_fragment_transferPeriod.xml"); - DomainResource domain = convertDomainInTransaction(xjcDomain); - assertThat(domain.getGracePeriods()).hasSize(1); - GracePeriod gracePeriod = domain.getGracePeriods().asList().get(0); - assertThat(gracePeriod.getType()).isEqualTo(GracePeriodStatus.TRANSFER); - assertThat(gracePeriod.getClientId()).isEqualTo(xjcDomain.getClID()); - assertThat(gracePeriod.getExpirationTime()).isEqualTo(xjcDomain.getUpDate().plusDays(5)); - } - - @Test - public void testConvertDomainResourceEppUpdateRegistrar() throws Exception { - persistActiveContact("jd1234"); - persistActiveContact("sh8013"); - final XjcRdeDomain xjcDomain = loadDomainFromRdeXml("domain_fragment_up_rr.xml"); - DomainResource domain = convertDomainInTransaction(xjcDomain); - assertThat(domain.getLastEppUpdateClientId()).isEqualTo("RegistrarX"); - } - - @Test - public void testConvertDomainResourceWithHostObjs() throws Exception { - persistActiveContact("jd1234"); - persistActiveContact("sh8013"); - HostResource host1 = persistActiveHost("ns1.example.net"); - HostResource host2 = persistActiveHost("ns2.example.net"); - final XjcRdeDomain xjcDomain = loadDomainFromRdeXml("domain_fragment_host_objs.xml"); - DomainResource domain = convertDomainInTransaction(xjcDomain); - assertThat(domain.getNameservers()).containsExactly(Key.create(host1), Key.create(host2)); - } - - @Test - public void testConvertDomainResourceWithHostAttrs() throws Exception { - persistActiveContact("jd1234"); - persistActiveContact("sh8013"); - persistActiveHost("ns1.example.net"); - persistActiveHost("ns2.example.net"); - final XjcRdeDomain xjcDomain = loadDomainFromRdeXml("domain_fragment_host_attrs.xml"); - thrown.expect(IllegalArgumentException.class, "Host attributes are not yet supported"); - convertDomainInTransaction(xjcDomain); - } - - @Test - public void testConvertDomainResourceHostNotFound() throws Exception { - persistActiveContact("jd1234"); - persistActiveContact("sh8013"); - persistActiveHost("ns1.example.net"); - final XjcRdeDomain xjcDomain = loadDomainFromRdeXml("domain_fragment_host_objs.xml"); - thrown.expect( - IllegalStateException.class, "HostResource not found with name 'ns2.example.net'"); - convertDomainInTransaction(xjcDomain); - } - - @Test - public void testConvertDomainResourceRegistrantNotFound() throws Exception { - persistActiveContact("sh8013"); - final XjcRdeDomain xjcDomain = loadDomainFromRdeXml("domain_fragment.xml"); - thrown.expect(IllegalStateException.class, "Registrant not found: 'jd1234'"); - convertDomainInTransaction(xjcDomain); - } - - @Test - public void testConvertDomainResourceRegistrantMissing() throws Exception { - persistActiveContact("jd1234"); - persistActiveContact("sh8013"); - final XjcRdeDomain xjcDomain = loadDomainFromRdeXml("domain_fragment_registrant_missing.xml"); - thrown.expect( - IllegalArgumentException.class, "Registrant is missing for domain 'example1.example'"); - convertDomainInTransaction(xjcDomain); - } - - @Test - public void testConvertDomainResourceAdminNotFound() throws Exception { - persistActiveContact("jd1234"); - final XjcRdeDomain xjcDomain = loadDomainFromRdeXml("domain_fragment.xml"); - thrown.expect(IllegalStateException.class, "Contact not found: 'sh8013'"); - convertDomainInTransaction(xjcDomain); - } - - @Test - public void testConvertDomainResourceSecDnsData() throws Exception { - persistActiveContact("jd1234"); - persistActiveContact("sh8013"); - final XjcRdeDomain xjcDomain = loadDomainFromRdeXml("domain_fragment_secdns.xml"); - DomainResource domain = convertDomainInTransaction(xjcDomain); - byte[] digest = - base16().decode("5FA1FA1C2F70AA483FE178B765D82B272072B4E4167902C5B7F97D46C8899F44"); - assertThat(domain.getDsData()).containsExactly(DelegationSignerData.create(4609, 8, 2, digest)); - } - - @Test - public void testConvertDomainResourceHistoryEntry() throws Exception { - persistActiveContact("jd1234"); - persistActiveContact("sh8013"); - final XjcRdeDomain xjcDomain = loadDomainFromRdeXml("domain_fragment.xml"); - // First import in a transaction, then verify in another transaction. - // Ancestor queries don't work within the same transaction. - DomainResource domain = persistResource(convertDomainInTransaction(xjcDomain)); - List historyEntries = getHistoryEntries(domain); - assertThat(historyEntries).hasSize(1); - HistoryEntry entry = historyEntries.get(0); - assertThat(entry.getType()).isEqualTo(HistoryEntry.Type.RDE_IMPORT); - assertThat(entry.getClientId()).isEqualTo(xjcDomain.getClID()); - assertThat(entry.getBySuperuser()).isTrue(); - assertThat(entry.getReason()).isEqualTo("RDE Import"); - assertThat(entry.getRequestedByRegistrar()).isFalse(); - // check xml against original domain xml - try (InputStream ins = new ByteArrayInputStream(entry.getXmlBytes())) { - XjcRdeDomain unmarshalledXml = ((XjcRdeDomainElement) unmarshaller.unmarshal(ins)).getValue(); - assertThat(unmarshalledXml.getName()).isEqualTo(xjcDomain.getName()); - assertThat(unmarshalledXml.getRoid()).isEqualTo(xjcDomain.getRoid()); - } - } - - @Test - public void testConvertDomainResourceAutoRenewBillingEvent() throws Exception { - persistActiveContact("jd1234"); - persistActiveContact("sh8013"); - final XjcRdeDomain xjcDomain = loadDomainFromRdeXml("domain_fragment.xml"); - // First import in a transaction, then verify in another transaction. - // Ancestor queries don't work within the same transaction. - DomainResource domain = persistResource(convertDomainInTransaction(xjcDomain)); - List historyEntries = getHistoryEntries(domain); - assertThat(historyEntries).hasSize(1); - HistoryEntry entry = historyEntries.get(0); - List billingEvents = - ofy().load().type(BillingEvent.Recurring.class).ancestor(entry).list(); - assertThat(billingEvents).hasSize(1); - BillingEvent.Recurring autoRenewEvent = billingEvents.get(0); - assertThat(autoRenewEvent.getReason()).isEqualTo(Reason.RENEW); - assertThat(autoRenewEvent.getFlags()).isEqualTo(ImmutableSet.of(Flag.AUTO_RENEW)); - assertThat(autoRenewEvent.getTargetId()).isEqualTo(xjcDomain.getRoid()); - assertThat(autoRenewEvent.getClientId()).isEqualTo(xjcDomain.getClID()); - assertThat(autoRenewEvent.getEventTime()).isEqualTo(xjcDomain.getExDate()); - assertThat(autoRenewEvent.getRecurrenceEndTime()).isEqualTo(END_OF_TIME); - } - - @Test - public void testConvertDomainResourceAutoRenewPollMessage() throws Exception { - persistActiveContact("jd1234"); - persistActiveContact("sh8013"); - final XjcRdeDomain xjcDomain = loadDomainFromRdeXml("domain_fragment.xml"); - // First import in a transaction, then verify in another transaction. - // Ancestor queries don't work within the same transaction. - DomainResource domain = persistResource(convertDomainInTransaction(xjcDomain)); - List historyEntries = getHistoryEntries(domain); - assertThat(historyEntries).hasSize(1); - HistoryEntry entry = historyEntries.get(0); - List pollMessages = ofy().load().type(PollMessage.class).ancestor(entry).list(); - assertThat(pollMessages).hasSize(1); - PollMessage pollMessage = pollMessages.get(0); - assertThat(pollMessage).isInstanceOf(PollMessage.Autorenew.class); - assertThat(((PollMessage.Autorenew) pollMessage).getTargetId()).isEqualTo(xjcDomain.getRoid()); - assertThat(pollMessage.getClientId()).isEqualTo(xjcDomain.getClID()); - assertThat(pollMessage.getEventTime()).isEqualTo(xjcDomain.getExDate()); - assertThat(pollMessage.getMsg()).isEqualTo("Domain was auto-renewed."); - } - - private static DomainResource convertDomainInTransaction(final XjcRdeDomain xjcDomain) { - return ofy().transact(new Work() { - @Override - public DomainResource run() { - return XjcToDomainResourceConverter.convertDomain(xjcDomain); - }}); - } - - private XjcRdeDomain loadDomainFromRdeXml(String filename) { - try { - ByteSource source = RdeTestData.get(filename); - try (InputStream ins = source.openStream()) { - return ((XjcRdeDomainElement) unmarshaller.unmarshal(ins)).getValue(); - } - } catch (JAXBException | IOException e) { - throw new RuntimeException(e); - } - } -} diff --git a/javatests/google/registry/rde/XjcToHostResourceConverterTest.java b/javatests/google/registry/rde/XjcToHostResourceConverterTest.java deleted file mode 100644 index 020cc23ea..000000000 --- a/javatests/google/registry/rde/XjcToHostResourceConverterTest.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2016 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.rde; - -import static com.google.common.truth.Truth.assertThat; -import static google.registry.testing.DatastoreHelper.createTld; - -import com.google.appengine.repackaged.com.google.common.net.InetAddresses; -import com.google.common.base.Joiner; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableSet; -import com.google.common.io.ByteSource; -import google.registry.model.eppcommon.StatusValue; -import google.registry.model.host.HostResource; -import google.registry.testing.AppEngineRule; -import google.registry.xjc.rdehost.XjcRdeHost; -import google.registry.xjc.rdehost.XjcRdeHostElement; -import java.io.InputStream; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.Unmarshaller; -import org.joda.time.DateTime; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -/** - * Unit tests for {@link XjcToHostResourceConverter} - */ -@RunWith(JUnit4.class) -public class XjcToHostResourceConverterTest { - - private static final ByteSource HOST_XML = RdeTestData.get("host_fragment.xml"); - - //List of packages to initialize JAXBContext - private static final String JAXB_CONTEXT_PACKAGES = Joiner.on(":") - .join(ImmutableList.of( - "google.registry.xjc.contact", - "google.registry.xjc.domain", - "google.registry.xjc.host", - "google.registry.xjc.mark", - "google.registry.xjc.rde", - "google.registry.xjc.rdecontact", - "google.registry.xjc.rdedomain", - "google.registry.xjc.rdeeppparams", - "google.registry.xjc.rdeheader", - "google.registry.xjc.rdeidn", - "google.registry.xjc.rdenndn", - "google.registry.xjc.rderegistrar", - "google.registry.xjc.smd")); - - @Rule - public final AppEngineRule appEngine = AppEngineRule.builder() - .withDatastore() - .build(); - - private Unmarshaller unmarshaller; - - @Before - public void before() throws Exception { - createTld("example"); - unmarshaller = JAXBContext.newInstance(JAXB_CONTEXT_PACKAGES) - .createUnmarshaller(); - } - - @Test - public void testConvertHostResource() throws Exception { - XjcRdeHost xjcHost = getHost(); - HostResource host = XjcToHostResourceConverter.convert(xjcHost); - assertThat(host.getFullyQualifiedHostName()).isEqualTo("ns1.example1.test"); - assertThat(host.getRepoId()).isEqualTo("Hns1_example1_test-TEST"); - assertThat(host.getStatusValues()) - .isEqualTo(ImmutableSet.of(StatusValue.OK, StatusValue.LINKED)); - assertThat(host.getInetAddresses()).isEqualTo( - ImmutableSet.of( - InetAddresses.forString("192.0.2.2"), - InetAddresses.forString("192.0.2.29"), - InetAddresses.forString("1080:0:0:0:8:800:200C:417A"))); - assertThat(host.getCurrentSponsorClientId()).isEqualTo("RegistrarX"); - assertThat(host.getCreationClientId()).isEqualTo("RegistrarX"); - assertThat(host.getCreationTime()).isEqualTo(DateTime.parse("1999-05-08T12:10:00.0Z")); - assertThat(host.getLastEppUpdateClientId()).isEqualTo("RegistrarX"); - assertThat(host.getLastEppUpdateTime()).isEqualTo(DateTime.parse("2009-10-03T09:34:00.0Z")); - assertThat(host.getLastTransferTime()).isEqualTo(DateTime.parse("2008-10-03T09:34:00.0Z")); - } - - // included to pass the round-robin sharding filter - @Test - public void testNothing1() {} - - // included to pass the round-robin sharding filter - @Test - public void testNothing2() {} - - // included to pass the round-robin sharding filter - @Test - public void testNothing3() {} - - private XjcRdeHost getHost() throws Exception { - try (InputStream ins = HOST_XML.openStream()) { - return ((XjcRdeHostElement) unmarshaller.unmarshal(ins)).getValue(); - } - } -} diff --git a/javatests/google/registry/rde/testdata/contact_fragment.xml b/javatests/google/registry/rde/testdata/contact_fragment.xml deleted file mode 100644 index be8a13f07..000000000 --- a/javatests/google/registry/rde/testdata/contact_fragment.xml +++ /dev/null @@ -1,40 +0,0 @@ - - love-id - 2-ROID - - - - Dipsy Doodle - Charleston Road Registry Incorporated - - 123 Charleston Road - Suite 123 - Mountain View - CA - 31337 - US - - - +1.2126660000 - +1.2126660001 - justine@crr.com - TheRegistrar - NewRegistrar - 1900-01-01T00:00:00Z - TheRegistrar - 1930-04-20T00:00:00Z - 1925-04-20T00:00:00Z - - serverApproved - TheRegistrar - 1925-04-19T00:00:00Z - NewRegistrar - 1925-04-21T00:00:00Z - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_0_contact_header.xml b/javatests/google/registry/rde/testdata/deposit_0_contact_header.xml deleted file mode 100644 index 7951dee38..000000000 --- a/javatests/google/registry/rde/testdata/deposit_0_contact_header.xml +++ /dev/null @@ -1,259 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 1 - - 0 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example.com - Hns1_example_com-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - contact1 - contact1-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - -http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_0_host_header.xml b/javatests/google/registry/rde/testdata/deposit_0_host_header.xml deleted file mode 100644 index adb8768c1..000000000 --- a/javatests/google/registry/rde/testdata/deposit_0_host_header.xml +++ /dev/null @@ -1,242 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 0 - - 1 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - contact1 - contact1-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - - http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_10000_contact_header.xml b/javatests/google/registry/rde/testdata/deposit_10000_contact_header.xml deleted file mode 100644 index bfa76283c..000000000 --- a/javatests/google/registry/rde/testdata/deposit_10000_contact_header.xml +++ /dev/null @@ -1,259 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 1 - - 10000 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example.com - Hns1_example_com-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - contact1 - contact1-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - -http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_10000_host_header.xml b/javatests/google/registry/rde/testdata/deposit_10000_host_header.xml deleted file mode 100644 index 4e39e5b95..000000000 --- a/javatests/google/registry/rde/testdata/deposit_10000_host_header.xml +++ /dev/null @@ -1,242 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 10000 - - 1 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - contact1 - contact1-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - - http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_1000_contact_header.xml b/javatests/google/registry/rde/testdata/deposit_1000_contact_header.xml deleted file mode 100644 index f8dd81604..000000000 --- a/javatests/google/registry/rde/testdata/deposit_1000_contact_header.xml +++ /dev/null @@ -1,259 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 1 - - 1000 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example.com - Hns1_example_com-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - contact1 - contact1-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - -http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_1000_host_header.xml b/javatests/google/registry/rde/testdata/deposit_1000_host_header.xml deleted file mode 100644 index d499788b5..000000000 --- a/javatests/google/registry/rde/testdata/deposit_1000_host_header.xml +++ /dev/null @@ -1,242 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 1000 - - 1 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - contact1 - contact1-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - - http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_10_contact.xml b/javatests/google/registry/rde/testdata/deposit_10_contact.xml deleted file mode 100644 index 3f16cdcb1..000000000 --- a/javatests/google/registry/rde/testdata/deposit_10_contact.xml +++ /dev/null @@ -1,592 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example.com - Hns1_example_com-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - contact1 - contact1-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - contact2 - contact2-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - contact3 - contact3-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - contact4 - contact4-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - contact5 - contact5-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - contact6 - contact6-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - contact7 - contact7-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - contact8 - contact8-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - contact9 - contact9-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - contact10 - contact10-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - -http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_10_host.xml b/javatests/google/registry/rde/testdata/deposit_10_host.xml deleted file mode 100644 index e42b72404..000000000 --- a/javatests/google/registry/rde/testdata/deposit_10_host.xml +++ /dev/null @@ -1,395 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 3 - - 1 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example2.test - Hns1_example2_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example3.test - Hns1_example3_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example4.test - Hns1_example4_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example5.test - Hns1_example5_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example6.test - Hns1_example6_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example7.test - Hns1_example7_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example8.test - Hns1_example8_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example9.test - Hns1_example9_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example10.test - Hns1_example10_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - contact1 - contact1-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - - http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_199_contact_header.xml b/javatests/google/registry/rde/testdata/deposit_199_contact_header.xml deleted file mode 100644 index 266450a5c..000000000 --- a/javatests/google/registry/rde/testdata/deposit_199_contact_header.xml +++ /dev/null @@ -1,259 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 1 - - 199 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example.com - Hns1_example_com-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - contact1 - contact1-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - -http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_199_host_header.xml b/javatests/google/registry/rde/testdata/deposit_199_host_header.xml deleted file mode 100644 index eb9d2156b..000000000 --- a/javatests/google/registry/rde/testdata/deposit_199_host_header.xml +++ /dev/null @@ -1,242 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 199 - - 1 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - contact1 - contact1-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - - http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_1_contact.xml b/javatests/google/registry/rde/testdata/deposit_1_contact.xml deleted file mode 100644 index 412004326..000000000 --- a/javatests/google/registry/rde/testdata/deposit_1_contact.xml +++ /dev/null @@ -1,259 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example.com - Hns1_example_com-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - contact1 - contact1-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - -http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_1_host.xml b/javatests/google/registry/rde/testdata/deposit_1_host.xml deleted file mode 100644 index dba51527a..000000000 --- a/javatests/google/registry/rde/testdata/deposit_1_host.xml +++ /dev/null @@ -1,242 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - contact1 - contact1-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - - http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_200_contact_header.xml b/javatests/google/registry/rde/testdata/deposit_200_contact_header.xml deleted file mode 100644 index 253498e6c..000000000 --- a/javatests/google/registry/rde/testdata/deposit_200_contact_header.xml +++ /dev/null @@ -1,259 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 1 - - 200 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example.com - Hns1_example_com-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - contact1 - contact1-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - -http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_200_host_header.xml b/javatests/google/registry/rde/testdata/deposit_200_host_header.xml deleted file mode 100644 index 289662150..000000000 --- a/javatests/google/registry/rde/testdata/deposit_200_host_header.xml +++ /dev/null @@ -1,242 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 200 - - 1 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - contact1 - contact1-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - - http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_3_contact.xml b/javatests/google/registry/rde/testdata/deposit_3_contact.xml deleted file mode 100644 index be311d374..000000000 --- a/javatests/google/registry/rde/testdata/deposit_3_contact.xml +++ /dev/null @@ -1,333 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example.com - Hns1_example_com-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - contact1 - contact1-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - contact2 - contact2-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - contact3 - contact3-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - -http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_3_host.xml b/javatests/google/registry/rde/testdata/deposit_3_host.xml deleted file mode 100644 index 4cf7159e4..000000000 --- a/javatests/google/registry/rde/testdata/deposit_3_host.xml +++ /dev/null @@ -1,276 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 3 - - 1 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example2.test - Hns1_example2_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example3.test - Hns1_example3_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - contact1 - contact1-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - - http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_4_contact.xml b/javatests/google/registry/rde/testdata/deposit_4_contact.xml deleted file mode 100644 index ddac4dca7..000000000 --- a/javatests/google/registry/rde/testdata/deposit_4_contact.xml +++ /dev/null @@ -1,370 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example.com - Hns1_example_com-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - contact1 - contact1-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - contact2 - contact2-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - contact3 - contact3-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - contact4 - contact4-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - -http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_4_host.xml b/javatests/google/registry/rde/testdata/deposit_4_host.xml deleted file mode 100644 index 4b49d10b7..000000000 --- a/javatests/google/registry/rde/testdata/deposit_4_host.xml +++ /dev/null @@ -1,293 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 3 - - 1 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example2.test - Hns1_example2_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example3.test - Hns1_example3_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example4.test - Hns1_example4_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - contact1 - contact1-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - - http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_full_badregistrar.xml b/javatests/google/registry/rde/testdata/deposit_full_badregistrar.xml deleted file mode 100644 index 17d6f183d..000000000 --- a/javatests/google/registry/rde/testdata/deposit_full_badregistrar.xml +++ /dev/null @@ -1,259 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example.com - Hns1_example_com-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - sh8013 - Csh8013-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarY - Registrar Y - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - -http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_full_badtld.xml b/javatests/google/registry/rde/testdata/deposit_full_badtld.xml deleted file mode 100644 index e2eab56ae..000000000 --- a/javatests/google/registry/rde/testdata/deposit_full_badtld.xml +++ /dev/null @@ -1,259 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - badtld - 2 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example.com - Hns1_example_com-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - sh8013 - Csh8013-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - -http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_full_getld.xml b/javatests/google/registry/rde/testdata/deposit_full_getld.xml deleted file mode 100644 index 7f7f5138b..000000000 --- a/javatests/google/registry/rde/testdata/deposit_full_getld.xml +++ /dev/null @@ -1,259 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - getld - 2 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example.com - Hns1_example_com-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - sh8013 - Csh8013-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - -http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/deposit_full_parser.xml b/javatests/google/registry/rde/testdata/deposit_full_parser.xml deleted file mode 100644 index 70f607571..000000000 --- a/javatests/google/registry/rde/testdata/deposit_full_parser.xml +++ /dev/null @@ -1,259 +0,0 @@ - - - - 2010-10-17T00:00:00Z - - 1.0 - urn:ietf:params:xml:ns:rdeHeader-1.0 - urn:ietf:params:xml:ns:rdeContact-1.0 - urn:ietf:params:xml:ns:rdeHost-1.0 - urn:ietf:params:xml:ns:rdeDomain-1.0 - urn:ietf:params:xml:ns:rdeRegistrar-1.0 - urn:ietf:params:xml:ns:rdeIDN-1.0 - urn:ietf:params:xml:ns:rdeNNDN-1.0 - urn:ietf:params:xml:ns:rdeEppParams-1.0 - - - - - - - test - 2 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - - - - - example1.test - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.com - ns1.example1.test - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - example2.test - Dexample2-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - - - ns1.example.com - Hns1_example_com-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - - - - - sh8013 - Csh8013-TEST - - - - John Doe - Example Inc. - - 123 Example Dr. - Suite 100 - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - RegistrarX - RegistrarX - - 2009-09-13T08:01:00.0Z - RegistrarX - - 2009-11-26T09:10:00.0Z - 2009-12-03T09:05:00.0Z - - - - - - - - - RegistrarX - Registrar X - 123 - ok - - - 123 Example Dr. - - Suite 100 - - Dulles - VA - 20166-6503 - US - - - +1.7035555555 - - +1.7035555556 - - jdoe@example.test - - http://www.example.test - - - whois.example.test - - http://whois.example.test - - - 2005-04-23T11:49:00.0Z - 2009-02-17T17:51:00.0Z - - - - - -http://www.iana.org/domains/idn-tables/tables/br_pt-br_1.0.html - - - http://registro.br/dominio/regras.html - - - - - - xn--exampl-gva.test - pt-BR - example1.test - withheld - 2005-04-23T11:49:00.0Z - - - - - 1.0 - en - - urn:ietf:params:xml:ns:domain-1.0 - - - urn:ietf:params:xml:ns:contact-1.0 - - - urn:ietf:params:xml:ns:host-1.0 - - - urn:ietf:params:xml:ns:rgp-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - - - - - - - - - - - - - - - - - - - - - - diff --git a/javatests/google/registry/rde/testdata/domain_fragment.xml b/javatests/google/registry/rde/testdata/domain_fragment.xml deleted file mode 100644 index 39940b8a3..000000000 --- a/javatests/google/registry/rde/testdata/domain_fragment.xml +++ /dev/null @@ -1,14 +0,0 @@ - - example1.example - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - diff --git a/javatests/google/registry/rde/testdata/domain_fragment_addPeriod.xml b/javatests/google/registry/rde/testdata/domain_fragment_addPeriod.xml deleted file mode 100644 index f920a832e..000000000 --- a/javatests/google/registry/rde/testdata/domain_fragment_addPeriod.xml +++ /dev/null @@ -1,15 +0,0 @@ - - example1.example - Dexample1-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - diff --git a/javatests/google/registry/rde/testdata/domain_fragment_autoRenewPeriod.xml b/javatests/google/registry/rde/testdata/domain_fragment_autoRenewPeriod.xml deleted file mode 100644 index ee7244db1..000000000 --- a/javatests/google/registry/rde/testdata/domain_fragment_autoRenewPeriod.xml +++ /dev/null @@ -1,16 +0,0 @@ - - example1.example - Dexample1-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - 2014-04-03T22:00:00.0Z - diff --git a/javatests/google/registry/rde/testdata/domain_fragment_host_attrs.xml b/javatests/google/registry/rde/testdata/domain_fragment_host_attrs.xml deleted file mode 100644 index 7c6005ccd..000000000 --- a/javatests/google/registry/rde/testdata/domain_fragment_host_attrs.xml +++ /dev/null @@ -1,26 +0,0 @@ - - example1.example - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - - ns1.example.net - 192.0.2.2 - 1080:0:0:0:8:800:200C:417A - - - ns2.example.net - - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - diff --git a/javatests/google/registry/rde/testdata/domain_fragment_host_objs.xml b/javatests/google/registry/rde/testdata/domain_fragment_host_objs.xml deleted file mode 100644 index 9395c05d7..000000000 --- a/javatests/google/registry/rde/testdata/domain_fragment_host_objs.xml +++ /dev/null @@ -1,18 +0,0 @@ - - example1.example - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - - ns1.example.net - ns2.example.net - - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - diff --git a/javatests/google/registry/rde/testdata/domain_fragment_pendingDeletePeriod.xml b/javatests/google/registry/rde/testdata/domain_fragment_pendingDeletePeriod.xml deleted file mode 100644 index cbd4cf742..000000000 --- a/javatests/google/registry/rde/testdata/domain_fragment_pendingDeletePeriod.xml +++ /dev/null @@ -1,16 +0,0 @@ - - example1.example - Dexample1-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - 2014-04-03T22:00:00.0Z - diff --git a/javatests/google/registry/rde/testdata/domain_fragment_pendingRestorePeriod.xml b/javatests/google/registry/rde/testdata/domain_fragment_pendingRestorePeriod.xml deleted file mode 100644 index 1834ff004..000000000 --- a/javatests/google/registry/rde/testdata/domain_fragment_pendingRestorePeriod.xml +++ /dev/null @@ -1,16 +0,0 @@ - - example1.example - Dexample1-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - 2014-04-03T22:00:00.0Z - diff --git a/javatests/google/registry/rde/testdata/domain_fragment_redemptionPeriod.xml b/javatests/google/registry/rde/testdata/domain_fragment_redemptionPeriod.xml deleted file mode 100644 index 11c34817f..000000000 --- a/javatests/google/registry/rde/testdata/domain_fragment_redemptionPeriod.xml +++ /dev/null @@ -1,16 +0,0 @@ - - example1.example - Dexample1-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - 2014-04-03T22:00:00.0Z - diff --git a/javatests/google/registry/rde/testdata/domain_fragment_registrant_missing.xml b/javatests/google/registry/rde/testdata/domain_fragment_registrant_missing.xml deleted file mode 100644 index b3c778dd3..000000000 --- a/javatests/google/registry/rde/testdata/domain_fragment_registrant_missing.xml +++ /dev/null @@ -1,13 +0,0 @@ - - example1.example - Dexample1-TEST - - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - diff --git a/javatests/google/registry/rde/testdata/domain_fragment_renewPeriod.xml b/javatests/google/registry/rde/testdata/domain_fragment_renewPeriod.xml deleted file mode 100644 index 2ca5714e3..000000000 --- a/javatests/google/registry/rde/testdata/domain_fragment_renewPeriod.xml +++ /dev/null @@ -1,16 +0,0 @@ - - example1.example - Dexample1-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - 2014-04-03T22:00:00.0Z - diff --git a/javatests/google/registry/rde/testdata/domain_fragment_secdns.xml b/javatests/google/registry/rde/testdata/domain_fragment_secdns.xml deleted file mode 100644 index db7200412..000000000 --- a/javatests/google/registry/rde/testdata/domain_fragment_secdns.xml +++ /dev/null @@ -1,23 +0,0 @@ - - example1.example - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - - - 4609 - 8 - 2 - 5FA1FA1C2F70AA483FE178B765D82B272072B4E4167902C5B7F97D46C8899F44 - - - diff --git a/javatests/google/registry/rde/testdata/domain_fragment_transferPeriod.xml b/javatests/google/registry/rde/testdata/domain_fragment_transferPeriod.xml deleted file mode 100644 index 41661bb23..000000000 --- a/javatests/google/registry/rde/testdata/domain_fragment_transferPeriod.xml +++ /dev/null @@ -1,24 +0,0 @@ - - example1.example - Dexample1-TEST - - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - 2014-04-03T22:00:00.0Z - - clientApproved - RegistrarX - 2014-10-08T16:23:21.897803Z - RegistrarY - 2014-10-09T08:25:43.305554Z - 2017-08-07T18:05:14.039016Z - - diff --git a/javatests/google/registry/rde/testdata/domain_fragment_up_rr.xml b/javatests/google/registry/rde/testdata/domain_fragment_up_rr.xml deleted file mode 100644 index dac24751c..000000000 --- a/javatests/google/registry/rde/testdata/domain_fragment_up_rr.xml +++ /dev/null @@ -1,16 +0,0 @@ - - example1.example - Dexample1-TEST - - jd1234 - sh8013 - sh8013 - RegistrarX - RegistrarX - RegistrarX - 1999-04-03T22:00:00.0Z - 2015-04-03T22:00:00.0Z - 2014-04-03T22:00:00.0Z - diff --git a/javatests/google/registry/rde/testdata/host_fragment.xml b/javatests/google/registry/rde/testdata/host_fragment.xml deleted file mode 100644 index 0a9856a7d..000000000 --- a/javatests/google/registry/rde/testdata/host_fragment.xml +++ /dev/null @@ -1,15 +0,0 @@ - - ns1.example1.test - Hns1_example1_test-TEST - - - 192.0.2.2 - 192.0.2.29 - 1080:0:0:0:8:800:200C:417A - RegistrarX - RegistrarX - 1999-05-08T12:10:00.0Z - RegistrarX - 2009-10-03T09:34:00.0Z - 2008-10-03T09:34:00.0Z -