mirror of
https://github.com/google/nomulus.git
synced 2025-07-07 03:33:28 +02:00
Partially convert RDAP ofy calls to tm calls (#964)
* Partially convert RDAP ofy calls to tm calls This converts the simple retrieval actions but does not touch the more complicated search actions -- those use some ofy() query searching logic and will likely end up being significantly more complicated than this change. Here, though, we are just changing the calls that can be converted easily to tm() lookups. To change in future PRs: - RdapDomainSearchAction - RdapEntitySearchAction - RdapNameserverSearchAction - RdapSearchActionBase
This commit is contained in:
parent
f35eda6dc1
commit
d73a15c697
8 changed files with 132 additions and 139 deletions
|
@ -38,12 +38,14 @@ import google.registry.rdap.RdapMetrics.SearchType;
|
|||
import google.registry.rdap.RdapMetrics.WildcardType;
|
||||
import google.registry.rdap.RdapSearchResults.IncompletenessWarningType;
|
||||
import google.registry.request.Action;
|
||||
import google.registry.testing.DualDatabaseTest;
|
||||
import google.registry.testing.TestOfyAndSql;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Nullable;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/** Unit tests for {@link RdapEntityAction}. */
|
||||
@DualDatabaseTest
|
||||
class RdapEntityActionTest extends RdapActionBaseTestCase<RdapEntityAction> {
|
||||
|
||||
RdapEntityActionTest() {
|
||||
|
@ -187,35 +189,35 @@ class RdapEntityActionTest extends RdapActionBaseTestCase<RdapEntityAction> {
|
|||
assertThat(response.getStatus()).isEqualTo(404);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testUnknownEntity_RoidPattern_notFound() {
|
||||
runNotFoundTest("_MISSING-ENTITY_");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testUnknownEntity_IanaPattern_notFound() {
|
||||
runNotFoundTest("123");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testUnknownEntity_notRoidNotIana_notFound() {
|
||||
// Since we allow search by registrar name, every string is a possible name
|
||||
runNotFoundTest("some,random,string");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testValidRegistrantContact_works() {
|
||||
login("evilregistrar");
|
||||
runSuccessfulHandleTest(registrant.getRepoId(), "rdap_associated_contact.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testValidRegistrantContact_found_asAdministrator() {
|
||||
loginAsAdmin();
|
||||
runSuccessfulHandleTest(registrant.getRepoId(), "rdap_associated_contact.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testValidRegistrantContact_found_notLoggedIn() {
|
||||
runSuccessfulHandleTest(
|
||||
registrant.getRepoId(),
|
||||
|
@ -225,7 +227,7 @@ class RdapEntityActionTest extends RdapActionBaseTestCase<RdapEntityAction> {
|
|||
"rdap_associated_contact_no_personal_data.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testValidRegistrantContact_found_loggedInAsOtherRegistrar() {
|
||||
login("otherregistrar");
|
||||
runSuccessfulHandleTest(
|
||||
|
@ -236,49 +238,49 @@ class RdapEntityActionTest extends RdapActionBaseTestCase<RdapEntityAction> {
|
|||
"rdap_associated_contact_no_personal_data.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testValidAdminContact_works() {
|
||||
login("evilregistrar");
|
||||
runSuccessfulHandleTest(adminContact.getRepoId(), "rdap_associated_contact.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testValidTechContact_works() {
|
||||
login("evilregistrar");
|
||||
runSuccessfulHandleTest(techContact.getRepoId(), "rdap_associated_contact.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testValidDisconnectedContact_works() {
|
||||
login("evilregistrar");
|
||||
runSuccessfulHandleTest(disconnectedContact.getRepoId(), "rdap_contact.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testDeletedContact_notFound() {
|
||||
runNotFoundTest(deletedContact.getRepoId());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testDeletedContact_notFound_includeDeletedSetFalse() {
|
||||
action.includeDeletedParam = Optional.of(false);
|
||||
runNotFoundTest(deletedContact.getRepoId());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testDeletedContact_notFound_notLoggedIn() {
|
||||
action.includeDeletedParam = Optional.of(true);
|
||||
runNotFoundTest(deletedContact.getRepoId());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testDeletedContact_notFound_loggedInAsDifferentRegistrar() {
|
||||
login("idnregistrar");
|
||||
action.includeDeletedParam = Optional.of(true);
|
||||
runNotFoundTest(deletedContact.getRepoId());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testDeletedContact_found_loggedInAsCorrectRegistrar() {
|
||||
login("evilregistrar");
|
||||
action.includeDeletedParam = Optional.of(true);
|
||||
|
@ -290,7 +292,7 @@ class RdapEntityActionTest extends RdapActionBaseTestCase<RdapEntityAction> {
|
|||
"rdap_contact_deleted.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testDeletedContact_found_loggedInAsAdmin() {
|
||||
loginAsAdmin();
|
||||
action.includeDeletedParam = Optional.of(true);
|
||||
|
@ -302,12 +304,12 @@ class RdapEntityActionTest extends RdapActionBaseTestCase<RdapEntityAction> {
|
|||
"rdap_contact_deleted.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testRegistrar_found() {
|
||||
runSuccessfulHandleTest("101", "Yes Virginia <script>", "rdap_registrar.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testRegistrarByName_found() {
|
||||
assertThat(generateActualJson("IDN%20Registrar"))
|
||||
.isEqualTo(
|
||||
|
@ -316,28 +318,28 @@ class RdapEntityActionTest extends RdapActionBaseTestCase<RdapEntityAction> {
|
|||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testRegistrar102_works() {
|
||||
runSuccessfulHandleTest("102", "IDN Registrar", "rdap_registrar.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testRegistrar103_works() {
|
||||
runSuccessfulHandleTest("103", "Multilevel Registrar", "rdap_registrar.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testRegistrar104_notFound() {
|
||||
runNotFoundTest("104");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testRegistrar104_notFound_deletedFlagWhenNotLoggedIn() {
|
||||
action.includeDeletedParam = Optional.of(true);
|
||||
runNotFoundTest("104");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testRegistrar104_found_deletedFlagWhenLoggedIn() {
|
||||
login("deletedregistrar");
|
||||
action.includeDeletedParam = Optional.of(true);
|
||||
|
@ -345,14 +347,14 @@ class RdapEntityActionTest extends RdapActionBaseTestCase<RdapEntityAction> {
|
|||
"104", "Yes Virginia <script>", "inactive", null, "rdap_registrar.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testRegistrar104_notFound_deletedFlagWhenLoggedInAsOther() {
|
||||
login("1tldregistrar");
|
||||
action.includeDeletedParam = Optional.of(true);
|
||||
runNotFoundTest("104");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testRegistrar104_found_deletedFlagWhenLoggedInAsAdmin() {
|
||||
loginAsAdmin();
|
||||
action.includeDeletedParam = Optional.of(true);
|
||||
|
@ -360,12 +362,12 @@ class RdapEntityActionTest extends RdapActionBaseTestCase<RdapEntityAction> {
|
|||
"104", "Yes Virginia <script>", "inactive", null, "rdap_registrar.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testRegistrar105_doesNotExist() {
|
||||
runNotFoundTest("105");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testQueryParameter_ignored() {
|
||||
login("evilregistrar");
|
||||
assertThat(generateActualJson(techContact.getRepoId() + "?key=value")).isEqualTo(
|
||||
|
@ -374,7 +376,7 @@ class RdapEntityActionTest extends RdapActionBaseTestCase<RdapEntityAction> {
|
|||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testMetrics() {
|
||||
generateActualJson(registrant.getRepoId());
|
||||
verify(rdapMetrics)
|
||||
|
|
|
@ -47,14 +47,16 @@ import google.registry.rdap.RdapObjectClasses.RdapEntity;
|
|||
import google.registry.rdap.RdapObjectClasses.ReplyPayloadBase;
|
||||
import google.registry.rdap.RdapObjectClasses.TopLevelReplyObject;
|
||||
import google.registry.testing.AppEngineExtension;
|
||||
import google.registry.testing.DualDatabaseTest;
|
||||
import google.registry.testing.FakeClock;
|
||||
import google.registry.testing.InjectExtension;
|
||||
import google.registry.testing.TestOfyAndSql;
|
||||
import org.joda.time.DateTime;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
|
||||
/** Unit tests for {@link RdapJsonFormatter}. */
|
||||
@DualDatabaseTest
|
||||
class RdapJsonFormatterTest {
|
||||
|
||||
@RegisterExtension
|
||||
|
@ -300,41 +302,41 @@ class RdapJsonFormatterTest {
|
|||
return new Gson().fromJson(loadFile(this.getClass(), expectedFileName), JsonObject.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testRegistrar() {
|
||||
assertThat(rdapJsonFormatter.createRdapRegistrarEntity(registrar, OutputDataType.FULL).toJson())
|
||||
.isEqualTo(loadJson("rdapjson_registrar.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testRegistrar_summary() {
|
||||
assertThat(
|
||||
rdapJsonFormatter.createRdapRegistrarEntity(registrar, OutputDataType.SUMMARY).toJson())
|
||||
.isEqualTo(loadJson("rdapjson_registrar_summary.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testHost_ipv4() {
|
||||
assertThat(
|
||||
rdapJsonFormatter.createRdapNameserver(hostResourceIpv4, OutputDataType.FULL).toJson())
|
||||
.isEqualTo(loadJson("rdapjson_host_ipv4.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testHost_ipv6() {
|
||||
assertThat(
|
||||
rdapJsonFormatter.createRdapNameserver(hostResourceIpv6, OutputDataType.FULL).toJson())
|
||||
.isEqualTo(loadJson("rdapjson_host_ipv6.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testHost_both() {
|
||||
assertThat(
|
||||
rdapJsonFormatter.createRdapNameserver(hostResourceBoth, OutputDataType.FULL).toJson())
|
||||
.isEqualTo(loadJson("rdapjson_host_both.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testHost_both_summary() {
|
||||
assertThat(
|
||||
rdapJsonFormatter
|
||||
|
@ -343,7 +345,7 @@ class RdapJsonFormatterTest {
|
|||
.isEqualTo(loadJson("rdapjson_host_both_summary.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testHost_noAddresses() {
|
||||
assertThat(
|
||||
rdapJsonFormatter
|
||||
|
@ -352,7 +354,7 @@ class RdapJsonFormatterTest {
|
|||
.isEqualTo(loadJson("rdapjson_host_no_addresses.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testHost_notLinked() {
|
||||
assertThat(
|
||||
rdapJsonFormatter
|
||||
|
@ -361,7 +363,7 @@ class RdapJsonFormatterTest {
|
|||
.isEqualTo(loadJson("rdapjson_host_not_linked.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testHost_superordinateHasPendingTransfer() {
|
||||
assertThat(
|
||||
rdapJsonFormatter
|
||||
|
@ -370,7 +372,7 @@ class RdapJsonFormatterTest {
|
|||
.isEqualTo(loadJson("rdapjson_host_pending_transfer.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testRegistrant() {
|
||||
assertThat(
|
||||
rdapJsonFormatter
|
||||
|
@ -382,7 +384,7 @@ class RdapJsonFormatterTest {
|
|||
.isEqualTo(loadJson("rdapjson_registrant.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testRegistrant_summary() {
|
||||
assertThat(
|
||||
rdapJsonFormatter
|
||||
|
@ -394,7 +396,7 @@ class RdapJsonFormatterTest {
|
|||
.isEqualTo(loadJson("rdapjson_registrant_summary.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testRegistrant_loggedOut() {
|
||||
rdapJsonFormatter.rdapAuthorization = RdapAuthorization.PUBLIC_AUTHORIZATION;
|
||||
assertThat(
|
||||
|
@ -407,7 +409,7 @@ class RdapJsonFormatterTest {
|
|||
.isEqualTo(loadJson("rdapjson_registrant_logged_out.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testRegistrant_baseHasNoTrailingSlash() {
|
||||
// First, make sure we have a trailing slash at the end by default!
|
||||
// This test tries to change the default state, if the default doesn't have a /, then this test
|
||||
|
@ -426,7 +428,7 @@ class RdapJsonFormatterTest {
|
|||
.isEqualTo(loadJson("rdapjson_registrant.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testAdmin() {
|
||||
assertThat(
|
||||
rdapJsonFormatter
|
||||
|
@ -438,7 +440,7 @@ class RdapJsonFormatterTest {
|
|||
.isEqualTo(loadJson("rdapjson_admincontact.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testTech() {
|
||||
assertThat(
|
||||
rdapJsonFormatter
|
||||
|
@ -448,7 +450,7 @@ class RdapJsonFormatterTest {
|
|||
.isEqualTo(loadJson("rdapjson_techcontact.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testRolelessContact() {
|
||||
assertThat(
|
||||
rdapJsonFormatter
|
||||
|
@ -458,7 +460,7 @@ class RdapJsonFormatterTest {
|
|||
.isEqualTo(loadJson("rdapjson_rolelesscontact.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testUnlinkedContact() {
|
||||
assertThat(
|
||||
rdapJsonFormatter
|
||||
|
@ -468,26 +470,26 @@ class RdapJsonFormatterTest {
|
|||
.isEqualTo(loadJson("rdapjson_unlinkedcontact.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testDomain_full() {
|
||||
assertThat(rdapJsonFormatter.createRdapDomain(domainBaseFull, OutputDataType.FULL).toJson())
|
||||
.isEqualTo(loadJson("rdapjson_domain_full.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testDomain_summary() {
|
||||
assertThat(rdapJsonFormatter.createRdapDomain(domainBaseFull, OutputDataType.SUMMARY).toJson())
|
||||
.isEqualTo(loadJson("rdapjson_domain_summary.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testDomain_logged_out() {
|
||||
rdapJsonFormatter.rdapAuthorization = RdapAuthorization.PUBLIC_AUTHORIZATION;
|
||||
assertThat(rdapJsonFormatter.createRdapDomain(domainBaseFull, OutputDataType.FULL).toJson())
|
||||
.isEqualTo(loadJson("rdapjson_domain_logged_out.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testDomain_noNameserversNoTransfersMultipleRoleContact() {
|
||||
assertThat(
|
||||
rdapJsonFormatter
|
||||
|
@ -496,7 +498,7 @@ class RdapJsonFormatterTest {
|
|||
.isEqualTo(loadJson("rdapjson_domain_no_nameservers.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testError() {
|
||||
assertThat(
|
||||
RdapObjectClasses.ErrorResponse.create(
|
||||
|
@ -505,7 +507,7 @@ class RdapJsonFormatterTest {
|
|||
.isEqualTo(loadJson("rdapjson_error.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testTopLevel() {
|
||||
assertThat(
|
||||
TopLevelReplyObject.create(
|
||||
|
@ -517,7 +519,7 @@ class RdapJsonFormatterTest {
|
|||
.isEqualTo(loadJson("rdapjson_toplevel.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testTopLevel_domain() {
|
||||
assertThat(
|
||||
TopLevelReplyObject.create(
|
||||
|
|
|
@ -35,13 +35,15 @@ import google.registry.model.registrar.RegistrarAddress;
|
|||
import google.registry.model.registry.Registry;
|
||||
import google.registry.model.registry.Registry.TldType;
|
||||
import google.registry.testing.AppEngineExtension;
|
||||
import google.registry.testing.DualDatabaseTest;
|
||||
import google.registry.testing.TestOfyAndSql;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
|
||||
/** Unit tests for {@link UpdateRegistrarRdapBaseUrlsAction}. */
|
||||
@DualDatabaseTest
|
||||
public final class UpdateRegistrarRdapBaseUrlsActionTest {
|
||||
|
||||
/**
|
||||
|
@ -160,7 +162,7 @@ public final class UpdateRegistrarRdapBaseUrlsActionTest {
|
|||
.build());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testUnknownIana_cleared() {
|
||||
// The IANA ID isn't in the JSON_LIST_REPLY
|
||||
persistRegistrar("someRegistrar", 4123L, Registrar.Type.REAL, "http://rdap.example/blah");
|
||||
|
@ -172,7 +174,7 @@ public final class UpdateRegistrarRdapBaseUrlsActionTest {
|
|||
assertThat(loadRegistrar("someRegistrar").getRdapBaseUrls()).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testKnownIana_changed() {
|
||||
// The IANA ID is in the JSON_LIST_REPLY
|
||||
persistRegistrar("someRegistrar", 1448L, Registrar.Type.REAL, "http://rdap.example/blah");
|
||||
|
@ -185,7 +187,7 @@ public final class UpdateRegistrarRdapBaseUrlsActionTest {
|
|||
.containsExactly("https://rdap.blacknight.com");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testKnownIana_notReal_noChange() {
|
||||
// The IANA ID is in the JSON_LIST_REPLY
|
||||
persistRegistrar("someRegistrar", 9999L, Registrar.Type.INTERNAL, "http://rdap.example/blah");
|
||||
|
@ -198,7 +200,7 @@ public final class UpdateRegistrarRdapBaseUrlsActionTest {
|
|||
.containsExactly("http://rdap.example/blah");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testKnownIana_notReal_nullIANA_noChange() {
|
||||
persistRegistrar("someRegistrar", null, Registrar.Type.TEST, "http://rdap.example/blah");
|
||||
|
||||
|
@ -210,7 +212,7 @@ public final class UpdateRegistrarRdapBaseUrlsActionTest {
|
|||
.containsExactly("http://rdap.example/blah");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testKnownIana_multipleValues() {
|
||||
// The IANA ID is in the JSON_LIST_REPLY
|
||||
persistRegistrar("registrar4000", 4000L, Registrar.Type.REAL, "http://rdap.example/blah");
|
||||
|
@ -227,7 +229,7 @@ public final class UpdateRegistrarRdapBaseUrlsActionTest {
|
|||
.containsExactly("https://rdap.example.com");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testNoTlds() {
|
||||
deleteTld("tld");
|
||||
assertThat(assertThrows(IllegalArgumentException.class, action::run))
|
||||
|
@ -235,7 +237,7 @@ public final class UpdateRegistrarRdapBaseUrlsActionTest {
|
|||
.isEqualTo("There must exist at least one REAL TLD.");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testOnlyTestTlds() {
|
||||
persistResource(Registry.get("tld").asBuilder().setTldType(TldType.TEST).build());
|
||||
assertThat(assertThrows(IllegalArgumentException.class, action::run))
|
||||
|
@ -243,7 +245,7 @@ public final class UpdateRegistrarRdapBaseUrlsActionTest {
|
|||
.isEqualTo("There must exist at least one REAL TLD.");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testSecondTldSucceeds() {
|
||||
createTld("secondtld");
|
||||
httpTransport = new TestHttpTransport();
|
||||
|
@ -261,7 +263,7 @@ public final class UpdateRegistrarRdapBaseUrlsActionTest {
|
|||
action.run();
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testBothFail() {
|
||||
createTld("secondtld");
|
||||
httpTransport = new TestHttpTransport();
|
||||
|
@ -281,7 +283,7 @@ public final class UpdateRegistrarRdapBaseUrlsActionTest {
|
|||
.isEqualTo("Error contacting MosAPI server. Tried TLDs [secondtld, tld]");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestOfyAndSql
|
||||
void testFailureCause_ignoresLoginFailure() {
|
||||
// Login failures aren't particularly interesting so we should log them, but the final
|
||||
// throwable should be some other failure if one existed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue