mirror of
https://github.com/google/nomulus.git
synced 2025-08-03 00:12:11 +02:00
Refactor most of OT&E verification code to exist in utils class
This does not change existing functionality but will allow us to use this common code in the yet-to-be-created web console action as well. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=227159346
This commit is contained in:
parent
2777018d6a
commit
2e7d71b238
22 changed files with 754 additions and 470 deletions
147
javatests/google/registry/model/OteStatsTest.java
Normal file
147
javatests/google/registry/model/OteStatsTest.java
Normal file
|
@ -0,0 +1,147 @@
|
|||
// Copyright 2018 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.model;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import google.registry.model.OteStats.StatType;
|
||||
import google.registry.testing.AppEngineRule;
|
||||
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 final class OteStatsTest {
|
||||
|
||||
@Rule public final AppEngineRule appEngine = AppEngineRule.builder().withDatastore().build();
|
||||
|
||||
@Before
|
||||
public void init() throws Exception {
|
||||
OteStatsTestHelper.setupHistoryEntries();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_allPass() {
|
||||
OteStats stats = OteStats.getFromRegistrar("blobio");
|
||||
assertThat(stats.getFailures()).isEmpty();
|
||||
assertThat(stats.getSize()).isEqualTo(31);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_someFailures() {
|
||||
OteStatsTestHelper.deleteHostDeleteHistoryEntry();
|
||||
OteStatsTestHelper.deleteDomainCreateHistoryEntry();
|
||||
OteStatsTestHelper.deleteDomainRestoreHistoryEntry();
|
||||
OteStats stats = OteStats.getFromRegistrar("blobio");
|
||||
assertThat(stats.getFailures())
|
||||
.containsExactly(
|
||||
StatType.DOMAIN_CREATES_IDN, StatType.DOMAIN_RESTORES, StatType.HOST_DELETES)
|
||||
.inOrder();
|
||||
assertThat(stats.getSize()).isEqualTo(35);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_toString() {
|
||||
OteStats stats = OteStats.getFromRegistrar("blobio");
|
||||
String expected =
|
||||
"contact creates: 0\n"
|
||||
+ "contact deletes: 0\n"
|
||||
+ "contact transfer approves: 0\n"
|
||||
+ "contact transfer cancels: 0\n"
|
||||
+ "contact transfer rejects: 0\n"
|
||||
+ "contact transfer requests: 0\n"
|
||||
+ "contact updates: 0\n"
|
||||
+ "domain application creates: 0\n"
|
||||
+ "domain application creates landrush: 0\n"
|
||||
+ "domain application creates sunrise: 0\n"
|
||||
+ "domain application deletes: 0\n"
|
||||
+ "domain application updates: 0\n"
|
||||
+ "domain autorenews: 0\n"
|
||||
+ "domain creates: 5\n"
|
||||
+ "domain creates ascii: 4\n"
|
||||
+ "domain creates idn: 1\n"
|
||||
+ "domain creates start date sunrise: 1\n"
|
||||
+ "domain creates with claims notice: 1\n"
|
||||
+ "domain creates with fee: 1\n"
|
||||
+ "domain creates with sec dns: 1\n"
|
||||
+ "domain creates without sec dns: 4\n"
|
||||
+ "domain deletes: 2\n"
|
||||
+ "domain renews: 0\n"
|
||||
+ "domain restores: 1\n"
|
||||
+ "domain transfer approves: 1\n"
|
||||
+ "domain transfer cancels: 1\n"
|
||||
+ "domain transfer rejects: 1\n"
|
||||
+ "domain transfer requests: 1\n"
|
||||
+ "domain updates: 1\n"
|
||||
+ "domain updates with sec dns: 1\n"
|
||||
+ "domain updates without sec dns: 0\n"
|
||||
+ "host creates: 1\n"
|
||||
+ "host creates external: 0\n"
|
||||
+ "host creates subordinate: 1\n"
|
||||
+ "host deletes: 1\n"
|
||||
+ "host updates: 1\n"
|
||||
+ "unclassified flows: 0\n"
|
||||
+ "TOTAL: 31";
|
||||
assertThat(stats.toString()).isEqualTo(expected);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMissingHostDeletes_toString() {
|
||||
OteStatsTestHelper.deleteHostDeleteHistoryEntry();
|
||||
OteStats stats = OteStats.getFromRegistrar("blobio");
|
||||
String expected =
|
||||
"contact creates: 0\n"
|
||||
+ "contact deletes: 0\n"
|
||||
+ "contact transfer approves: 0\n"
|
||||
+ "contact transfer cancels: 0\n"
|
||||
+ "contact transfer rejects: 0\n"
|
||||
+ "contact transfer requests: 0\n"
|
||||
+ "contact updates: 0\n"
|
||||
+ "domain application creates: 0\n"
|
||||
+ "domain application creates landrush: 0\n"
|
||||
+ "domain application creates sunrise: 0\n"
|
||||
+ "domain application deletes: 0\n"
|
||||
+ "domain application updates: 0\n"
|
||||
+ "domain autorenews: 0\n"
|
||||
+ "domain creates: 5\n"
|
||||
+ "domain creates ascii: 4\n"
|
||||
+ "domain creates idn: 1\n"
|
||||
+ "domain creates start date sunrise: 1\n"
|
||||
+ "domain creates with claims notice: 1\n"
|
||||
+ "domain creates with fee: 1\n"
|
||||
+ "domain creates with sec dns: 1\n"
|
||||
+ "domain creates without sec dns: 4\n"
|
||||
+ "domain deletes: 2\n"
|
||||
+ "domain renews: 0\n"
|
||||
+ "domain restores: 1\n"
|
||||
+ "domain transfer approves: 1\n"
|
||||
+ "domain transfer cancels: 1\n"
|
||||
+ "domain transfer rejects: 1\n"
|
||||
+ "domain transfer requests: 1\n"
|
||||
+ "domain updates: 1\n"
|
||||
+ "domain updates with sec dns: 1\n"
|
||||
+ "domain updates without sec dns: 0\n"
|
||||
+ "host creates: 1\n"
|
||||
+ "host creates external: 0\n"
|
||||
+ "host creates subordinate: 1\n"
|
||||
+ "host deletes: 0\n"
|
||||
+ "host updates: 10\n"
|
||||
+ "unclassified flows: 0\n"
|
||||
+ "TOTAL: 39";
|
||||
assertThat(stats.toString()).isEqualTo(expected);
|
||||
}
|
||||
}
|
159
javatests/google/registry/model/OteStatsTestHelper.java
Normal file
159
javatests/google/registry/model/OteStatsTestHelper.java
Normal file
|
@ -0,0 +1,159 @@
|
|||
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.model;
|
||||
|
||||
import static google.registry.testing.DatastoreHelper.deleteResource;
|
||||
import static google.registry.testing.DatastoreHelper.persistPremiumList;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.testing.TestDataHelper.loadBytes;
|
||||
import static google.registry.util.DateTimeUtils.END_OF_TIME;
|
||||
|
||||
import google.registry.model.eppcommon.Trid;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
import google.registry.model.reporting.HistoryEntry.Type;
|
||||
import java.io.IOException;
|
||||
|
||||
public final class OteStatsTestHelper {
|
||||
|
||||
private static HistoryEntry hostDeleteHistoryEntry;
|
||||
private static HistoryEntry domainCreateHistoryEntry;
|
||||
private static HistoryEntry domainRestoreHistoryEntry;
|
||||
|
||||
public static void setupHistoryEntries() throws IOException {
|
||||
persistPremiumList("default_sandbox_list", "sandbox,USD 1000");
|
||||
persistResource(
|
||||
new HistoryEntry.Builder()
|
||||
.setClientId("blobio-1")
|
||||
.setType(Type.DOMAIN_CREATE)
|
||||
.setXmlBytes(getBytes("domain_create_sunrise.xml"))
|
||||
.build());
|
||||
domainCreateHistoryEntry =
|
||||
persistResource(
|
||||
new HistoryEntry.Builder()
|
||||
.setClientId("blobio-1")
|
||||
.setType(Type.DOMAIN_CREATE)
|
||||
.setXmlBytes(getBytes("domain_create_idn.xml"))
|
||||
.build());
|
||||
persistResource(
|
||||
new HistoryEntry.Builder()
|
||||
.setClientId("blobio-1")
|
||||
.setType(Type.DOMAIN_CREATE)
|
||||
.setXmlBytes(getBytes("domain_create_claim_notice.xml"))
|
||||
.build());
|
||||
persistResource(
|
||||
new HistoryEntry.Builder()
|
||||
.setClientId("blobio-1")
|
||||
.setType(Type.DOMAIN_CREATE)
|
||||
.setXmlBytes(getBytes("domain_create_anchor_tenant_fee_standard.xml"))
|
||||
.build());
|
||||
persistResource(
|
||||
new HistoryEntry.Builder()
|
||||
.setClientId("blobio-1")
|
||||
.setType(Type.DOMAIN_CREATE)
|
||||
.setXmlBytes(getBytes("domain_create_dsdata.xml"))
|
||||
.build());
|
||||
persistResource(
|
||||
new HistoryEntry.Builder()
|
||||
.setClientId("blobio-1")
|
||||
.setType(Type.DOMAIN_DELETE)
|
||||
.setXmlBytes(getBytes("domain_delete.xml"))
|
||||
.build());
|
||||
persistResource(
|
||||
new HistoryEntry.Builder()
|
||||
.setClientId("blobio-2")
|
||||
.setType(Type.DOMAIN_DELETE)
|
||||
.setXmlBytes(getBytes("domain_delete.xml"))
|
||||
.build());
|
||||
domainRestoreHistoryEntry =
|
||||
persistResource(
|
||||
new HistoryEntry.Builder()
|
||||
.setClientId("blobio-1")
|
||||
.setType(Type.DOMAIN_RESTORE)
|
||||
.setXmlBytes(getBytes("domain_restore.xml"))
|
||||
.build());
|
||||
persistResource(
|
||||
new HistoryEntry.Builder()
|
||||
.setClientId("blobio-1")
|
||||
.setType(Type.DOMAIN_TRANSFER_APPROVE)
|
||||
.setXmlBytes(getBytes("domain_transfer_approve.xml"))
|
||||
.build());
|
||||
persistResource(
|
||||
new HistoryEntry.Builder()
|
||||
.setClientId("blobio-1")
|
||||
.setType(Type.DOMAIN_TRANSFER_CANCEL)
|
||||
.setXmlBytes(getBytes("domain_transfer_cancel.xml"))
|
||||
.build());
|
||||
persistResource(
|
||||
new HistoryEntry.Builder()
|
||||
.setClientId("blobio-1")
|
||||
.setType(Type.DOMAIN_TRANSFER_REJECT)
|
||||
.setXmlBytes(getBytes("domain_transfer_reject.xml"))
|
||||
.build());
|
||||
persistResource(
|
||||
new HistoryEntry.Builder()
|
||||
.setClientId("blobio-1")
|
||||
.setType(Type.DOMAIN_TRANSFER_REQUEST)
|
||||
.setXmlBytes(getBytes("domain_transfer_request.xml"))
|
||||
.build());
|
||||
persistResource(
|
||||
new HistoryEntry.Builder()
|
||||
.setClientId("blobio-1")
|
||||
.setType(Type.DOMAIN_UPDATE)
|
||||
.setXmlBytes(getBytes("domain_update_with_secdns.xml"))
|
||||
.build());
|
||||
persistResource(
|
||||
new HistoryEntry.Builder()
|
||||
.setClientId("blobio-1")
|
||||
.setType(Type.HOST_CREATE)
|
||||
.setXmlBytes(getBytes("host_create_complete.xml"))
|
||||
.build());
|
||||
hostDeleteHistoryEntry =
|
||||
persistResource(
|
||||
new HistoryEntry.Builder()
|
||||
.setClientId("blobio-1")
|
||||
.setType(Type.HOST_DELETE)
|
||||
.setXmlBytes(getBytes("host_delete.xml"))
|
||||
.build());
|
||||
// Persist 10 host updates for a total of 25 history entries. Since these also sort last by
|
||||
// modification time, when these cause all tests to pass, only the first will be recorded and
|
||||
// the rest will be skipped.
|
||||
for (int i = 0; i < 10; i++) {
|
||||
persistResource(
|
||||
new HistoryEntry.Builder()
|
||||
.setClientId("blobio-1")
|
||||
.setType(Type.HOST_UPDATE)
|
||||
.setXmlBytes(getBytes("host_update.xml"))
|
||||
.setTrid(Trid.create(null, String.format("blahtrid-%d", i)))
|
||||
.setModificationTime(END_OF_TIME)
|
||||
.build());
|
||||
}
|
||||
}
|
||||
|
||||
public static void deleteHostDeleteHistoryEntry() {
|
||||
deleteResource(hostDeleteHistoryEntry);
|
||||
}
|
||||
|
||||
public static void deleteDomainCreateHistoryEntry() {
|
||||
deleteResource(domainCreateHistoryEntry);
|
||||
}
|
||||
|
||||
public static void deleteDomainRestoreHistoryEntry() {
|
||||
deleteResource(domainRestoreHistoryEntry);
|
||||
}
|
||||
|
||||
private static byte[] getBytes(String filename) throws IOException {
|
||||
return loadBytes(OteStatsTestHelper.class, filename).read();
|
||||
}
|
||||
}
|
29
javatests/google/registry/model/testdata/domain_create_anchor_tenant_fee_standard.xml
vendored
Normal file
29
javatests/google/registry/model/testdata/domain_create_anchor_tenant_fee_standard.xml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<create>
|
||||
<domain:create
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.tld</domain:name>
|
||||
<domain:period unit="y">2</domain:period>
|
||||
<domain:registrant>jd1234</domain:registrant>
|
||||
<domain:contact type="admin">jd1234</domain:contact>
|
||||
<domain:contact type="tech">jd1234</domain:contact>
|
||||
<domain:authInfo>
|
||||
<domain:pw>abcdefghijklmnop</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:create>
|
||||
</create>
|
||||
<extension>
|
||||
<metadata:metadata xmlns:metadata="urn:google:params:xml:ns:metadata-1.0">
|
||||
<metadata:reason>anchor-tenant-test</metadata:reason>
|
||||
<metadata:requestedByRegistrar>false</metadata:requestedByRegistrar>
|
||||
<metadata:anchorTenant>true</metadata:anchorTenant>
|
||||
</metadata:metadata>
|
||||
<fee:create xmlns:fee="urn:ietf:params:xml:ns:fee-0.6">
|
||||
<fee:currency>USD</fee:currency>
|
||||
<fee:fee>26.00</fee:fee>
|
||||
</fee:create>
|
||||
</extension>
|
||||
<clTRID>RegistryTool</clTRID>
|
||||
</command>
|
||||
</epp>
|
33
javatests/google/registry/model/testdata/domain_create_claim_notice.xml
vendored
Normal file
33
javatests/google/registry/model/testdata/domain_create_claim_notice.xml
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<create>
|
||||
<domain:create
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example-one.tld</domain:name>
|
||||
<domain:period unit="y">2</domain:period>
|
||||
<domain:ns>
|
||||
<domain:hostObj>ns1.example.net</domain:hostObj>
|
||||
<domain:hostObj>ns2.example.net</domain:hostObj>
|
||||
</domain:ns>
|
||||
<domain:registrant>jd1234</domain:registrant>
|
||||
<domain:contact type="admin">sh8013</domain:contact>
|
||||
<domain:contact type="tech">sh8013</domain:contact>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:create>
|
||||
</create>
|
||||
<extension>
|
||||
<launch:create xmlns:launch="urn:ietf:params:xml:ns:launch-1.0" type="registration">
|
||||
<launch:phase>claims</launch:phase>
|
||||
<launch:notice>
|
||||
<launch:noticeID>370d0b7c9223372036854775807</launch:noticeID>
|
||||
<launch:notAfter>2010-08-16T09:00:00.0Z</launch:notAfter>
|
||||
<launch:acceptedDate>2009-08-16T09:00:00.0Z</launch:acceptedDate>
|
||||
</launch:notice>
|
||||
</launch:create>
|
||||
</extension>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
36
javatests/google/registry/model/testdata/domain_create_dsdata.xml
vendored
Normal file
36
javatests/google/registry/model/testdata/domain_create_dsdata.xml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<command>
|
||||
<create>
|
||||
<domain:create
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.tld</domain:name>
|
||||
<domain:period unit="y">2</domain:period>
|
||||
<domain:ns>
|
||||
<domain:hostObj>ns1.example.net</domain:hostObj>
|
||||
<domain:hostObj>ns2.example.net</domain:hostObj>
|
||||
</domain:ns>
|
||||
<domain:registrant>jd1234</domain:registrant>
|
||||
<domain:contact type="admin">sh8013</domain:contact>
|
||||
<domain:contact type="tech">sh8013</domain:contact>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:create>
|
||||
</create>
|
||||
<extension>
|
||||
<secDNS:create
|
||||
xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1">
|
||||
<secDNS:maxSigLife>604800</secDNS:maxSigLife>
|
||||
<secDNS:dsData>
|
||||
<secDNS:keyTag>12345</secDNS:keyTag>
|
||||
<secDNS:alg>3</secDNS:alg>
|
||||
<secDNS:digestType>1</secDNS:digestType>
|
||||
<secDNS:digest>49FD46E6C4B45C55D4AC</secDNS:digest>
|
||||
</secDNS:dsData>
|
||||
</secDNS:create>
|
||||
</extension>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
22
javatests/google/registry/model/testdata/domain_create_idn.xml
vendored
Normal file
22
javatests/google/registry/model/testdata/domain_create_idn.xml
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<create>
|
||||
<domain:create
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>xn--abc-873b2e7eb1k8a4lpjvv.tld</domain:name>
|
||||
<domain:period unit="y">2</domain:period>
|
||||
<domain:ns>
|
||||
<domain:hostObj>ns1.example.net</domain:hostObj>
|
||||
<domain:hostObj>ns2.example.net</domain:hostObj>
|
||||
</domain:ns>
|
||||
<domain:registrant>jd1234</domain:registrant>
|
||||
<domain:contact type="admin">sh8013</domain:contact>
|
||||
<domain:contact type="tech">sh8013</domain:contact>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:create>
|
||||
</create>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
136
javatests/google/registry/model/testdata/domain_create_sunrise.xml
vendored
Normal file
136
javatests/google/registry/model/testdata/domain_create_sunrise.xml
vendored
Normal file
|
@ -0,0 +1,136 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<create>
|
||||
<domain:create
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>exampleone.tld</domain:name>
|
||||
<domain:ns>
|
||||
<domain:hostObj>ns1.example.net</domain:hostObj>
|
||||
<domain:hostObj>ns2.example.net</domain:hostObj>
|
||||
</domain:ns>
|
||||
<domain:registrant>jd1234</domain:registrant>
|
||||
<domain:contact type="admin">sh8013</domain:contact>
|
||||
<domain:contact type="tech">sh8013</domain:contact>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:create>
|
||||
</create>
|
||||
<extension>
|
||||
<launch:create
|
||||
xmlns:launch="urn:ietf:params:xml:ns:launch-1.0">
|
||||
<launch:phase>sunrise</launch:phase>
|
||||
<smd:signedMark xmlns:smd="urn:ietf:params:xml:ns:signedMark-1.0" id="signedMark">
|
||||
<smd:id>1-2</smd:id>
|
||||
<smd:issuerInfo issuerID="2">
|
||||
<smd:org>Example Inc.</smd:org>
|
||||
<smd:email>support@example.tld</smd:email>
|
||||
<smd:url>http://www.example.tld</smd:url>
|
||||
<smd:voice x="1234">+1.7035555555</smd:voice>
|
||||
</smd:issuerInfo>
|
||||
<smd:notBefore>2009-08-16T09:00:00.0Z</smd:notBefore>
|
||||
<smd:notAfter>2010-08-16T09:00:00.0Z</smd:notAfter>
|
||||
<mark:mark xmlns:mark="urn:ietf:params:xml:ns:mark-1.0">
|
||||
<mark:trademark>
|
||||
<mark:id>1234-2</mark:id>
|
||||
<mark:markName>Example One</mark:markName>
|
||||
<mark:holder entitlement="owner">
|
||||
<mark:org>Example Inc.</mark:org>
|
||||
<mark:addr>
|
||||
<mark:street>123 Example Dr.</mark:street>
|
||||
<mark:street>Suite 100</mark:street>
|
||||
<mark:city>Reston</mark:city>
|
||||
<mark:sp>VA</mark:sp>
|
||||
<mark:pc>20190</mark:pc>
|
||||
<mark:cc>US</mark:cc>
|
||||
</mark:addr>
|
||||
</mark:holder>
|
||||
<mark:jurisdiction>US</mark:jurisdiction>
|
||||
<mark:class>35</mark:class>
|
||||
<mark:class>36</mark:class>
|
||||
<mark:label>example-one</mark:label>
|
||||
<mark:label>exampleone</mark:label>
|
||||
<mark:goodsAndServices>Dirigendas et eiusmodi featuring infringo in airfare et cartam servicia.</mark:goodsAndServices>
|
||||
<mark:regNum>234235</mark:regNum>
|
||||
<mark:regDate>2009-08-16T09:00:00.0Z</mark:regDate>
|
||||
<mark:exDate>2015-08-16T09:00:00.0Z</mark:exDate>
|
||||
</mark:trademark>
|
||||
</mark:mark>
|
||||
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
|
||||
<SignedInfo>
|
||||
<CanonicalizationMethod
|
||||
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
|
||||
<SignatureMethod
|
||||
Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
|
||||
<Reference URI="#signedMark">
|
||||
<Transforms>
|
||||
<Transform
|
||||
Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
|
||||
</Transforms>
|
||||
<DigestMethod
|
||||
Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
|
||||
<DigestValue>
|
||||
miF4M2aTd1Y3tKOzJtiyl2VpzAnVPnV1Hq7Zax+yzrA=
|
||||
</DigestValue>
|
||||
</Reference>
|
||||
</SignedInfo>
|
||||
<SignatureValue>
|
||||
MELpHTWEVfG1JcsG1/a//o54OnlJ5A864+X5JwfqgGBBeZSzGHNzwzTKFzIyyyfn
|
||||
lGxVwNMoBV5aSvkF7oEKMNVzfcl/P0czNQZ/LJ83p3Ol27/iUNsqgCaGf9Zupw+M
|
||||
XT4Q2lOrIw+qSx5g7q9T83siMLvkD5uEYlU5dPqgsObLTW8/doTQrA14RcxgY4kG
|
||||
a4+t5B1cT+5VaghTOPb8uUSEDKjnOsGdy8p24wgyK9n8h0CTSS2ZQ6Zq/RmQeT7D
|
||||
sbceUHheQ+mkQWIljpMQqsiBjw5XXh4jkEgfAzrb6gkYEF+X8ReuPZuOYC4QjIET
|
||||
yx8ifN4KE3GIbMXeF4LDsA==
|
||||
</SignatureValue>
|
||||
<KeyInfo>
|
||||
<KeyValue>
|
||||
<RSAKeyValue>
|
||||
<Modulus>
|
||||
o/cwvXhbVYl0RDWWvoyeZpETVZVVcMCovUVNg/swWinuMgEWgVQFrz0xA04pEhXC
|
||||
FVv4evbUpekJ5buqU1gmQyOsCKQlhOHTdPjvkC5upDqa51Flk0TMaMkIQjs7aUKC
|
||||
mA4RG4tTTGK/EjR1ix8/D0gHYVRldy1YPrMP+ou75bOVnIos+HifrAtrIv4qEqwL
|
||||
L4FTZAUpaCa2BmgXfy2CSRQbxD5Or1gcSa3vurh5sPMCNxqaXmIXmQipS+DuEBqM
|
||||
M8tldaN7RYojUEKrGVsNk5i9y2/7sjn1zyyUPf7vL4GgDYqhJYWV61DnXgx/Jd6C
|
||||
WxvsnDF6scscQzUTEl+hyw==
|
||||
</Modulus>
|
||||
<Exponent>
|
||||
AQAB
|
||||
</Exponent>
|
||||
</RSAKeyValue>
|
||||
</KeyValue>
|
||||
<X509Data>
|
||||
<X509Certificate>
|
||||
MIIESTCCAzGgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBiMQswCQYDVQQGEwJVUzEL
|
||||
MAkGA1UECBMCQ0ExFDASBgNVBAcTC0xvcyBBbmdlbGVzMRMwEQYDVQQKEwpJQ0FO
|
||||
TiBUTUNIMRswGQYDVQQDExJJQ0FOTiBUTUNIIFRFU1QgQ0EwHhcNMTMwMjA4MDAw
|
||||
MDAwWhcNMTgwMjA3MjM1OTU5WjBsMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0Ex
|
||||
FDASBgNVBAcTC0xvcyBBbmdlbGVzMRcwFQYDVQQKEw5WYWxpZGF0b3IgVE1DSDEh
|
||||
MB8GA1UEAxMYVmFsaWRhdG9yIFRNQ0ggVEVTVCBDRVJUMIIBIjANBgkqhkiG9w0B
|
||||
AQEFAAOCAQ8AMIIBCgKCAQEAo/cwvXhbVYl0RDWWvoyeZpETVZVVcMCovUVNg/sw
|
||||
WinuMgEWgVQFrz0xA04pEhXCFVv4evbUpekJ5buqU1gmQyOsCKQlhOHTdPjvkC5u
|
||||
pDqa51Flk0TMaMkIQjs7aUKCmA4RG4tTTGK/EjR1ix8/D0gHYVRldy1YPrMP+ou7
|
||||
5bOVnIos+HifrAtrIv4qEqwLL4FTZAUpaCa2BmgXfy2CSRQbxD5Or1gcSa3vurh5
|
||||
sPMCNxqaXmIXmQipS+DuEBqMM8tldaN7RYojUEKrGVsNk5i9y2/7sjn1zyyUPf7v
|
||||
L4GgDYqhJYWV61DnXgx/Jd6CWxvsnDF6scscQzUTEl+hywIDAQABo4H/MIH8MAwG
|
||||
A1UdEwEB/wQCMAAwHQYDVR0OBBYEFPZEcIQcD/Bj2IFz/LERuo2ADJviMIGMBgNV
|
||||
HSMEgYQwgYGAFO0/7kEh3FuEKS+Q/kYHaD/W6wihoWakZDBiMQswCQYDVQQGEwJV
|
||||
UzELMAkGA1UECBMCQ0ExFDASBgNVBAcTC0xvcyBBbmdlbGVzMRMwEQYDVQQKEwpJ
|
||||
Q0FOTiBUTUNIMRswGQYDVQQDExJJQ0FOTiBUTUNIIFRFU1QgQ0GCAQEwDgYDVR0P
|
||||
AQH/BAQDAgeAMC4GA1UdHwQnMCUwI6AhoB+GHWh0dHA6Ly9jcmwuaWNhbm4ub3Jn
|
||||
L3RtY2guY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQB2qSy7ui+43cebKUKwWPrzz9y/
|
||||
IkrMeJGKjo40n+9uekaw3DJ5EqiOf/qZ4pjBD++oR6BJCb6NQuQKwnoAz5lE4Ssu
|
||||
y5+i93oT3HfyVc4gNMIoHm1PS19l7DBKrbwbzAea/0jKWVzrvmV7TBfjxD3AQo1R
|
||||
bU5dBr6IjbdLFlnO5x0G0mrG7x5OUPuurihyiURpFDpwH8KAH1wMcCpXGXFRtGKk
|
||||
wydgyVYAty7otkl/z3bZkCVT34gPvF70sR6+QxUy8u0LzF5A/beYaZpxSYG31amL
|
||||
AdXitTWFipaIGea9lEGFM0L9+Bg7XzNn4nVLXokyEB3bgS4scG6QznX23FGk
|
||||
</X509Certificate>
|
||||
</X509Data>
|
||||
</KeyInfo>
|
||||
</Signature>
|
||||
</smd:signedMark>
|
||||
</launch:create>
|
||||
</extension>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
17
javatests/google/registry/model/testdata/domain_delete.xml
vendored
Normal file
17
javatests/google/registry/model/testdata/domain_delete.xml
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<delete>
|
||||
<domain:delete
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.tld</domain:name>
|
||||
</domain:delete>
|
||||
</delete>
|
||||
<extension>
|
||||
<metadata:metadata xmlns:metadata="urn:google:params:xml:ns:metadata-1.0">
|
||||
<metadata:reason>Deleted by registry administrator: Test</metadata:reason>
|
||||
<metadata:requestedByRegistrar>false</metadata:requestedByRegistrar>
|
||||
</metadata:metadata>
|
||||
</extension>
|
||||
<clTRID>RegistryTool</clTRID>
|
||||
</command>
|
||||
</epp>
|
17
javatests/google/registry/model/testdata/domain_restore.xml
vendored
Normal file
17
javatests/google/registry/model/testdata/domain_restore.xml
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<update>
|
||||
<domain:update
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.tld</domain:name>
|
||||
<domain:chg/>
|
||||
</domain:update>
|
||||
</update>
|
||||
<extension>
|
||||
<rgp:update xmlns:rgp="urn:ietf:params:xml:ns:rgp-1.0">
|
||||
<rgp:restore op="request"/>
|
||||
</rgp:update>
|
||||
</extension>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
11
javatests/google/registry/model/testdata/domain_transfer_approve.xml
vendored
Normal file
11
javatests/google/registry/model/testdata/domain_transfer_approve.xml
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<transfer op="approve">
|
||||
<domain:transfer
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.tld</domain:name>
|
||||
</domain:transfer>
|
||||
</transfer>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
11
javatests/google/registry/model/testdata/domain_transfer_cancel.xml
vendored
Normal file
11
javatests/google/registry/model/testdata/domain_transfer_cancel.xml
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<transfer op="cancel">
|
||||
<domain:transfer
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.tld</domain:name>
|
||||
</domain:transfer>
|
||||
</transfer>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
11
javatests/google/registry/model/testdata/domain_transfer_reject.xml
vendored
Normal file
11
javatests/google/registry/model/testdata/domain_transfer_reject.xml
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<transfer op="reject">
|
||||
<domain:transfer
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.tld</domain:name>
|
||||
</domain:transfer>
|
||||
</transfer>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
15
javatests/google/registry/model/testdata/domain_transfer_request.xml
vendored
Normal file
15
javatests/google/registry/model/testdata/domain_transfer_request.xml
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<transfer op="request">
|
||||
<domain:transfer
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.tld</domain:name>
|
||||
<domain:period unit="y">1</domain:period>
|
||||
<domain:authInfo>
|
||||
<domain:pw roid="JD1234-REP">2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:transfer>
|
||||
</transfer>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
28
javatests/google/registry/model/testdata/domain_update_with_secdns.xml
vendored
Normal file
28
javatests/google/registry/model/testdata/domain_update_with_secdns.xml
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<update>
|
||||
<domain:update
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.tld</domain:name>
|
||||
<domain:chg/>
|
||||
</domain:update>
|
||||
</update>
|
||||
<extension>
|
||||
<rgp:update xmlns:rgp="urn:ietf:params:xml:ns:rgp-1.0">
|
||||
<rgp:restore op="request"/>
|
||||
</rgp:update>
|
||||
<secDNS:update
|
||||
xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1">
|
||||
<secDNS:add>
|
||||
<secDNS:dsData>
|
||||
<secDNS:keyTag>12346</secDNS:keyTag>
|
||||
<secDNS:alg>3</secDNS:alg>
|
||||
<secDNS:digestType>1</secDNS:digestType>
|
||||
<secDNS:digest>38EC35D5B3A34B44C39B</secDNS:digest>
|
||||
</secDNS:dsData>
|
||||
</secDNS:add>
|
||||
</secDNS:update>
|
||||
</extension>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
13
javatests/google/registry/model/testdata/host_create_complete.xml
vendored
Normal file
13
javatests/google/registry/model/testdata/host_create_complete.xml
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<create>
|
||||
<host:create xmlns:host="urn:ietf:params:xml:ns:host-1.0">
|
||||
<host:name>example.tld</host:name>
|
||||
<host:addr ip="v4">162.100.102.99</host:addr>
|
||||
<host:addr ip="v4">4.5.6.7</host:addr>
|
||||
<host:addr ip="v6">2001:0db8:85a3:0000:0000:8a2e:0370:7334</host:addr>
|
||||
</host:create>
|
||||
</create>
|
||||
<clTRID>RegistryTool</clTRID>
|
||||
</command>
|
||||
</epp>
|
17
javatests/google/registry/model/testdata/host_delete.xml
vendored
Normal file
17
javatests/google/registry/model/testdata/host_delete.xml
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<delete>
|
||||
<host:delete
|
||||
xmlns:host="urn:ietf:params:xml:ns:host-1.0">
|
||||
<host:name>ns1.example.tld</host:name>
|
||||
</host:delete>
|
||||
</delete>
|
||||
<extension>
|
||||
<metadata:metadata xmlns:metadata="urn:google:params:xml:ns:metadata-1.0">
|
||||
<metadata:reason>Deleted by registry administrator: Test</metadata:reason>
|
||||
<metadata:requestedByRegistrar>false</metadata:requestedByRegistrar>
|
||||
</metadata:metadata>
|
||||
</extension>
|
||||
<clTRID>RegistryTool</clTRID>
|
||||
</command>
|
||||
</epp>
|
14
javatests/google/registry/model/testdata/host_update.xml
vendored
Normal file
14
javatests/google/registry/model/testdata/host_update.xml
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<update>
|
||||
<host:update
|
||||
xmlns:host="urn:ietf:params:xml:ns:host-1.0">
|
||||
<host:name>example.tld</host:name>
|
||||
<host:chg>
|
||||
<host:name>example2.tld</host:name>
|
||||
</host:chg>
|
||||
</host:update>
|
||||
</update>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
Loading…
Add table
Add a link
Reference in a new issue