mirror of
https://github.com/google/nomulus.git
synced 2025-06-12 07:24:44 +02:00
Conform to RDAP Technical Implementation Guide
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=251864499
This commit is contained in:
parent
5e4199fae6
commit
c3c3520e04
65 changed files with 869 additions and 709 deletions
|
@ -235,30 +235,6 @@ public class RdapNameserverActionTest extends RdapActionBaseTestCase<RdapNameser
|
|||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNameserver_found_sameRegistrarRequested() {
|
||||
action.registrarParam = Optional.of("TheRegistrar");
|
||||
assertThat(generateActualJson("ns1.cat.lol"))
|
||||
.isEqualTo(
|
||||
generateExpectedJsonWithTopLevelEntries(
|
||||
"ns1.cat.lol",
|
||||
ImmutableMap.of(
|
||||
"HANDLE", "2-ROID",
|
||||
"ADDRESSTYPE", "v4",
|
||||
"ADDRESS", "1.2.3.4",
|
||||
"STATUS", "active"),
|
||||
"rdap_host.json"));
|
||||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNameserver_notFound_differentRegistrarRequested() {
|
||||
action.registrarParam = Optional.of("otherregistrar");
|
||||
action.includeDeletedParam = Optional.of(false);
|
||||
generateActualJson("ns1.cat.lol");
|
||||
assertThat(response.getStatus()).isEqualTo(404);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDeletedNameserver_notFound_includeDeletedNotSpecified() {
|
||||
generateActualJson("nsdeleted.cat.lol");
|
||||
|
@ -322,33 +298,6 @@ public class RdapNameserverActionTest extends RdapActionBaseTestCase<RdapNameser
|
|||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDeletedNameserver_found_sameRegistrarRequested() {
|
||||
login("TheRegistrar");
|
||||
action.registrarParam = Optional.of("TheRegistrar");
|
||||
action.includeDeletedParam = Optional.of(true);
|
||||
assertThat(generateActualJson("nsdeleted.cat.lol"))
|
||||
.isEqualTo(
|
||||
generateExpectedJsonWithTopLevelEntries(
|
||||
"nsdeleted.cat.lol",
|
||||
ImmutableMap.of(
|
||||
"HANDLE", "A-ROID",
|
||||
"ADDRESSTYPE", "v4",
|
||||
"ADDRESS", "1.2.3.4",
|
||||
"STATUS", "inactive"),
|
||||
"rdap_host.json"));
|
||||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDeletedNameserver_notFound_differentRegistrarRequested() {
|
||||
login("TheRegistrar");
|
||||
action.registrarParam = Optional.of("otherregistrar");
|
||||
action.includeDeletedParam = Optional.of(false);
|
||||
generateActualJson("ns1.cat.lol");
|
||||
assertThat(response.getStatus()).isEqualTo(404);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMetrics() {
|
||||
generateActualJson("ns1.cat.lol");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue