mirror of
https://github.com/google/nomulus
synced 2026-09-20 06:54:43 +00:00
Add ability to manually trigger contact group syncs
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=117549773
This commit is contained in:
@@ -17,6 +17,7 @@ package com.google.domain.registry.tools;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static com.google.common.base.Strings.isNullOrEmpty;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.domain.registry.model.registrar.Registrar.loadByClientId;
|
||||
import static com.google.domain.registry.testing.CertificateSamples.SAMPLE_CERT;
|
||||
import static com.google.domain.registry.testing.CertificateSamples.SAMPLE_CERT_HASH;
|
||||
import static com.google.domain.registry.testing.DatastoreHelper.createTlds;
|
||||
@@ -416,6 +417,15 @@ public class UpdateRegistrarCommandTest extends CommandTestCase<UpdateRegistrarC
|
||||
.isEqualTo("whois.goth.black");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_triggerGroupSyncing_works() throws Exception {
|
||||
persistResource(
|
||||
loadByClientId("NewRegistrar").asBuilder().setContactsRequireSyncing(false).build());
|
||||
assertThat(loadByClientId("NewRegistrar").getContactsRequireSyncing()).isFalse();
|
||||
runCommand("--sync_groups=true", "--force", "NewRegistrar");
|
||||
assertThat(loadByClientId("NewRegistrar").getContactsRequireSyncing()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_invalidRegistrarType() throws Exception {
|
||||
thrown.expect(ParameterException.class);
|
||||
|
||||
Reference in New Issue
Block a user