mirror of
https://github.com/google/nomulus
synced 2026-09-09 17:46:18 +00:00
Replace 'referralUrl' with 'url' in WHOIS responses
The 'referralUrl' Datastore field is filled with mostly junk data, whereas 'url' contains real registrar web addresses. This makes the long needed fix to display the proper url in WHOIS. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=194398003
This commit is contained in:
@@ -20,6 +20,7 @@ import static google.registry.model.registrar.Registrar.State.ACTIVE;
|
||||
import static google.registry.model.registrar.Registrar.Type.PDT;
|
||||
import static google.registry.model.registry.Registries.getTlds;
|
||||
import static google.registry.testing.DatastoreHelper.createTlds;
|
||||
import static google.registry.testing.DatastoreHelper.loadRegistrar;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveDomain;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.testing.DatastoreHelper.persistSimpleResources;
|
||||
@@ -304,6 +305,7 @@ public class WhoisActionTest {
|
||||
|
||||
@Test
|
||||
public void testRun_nameserverQuery_works() throws Exception {
|
||||
persistResource(loadRegistrar("TheRegistrar").asBuilder().setUrl("http://my.fake.url").build());
|
||||
persistResource(makeHostResource("ns1.cat.lol", "1.2.3.4"));
|
||||
newWhoisAction("nameserver ns1.cat.lol\r\n").run();
|
||||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
@@ -568,6 +570,7 @@ public class WhoisActionTest {
|
||||
|
||||
@Test
|
||||
public void testRun_retryOnTransientFailure() throws Exception {
|
||||
persistResource(loadRegistrar("TheRegistrar").asBuilder().setUrl("http://my.fake.url").build());
|
||||
persistResource(makeHostResource("ns1.cat.lol", "1.2.3.4"));
|
||||
WhoisAction action = newWhoisAction("ns1.cat.lol");
|
||||
WhoisResponse expectedResponse =
|
||||
|
||||
Reference in New Issue
Block a user