mirror of
https://github.com/google/nomulus
synced 2026-09-10 10:06:25 +00:00
Order RDAP domain searches by TLD in domain name order
I am not happy that another index is required, but the Pantheon console shows that domain indexes are much smaller than the other indexes (because there are fewer domains), so it's not adding an appreciable amount of storage space. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=173561771
This commit is contained in:
@@ -855,7 +855,7 @@ public class RdapDomainSearchActionTest {
|
||||
@Test
|
||||
public void testDomainMatch_star_lol_found() throws Exception {
|
||||
assertThat(generateActualJson(RequestType.NAME, "*.lol"))
|
||||
.isEqualTo(generateExpectedJsonForTwoDomains("cat2.lol", "17-LOL", "cat.lol", "C-LOL"));
|
||||
.isEqualTo(generateExpectedJsonForTwoDomains("cat.lol", "C-LOL", "cat2.lol", "17-LOL"));
|
||||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
}
|
||||
|
||||
@@ -863,7 +863,7 @@ public class RdapDomainSearchActionTest {
|
||||
public void testDomainMatch_star_lol_found_sameRegistrarRequested() throws Exception {
|
||||
action.registrarParam = Optional.of("evilregistrar");
|
||||
assertThat(generateActualJson(RequestType.NAME, "*.lol"))
|
||||
.isEqualTo(generateExpectedJsonForTwoDomains("cat2.lol", "17-LOL", "cat.lol", "C-LOL"));
|
||||
.isEqualTo(generateExpectedJsonForTwoDomains("cat.lol", "C-LOL", "cat2.lol", "17-LOL"));
|
||||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
}
|
||||
|
||||
@@ -1056,6 +1056,22 @@ public class RdapDomainSearchActionTest {
|
||||
"rdap_domains_four_truncated.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDomainMatch_tldSearchOrderedProperly() throws Exception {
|
||||
createManyDomainsAndHosts(4, 1, 2);
|
||||
assertThat(generateActualJson(RequestType.NAME, "*.lol"))
|
||||
.isEqualTo(readMultiDomainFile(
|
||||
"rdap_domains_four_truncated.json",
|
||||
"cat.lol",
|
||||
"C-LOL",
|
||||
"cat2.lol",
|
||||
"17-LOL",
|
||||
"domain1.lol",
|
||||
"46-LOL",
|
||||
"domain2.lol",
|
||||
"45-LOL"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDomainMatch_reallyTruncatedResultsSet() throws Exception {
|
||||
// Don't use 10 or more domains for this test, because domain10.lol will come before
|
||||
|
||||
Reference in New Issue
Block a user