add detailed API tests checking how calls to PGPAgent propagate to the underlying interface

this is refactoring support, so that we can notice changes in how the
underlying APIs are called, and make changes intentionally when needed,
instead of accidentally.
This commit is contained in:
Lysann Tranvouez 2026-03-11 11:36:36 +01:00
parent 76db529764
commit d136175d93
4 changed files with 760 additions and 0 deletions

View file

@ -17,6 +17,11 @@ public class PGPAgent {
self.keyStore = keyStore
}
init(keyStore: KeyStore, pgpInterface: PGPInterface) {
self.keyStore = keyStore
self.pgpInterface = pgpInterface
}
public func initKeys() throws {
guard let publicKey: String = keyStore.get(for: PGPKey.PUBLIC.getKeychainKey()),
let privateKey: String = keyStore.get(for: PGPKey.PRIVATE.getKeychainKey()) else {