mirror of
https://github.com/google/nomulus.git
synced 2025-06-29 15:53:35 +02:00
Redirect Registrar.referralUrl UI actions to url field
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=196597051
This commit is contained in:
parent
de5645abd9
commit
6cdbde107f
23 changed files with 18 additions and 59 deletions
|
@ -16,7 +16,6 @@ package google.registry.export.sheet;
|
|||
|
||||
import static com.google.common.collect.Iterables.getOnlyElement;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.config.RegistryConfig.getDefaultRegistrarReferralUrl;
|
||||
import static google.registry.config.RegistryConfig.getDefaultRegistrarWhoisServer;
|
||||
import static google.registry.model.common.Cursor.CursorType.SYNC_REGISTRAR_SHEET;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
|
@ -278,7 +277,7 @@ public class SyncRegistrarsSheetTest {
|
|||
assertThat(row).containsEntry("url", "http://www.example.org/aaa_registrar");
|
||||
assertThat(row).containsEntry("icannReferralEmail", "");
|
||||
assertThat(row).containsEntry("whoisServer", getDefaultRegistrarWhoisServer());
|
||||
assertThat(row).containsEntry("referralUrl", getDefaultRegistrarReferralUrl());
|
||||
assertThat(row).containsEntry("referralUrl", "http://www.example.org/aaa_registrar");
|
||||
assertThat(row).containsEntry("billingAccountMap", "{JPY=JPY7890, USD=USD1234}");
|
||||
|
||||
row = rows.get(1);
|
||||
|
@ -311,7 +310,7 @@ public class SyncRegistrarsSheetTest {
|
|||
assertThat(row).containsEntry("blockPremiumNames", "false");
|
||||
assertThat(row).containsEntry("ipAddressWhitelist", "");
|
||||
assertThat(row).containsEntry("url", "http://www.example.org/another_registrar");
|
||||
assertThat(row).containsEntry("referralUrl", getDefaultRegistrarReferralUrl());
|
||||
assertThat(row).containsEntry("referralUrl", "http://www.example.org/another_registrar");
|
||||
assertThat(row).containsEntry("icannReferralEmail", "jim@example.net");
|
||||
assertThat(row).containsEntry("billingAccountMap", "{}");
|
||||
|
||||
|
@ -355,7 +354,7 @@ public class SyncRegistrarsSheetTest {
|
|||
assertThat(row).containsEntry("blockPremiumNames", "false");
|
||||
assertThat(row).containsEntry("ipAddressWhitelist", "");
|
||||
assertThat(row).containsEntry("url", "");
|
||||
assertThat(row).containsEntry("referralUrl", getDefaultRegistrarReferralUrl());
|
||||
assertThat(row).containsEntry("referralUrl", "");
|
||||
assertThat(row).containsEntry("icannReferralEmail", "");
|
||||
assertThat(row).containsEntry("billingAccountMap", "{}");
|
||||
}
|
||||
|
|
|
@ -88,7 +88,6 @@ public class RegistrarTest extends EntityTestCase {
|
|||
.setFaxNumber("+1.2125551213")
|
||||
.setEmailAddress("contact-us@example.com")
|
||||
.setUrl("http://www.example.com")
|
||||
.setReferralUrl("http://www.example.com")
|
||||
.setIcannReferralEmail("foo@example.com")
|
||||
.setDriveFolderId("drive folder id")
|
||||
.setIanaIdentifier(8L)
|
||||
|
|
|
@ -608,7 +608,6 @@ class google.registry.model.registrar.Registrar {
|
|||
java.lang.String passwordHash;
|
||||
java.lang.String phoneNumber;
|
||||
java.lang.String phonePasscode;
|
||||
java.lang.String referralUrl;
|
||||
java.lang.String registrarName;
|
||||
java.lang.String salt;
|
||||
java.lang.String url;
|
||||
|
|
|
@ -70,6 +70,7 @@ public class RdeMarshallerTest extends ShardableTestCase {
|
|||
+ " </rdeRegistrar:postalInfo>\n"
|
||||
+ " <rdeRegistrar:voice>+1.2223334444</rdeRegistrar:voice>\n"
|
||||
+ " <rdeRegistrar:email>new.registrar@example.com</rdeRegistrar:email>\n"
|
||||
+ " <rdeRegistrar:url>http://my.fake.url</rdeRegistrar:url>\n"
|
||||
+ " <rdeRegistrar:whoisInfo>\n"
|
||||
+ " <rdeRegistrar:name>whois.nic.fakewhois.example</rdeRegistrar:name>\n"
|
||||
+ " </rdeRegistrar:whoisInfo>\n"
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
</rdeRegistrar:postalInfo>
|
||||
<rdeRegistrar:voice>+1.3334445555</rdeRegistrar:voice>
|
||||
<rdeRegistrar:email>new.registrar@example.com</rdeRegistrar:email>
|
||||
<rdeRegistrar:url>http://my.fake.url</rdeRegistrar:url>
|
||||
<rdeRegistrar:whoisInfo>
|
||||
<rdeRegistrar:name>whois.nic.fakewhois.example</rdeRegistrar:name>
|
||||
</rdeRegistrar:whoisInfo>
|
||||
|
@ -94,6 +95,7 @@
|
|||
</rdeRegistrar:postalInfo>
|
||||
<rdeRegistrar:voice>+1.2223334444</rdeRegistrar:voice>
|
||||
<rdeRegistrar:email>new.registrar@example.com</rdeRegistrar:email>
|
||||
<rdeRegistrar:url>http://my.fake.url</rdeRegistrar:url>
|
||||
<rdeRegistrar:whoisInfo>
|
||||
<rdeRegistrar:name>whois.nic.fakewhois.example</rdeRegistrar:name>
|
||||
</rdeRegistrar:whoisInfo>
|
||||
|
|
|
@ -165,6 +165,7 @@ public final class AppEngineRule extends ExternalResource {
|
|||
.setState(State.ACTIVE)
|
||||
.setEmailAddress("new.registrar@example.com")
|
||||
.setIcannReferralEmail("lol@sloth.test")
|
||||
.setUrl("http://my.fake.url")
|
||||
.setInternationalizedAddress(new RegistrarAddress.Builder()
|
||||
.setStreet(ImmutableList.of("123 Example Boulevard"))
|
||||
.setCity("Williamsburg")
|
||||
|
|
|
@ -80,7 +80,6 @@ public final class FullFieldsTestEntityHelper {
|
|||
.setFaxNumber("+1.2125551213")
|
||||
.setEmailAddress("contact-us@example.com")
|
||||
.setWhoisServer("whois.example.com")
|
||||
.setReferralUrl("http://www.example.com")
|
||||
.setUrl("http://my.fake.url")
|
||||
.build();
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ function createTestRegistrar() {
|
|||
ianaIdentifier: 1,
|
||||
icannReferralEmail: 'lol@sloth.test',
|
||||
whoisServer: 'foo.bar.baz',
|
||||
referralUrl: 'blah.blar',
|
||||
url: 'blah.blar',
|
||||
phoneNumber: '+1.2125650000',
|
||||
faxNumber: '+1.2125650001',
|
||||
localizedAddress: {
|
||||
|
|
|
@ -214,12 +214,6 @@ public class RegistrarSettingsActionTest extends RegistrarSettingsActionTestCase
|
|||
doTestUpdate(Registrar::getWhoisServer, "new-whois.example", Registrar.Builder::setWhoisServer);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdate_referralUrl() throws Exception {
|
||||
doTestUpdate(
|
||||
Registrar::getReferralUrl, "new-reference-url.example", Registrar.Builder::setReferralUrl);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdate_phoneNumber() throws Exception {
|
||||
doTestUpdate(Registrar::getPhoneNumber, "+1.2345678900", Registrar.Builder::setPhoneNumber);
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
package google.registry.ui.server.registrar;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.config.RegistryConfig.getDefaultRegistrarReferralUrl;
|
||||
import static google.registry.config.RegistryConfig.getDefaultRegistrarWhoisServer;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT2;
|
||||
|
@ -53,12 +52,11 @@ public class SecuritySettingsTest extends RegistrarSettingsActionTestCase {
|
|||
Map<String, Object> response = action.handleJsonRequest(ImmutableMap.of(
|
||||
"op", "update",
|
||||
"args", modified.toJsonMap()));
|
||||
// Empty whoisServer and referralUrl fields should be set to defaults by server.
|
||||
// Empty whoisServer field should be set to default by server.
|
||||
modified =
|
||||
modified
|
||||
.asBuilder()
|
||||
.setWhoisServer(getDefaultRegistrarWhoisServer())
|
||||
.setReferralUrl(getDefaultRegistrarReferralUrl())
|
||||
.build();
|
||||
assertThat(response).containsEntry("status", "SUCCESS");
|
||||
assertThat(response).containsEntry("results", asList(modified.toJsonMap()));
|
||||
|
|
|
@ -44,7 +44,7 @@ public class WhoisSettingsTest extends RegistrarSettingsActionTestCase {
|
|||
.setEmailAddress("hello.kitty@example.com")
|
||||
.setPhoneNumber("+1.2125650000")
|
||||
.setFaxNumber("+1.2125650001")
|
||||
.setReferralUrl("http://acme.com/")
|
||||
.setUrl("http://acme.com/")
|
||||
.setWhoisServer("ns1.foo.bar")
|
||||
.setLocalizedAddress(
|
||||
new RegistrarAddress.Builder()
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
"url": null,
|
||||
"icannReferralEmail": "asdf@asdf.com",
|
||||
"phonePasscode": null,
|
||||
"referralUrl": "",
|
||||
"url": "http://my.new.url",
|
||||
"blockPremiumNames": false,
|
||||
"lastCertificateUpdateTime": null,
|
||||
"e": false
|
||||
|
|
|
@ -7,6 +7,7 @@ localizedAddress.city: Williamsburg -> New York
|
|||
localizedAddress.zip: 11211 -> 10011
|
||||
phoneNumber: +1.2223334444 -> +1.2223335555
|
||||
emailAddress: new.registrar@example.com -> thase@the.registrar
|
||||
url: http://my.fake.url -> http://my.new.url
|
||||
contacts:
|
||||
ADDED:
|
||||
{parent=Key<?>(EntityGroupRoot("cross-tld")/Registrar("TheRegistrar")), name=Extra Terrestrial, emailAddress=etphonehome@example.com, phoneNumber=null, faxNumber=null, types=[ADMIN, BILLING, TECH, WHOIS], gaeUserId=null, visibleInWhoisAsAdmin=true, visibleInWhoisAsTech=false, visibleInDomainWhoisAsAbuse=false}
|
||||
|
|
|
@ -62,7 +62,6 @@ public class RegistrarWhoisResponseTest {
|
|||
.setFaxNumber("+1.3105551213")
|
||||
.setEmailAddress("registrar@example.tld")
|
||||
.setWhoisServer("whois.example-registrar.tld")
|
||||
.setReferralUrl("http://www.example-registrar.tld")
|
||||
.setUrl("http://my.fake.url")
|
||||
.build();
|
||||
// Use the registrar key for contacts' parent.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue