mirror of
https://github.com/google/nomulus.git
synced 2025-05-20 11:19:35 +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
|
@ -20,8 +20,8 @@ import static java.nio.charset.StandardCharsets.UTF_8;
|
|||
import google.registry.keyring.api.Keyring;
|
||||
import google.registry.rde.Ghostryde;
|
||||
import google.registry.rde.Ghostryde.DecodeResult;
|
||||
import google.registry.rde.RdeKeyringModule;
|
||||
import google.registry.testing.BouncyCastleProviderRule;
|
||||
import google.registry.testing.FakeKeyringModule;
|
||||
import google.registry.testing.InjectRule;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
@ -65,7 +65,7 @@ public class GhostrydeCommandTest extends CommandTestCase<GhostrydeCommand> {
|
|||
|
||||
@Before
|
||||
public void before() throws Exception {
|
||||
keyring = new RdeKeyringModule().get();
|
||||
keyring = new FakeKeyringModule().get();
|
||||
command.ghostryde = new Ghostryde(1024);
|
||||
command.rdeStagingDecryptionKey = keyring.getRdeStagingDecryptionKey();
|
||||
command.rdeStagingEncryptionKey = keyring.getRdeStagingEncryptionKey();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue