mirror of
https://github.com/google/nomulus.git
synced 2025-07-22 10:46:10 +02:00
Refactor RdeKeyringModule into FakeKeyringModule
A fake Keyring implementation is needed to test Keyring related tools now, so I've refactored the fake RdeKeyring to support all Keyring API methods and moved it to the common testing package. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=149977968
This commit is contained in:
parent
2353bcd8c5
commit
5779cc988b
15 changed files with 281 additions and 47 deletions
|
@ -51,6 +51,7 @@ import google.registry.testing.AppEngineRule;
|
|||
import google.registry.testing.BouncyCastleProviderRule;
|
||||
import google.registry.testing.ExceptionRule;
|
||||
import google.registry.testing.FakeClock;
|
||||
import google.registry.testing.FakeKeyringModule;
|
||||
import google.registry.testing.FakeResponse;
|
||||
import google.registry.testing.FakeSleeper;
|
||||
import google.registry.util.Retrier;
|
||||
|
@ -113,14 +114,14 @@ public class RdeReportActionTest {
|
|||
action.interval = standardDays(1);
|
||||
action.reporter = reporter;
|
||||
action.timeout = standardSeconds(30);
|
||||
action.stagingDecryptionKey = new RdeKeyringModule().get().getRdeStagingDecryptionKey();
|
||||
action.stagingDecryptionKey = new FakeKeyringModule().get().getRdeStagingDecryptionKey();
|
||||
action.runner = runner;
|
||||
return action;
|
||||
}
|
||||
|
||||
@Before
|
||||
public void before() throws Exception {
|
||||
PGPPublicKey encryptKey = new RdeKeyringModule().get().getRdeStagingEncryptionKey();
|
||||
PGPPublicKey encryptKey = new FakeKeyringModule().get().getRdeStagingEncryptionKey();
|
||||
createTld("test");
|
||||
persistResource(
|
||||
Cursor.create(CursorType.RDE_REPORT, DateTime.parse("2006-06-06TZ"), Registry.get("test")));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue