mirror of
https://github.com/google/nomulus.git
synced 2025-07-08 20:23:24 +02:00
Remove dual-write of registrar from tool commands (#952)
* Remove dual-write of registrar from tool commands As discussed, we're keeping registrar in the "replicated" category.
This commit is contained in:
parent
29bf0f3965
commit
1d96de98c9
5 changed files with 0 additions and 76 deletions
|
@ -17,7 +17,6 @@ package google.registry.tools;
|
|||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT3;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT3_HASH;
|
||||
|
@ -113,28 +112,6 @@ class CreateRegistrarCommandTest extends CommandTestCase<CreateRegistrarCommand>
|
|||
eq(new byte[0]));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSuccess_alsoSaveToCloudSql() throws Exception {
|
||||
runCommandForced(
|
||||
"--name=blobio",
|
||||
"--password=\"some_password\"",
|
||||
"--registrar_type=REAL",
|
||||
"--iana_id=8",
|
||||
"--passcode=01234",
|
||||
"--icann_referral_email=foo@bar.test",
|
||||
"--street=\"123 Fake St\"",
|
||||
"--city Fakington",
|
||||
"--state MA",
|
||||
"--zip 00351",
|
||||
"--cc US",
|
||||
"clientz");
|
||||
|
||||
Optional<Registrar> registrar = Registrar.loadByClientId("clientz");
|
||||
assertThat(registrar).isPresent();
|
||||
assertThat(registrar.get().verifyPassword("some_password")).isTrue();
|
||||
assertThat(jpaTm().transact(() -> jpaTm().exists(registrar.get()))).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSuccess_quotedPassword() throws Exception {
|
||||
runCommandForced(
|
||||
|
|
|
@ -16,7 +16,6 @@ package google.registry.tools;
|
|||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT3;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT3_HASH;
|
||||
|
@ -37,7 +36,6 @@ import google.registry.flows.certs.CertificateChecker.InsecureCertificateExcepti
|
|||
import google.registry.model.registrar.Registrar;
|
||||
import google.registry.model.registrar.Registrar.State;
|
||||
import google.registry.model.registrar.Registrar.Type;
|
||||
import google.registry.persistence.VKey;
|
||||
import google.registry.testing.AppEngineExtension;
|
||||
import google.registry.util.CidrAddressBlock;
|
||||
import java.util.Optional;
|
||||
|
@ -60,19 +58,6 @@ class UpdateRegistrarCommandTest extends CommandTestCase<UpdateRegistrarCommand>
|
|||
fakeClock);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSuccess_alsoUpdateInCloudSql() throws Exception {
|
||||
assertThat(loadRegistrar("NewRegistrar").verifyPassword("some_password")).isFalse();
|
||||
jpaTm().transact(() -> jpaTm().insert(loadRegistrar("NewRegistrar")));
|
||||
runCommand("--password=some_password", "--force", "NewRegistrar");
|
||||
assertThat(loadRegistrar("NewRegistrar").verifyPassword("some_password")).isTrue();
|
||||
assertThat(
|
||||
jpaTm()
|
||||
.transact(() -> jpaTm().loadByKey(VKey.createSql(Registrar.class, "NewRegistrar")))
|
||||
.verifyPassword("some_password"))
|
||||
.isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSuccess_password() throws Exception {
|
||||
assertThat(loadRegistrar("NewRegistrar").verifyPassword("some_password")).isFalse();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue