mirror of
https://github.com/google/nomulus
synced 2026-01-09 07:33:42 +00:00
Add term to contact index
RDAP searches for contacts with a specific desired registrar need an additional index term. The tests were not extensive enough to catch this particular case. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=172013843
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<datastore-index kind="ContactResource" ancestor="false" source="manual">
|
||||
<property name="currentSponsorClientId" direction="asc"/>
|
||||
<property name="deletionTime" direction="asc"/>
|
||||
<property name="searchName" direction="asc"/>
|
||||
</datastore-index>
|
||||
<!-- For finding domain resources by registrar. -->
|
||||
<datastore-index kind="DomainBase" ancestor="false" source="manual">
|
||||
|
||||
@@ -439,6 +439,20 @@ public class RdapEntitySearchActionTest {
|
||||
runSuccessfulNameTestWithBlinky("Blinky*", "rdap_contact.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNameMatchContact_found_wildcardSpecifyingSameRegistrar() throws Exception {
|
||||
login("2-RegistrarTest");
|
||||
action.registrarParam = Optional.of("2-RegistrarTest");
|
||||
runSuccessfulNameTestWithBlinky("Blinky*", "rdap_contact.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNameMatchContact_notFound_wildcardSpecifyingOtherRegistrar() throws Exception {
|
||||
login("2-RegistrarTest");
|
||||
action.registrarParam = Optional.of("2-RegistrarInact");
|
||||
runNotFoundNameTest("Blinky*");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNameMatchContact_found_wildcardBoth() throws Exception {
|
||||
login("2-RegistrarTest");
|
||||
@@ -656,6 +670,21 @@ public class RdapEntitySearchActionTest {
|
||||
runSuccessfulHandleTestWithBlinky("2-RO*", "rdap_contact.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHandleMatchContact_found_wildcardSpecifyingSameRegistrar() throws Exception {
|
||||
action.registrarParam = Optional.of("2-RegistrarTest");
|
||||
login("2-RegistrarTest");
|
||||
runSuccessfulHandleTestWithBlinky("2-RO*", "rdap_contact.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHandleMatchContact_notFound_wildcardSpecifyingDifferentRegistrar()
|
||||
throws Exception {
|
||||
action.registrarParam = Optional.of("2-Registrar");
|
||||
login("2-RegistrarTest");
|
||||
runNotFoundHandleTest("2-RO*");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHandleMatchContact_notFound_wildcard() throws Exception {
|
||||
runNotFoundHandleTest("20*");
|
||||
|
||||
Reference in New Issue
Block a user