mirror of
https://github.com/google/nomulus.git
synced 2025-08-05 09:21:49 +02:00
Convert yet more configuration options to YAML
With a particular focus on custom logic and caching. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=146258446
This commit is contained in:
parent
1577ab2c26
commit
636da9f7f0
10 changed files with 120 additions and 52 deletions
|
@ -1,3 +1,17 @@
|
|||
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.export;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.export;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
@ -45,7 +59,7 @@ public class ExportSnapshotActionTest {
|
|||
.launchNewBackup(
|
||||
ExportSnapshotAction.QUEUE,
|
||||
"auto_snapshot_20140801_010203",
|
||||
"domain-registry-snapshots",
|
||||
"registry-project-id-snapshots",
|
||||
ExportConstants.getBackupKinds());
|
||||
assertTasksEnqueued(
|
||||
CheckSnapshotAction.QUEUE,
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
package google.registry.flows.contact;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.config.RegistryConfig.getContactAutomaticTransferLength;
|
||||
import static google.registry.testing.ContactResourceSubject.assertAboutContacts;
|
||||
import static google.registry.testing.DatastoreHelper.assertNoBillingEvents;
|
||||
import static google.registry.testing.DatastoreHelper.deleteResource;
|
||||
|
@ -22,7 +23,6 @@ import static google.registry.testing.DatastoreHelper.getPollMessages;
|
|||
import static google.registry.testing.DatastoreHelper.persistActiveContact;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
|
||||
import google.registry.config.RegistryConfig.LocalTestConfig;
|
||||
import google.registry.flows.ResourceFlowUtils.BadAuthInfoForResourceException;
|
||||
import google.registry.flows.ResourceFlowUtils.ResourceDoesNotExistException;
|
||||
import google.registry.flows.exceptions.AlreadyPendingTransferException;
|
||||
|
@ -57,7 +57,7 @@ public class ContactTransferRequestFlowTest
|
|||
private void doSuccessfulTest(String commandFilename, String expectedXmlFilename)
|
||||
throws Exception {
|
||||
setEppInput(commandFilename);
|
||||
DateTime afterTransfer = clock.nowUtc().plus(LocalTestConfig.CONTACT_AUTOMATIC_TRANSFER_LENGTH);
|
||||
DateTime afterTransfer = clock.nowUtc().plus(getContactAutomaticTransferLength());
|
||||
|
||||
// Setup done; run the test.
|
||||
assertTransactionalFlow(true);
|
||||
|
|
|
@ -20,8 +20,8 @@ import static com.google.common.base.Suppliers.memoize;
|
|||
import static com.google.common.collect.Iterables.toArray;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth.assertWithMessage;
|
||||
import static google.registry.config.RegistryConfig.LocalTestConfig.CONTACT_AUTOMATIC_TRANSFER_LENGTH;
|
||||
import static google.registry.config.RegistryConfig.getContactAndHostRoidSuffix;
|
||||
import static google.registry.config.RegistryConfig.getContactAutomaticTransferLength;
|
||||
import static google.registry.flows.ResourceFlowUtils.createTransferResponse;
|
||||
import static google.registry.model.EppResourceUtils.createDomainRepoId;
|
||||
import static google.registry.model.EppResourceUtils.createRepoId;
|
||||
|
@ -482,7 +482,7 @@ public class DatastoreHelper {
|
|||
.setCurrentSponsorClientId("TheRegistrar")
|
||||
.addStatusValue(StatusValue.PENDING_TRANSFER)
|
||||
.setTransferData(createTransferDataBuilder(requestTime, expirationTime)
|
||||
.setPendingTransferExpirationTime(now.plus(CONTACT_AUTOMATIC_TRANSFER_LENGTH))
|
||||
.setPendingTransferExpirationTime(now.plus(getContactAutomaticTransferLength()))
|
||||
.setServerApproveEntities(
|
||||
ImmutableSet.<Key<? extends TransferServerApproveEntity>>of(
|
||||
// Pretend it's 3 days since the request
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue