Save the RDAP request time globally instead of passing it around

Also removed the rdapWhoisServer value, as it's just null and will likely stay that way (it isn't mentioned in the RDAP response profile)

If it'll ever become required, we can add it back.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=247643981
This commit is contained in:
guyben 2019-05-10 11:17:35 -07:00 committed by jianglai
parent b10f880b7f
commit a0040c5eda
15 changed files with 197 additions and 320 deletions

View file

@ -25,6 +25,7 @@ import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import google.registry.util.Clock;
public class RdapTestHelper {
@ -142,10 +143,11 @@ public class RdapTestHelper {
"type", "text/html")))));
}
static RdapJsonFormatter getTestRdapJsonFormatter() {
static RdapJsonFormatter getTestRdapJsonFormatter(Clock clock) {
RdapJsonFormatter rdapJsonFormatter = new RdapJsonFormatter();
rdapJsonFormatter.rdapAuthorization = RdapAuthorization.PUBLIC_AUTHORIZATION;
rdapJsonFormatter.fullServletPath = "https://example.tld/rdap/";
rdapJsonFormatter.clock = clock;
rdapJsonFormatter.rdapTos =
ImmutableList.of(
"By querying our Domain Database, you are agreeing to comply with these"