mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 08:57:12 +02: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:
parent
bf818a0139
commit
048ae4b4ba
2 changed files with 30 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
||||||
<datastore-index kind="ContactResource" ancestor="false" source="manual">
|
<datastore-index kind="ContactResource" ancestor="false" source="manual">
|
||||||
<property name="currentSponsorClientId" direction="asc"/>
|
<property name="currentSponsorClientId" direction="asc"/>
|
||||||
<property name="deletionTime" direction="asc"/>
|
<property name="deletionTime" direction="asc"/>
|
||||||
|
<property name="searchName" direction="asc"/>
|
||||||
</datastore-index>
|
</datastore-index>
|
||||||
<!-- For finding domain resources by registrar. -->
|
<!-- For finding domain resources by registrar. -->
|
||||||
<datastore-index kind="DomainBase" ancestor="false" source="manual">
|
<datastore-index kind="DomainBase" ancestor="false" source="manual">
|
||||||
|
|
|
@ -439,6 +439,20 @@ public class RdapEntitySearchActionTest {
|
||||||
runSuccessfulNameTestWithBlinky("Blinky*", "rdap_contact.json");
|
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
|
@Test
|
||||||
public void testNameMatchContact_found_wildcardBoth() throws Exception {
|
public void testNameMatchContact_found_wildcardBoth() throws Exception {
|
||||||
login("2-RegistrarTest");
|
login("2-RegistrarTest");
|
||||||
|
@ -656,6 +670,21 @@ public class RdapEntitySearchActionTest {
|
||||||
runSuccessfulHandleTestWithBlinky("2-RO*", "rdap_contact.json");
|
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
|
@Test
|
||||||
public void testHandleMatchContact_notFound_wildcard() throws Exception {
|
public void testHandleMatchContact_notFound_wildcard() throws Exception {
|
||||||
runNotFoundHandleTest("20*");
|
runNotFoundHandleTest("20*");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue