diff --git a/passKitTests/LowLevel/PGPAgentLowLevelTests.swift b/passKitTests/LowLevel/PGPAgentLowLevelTests.swift index 7ef764c..8b03310 100644 --- a/passKitTests/LowLevel/PGPAgentLowLevelTests.swift +++ b/passKitTests/LowLevel/PGPAgentLowLevelTests.swift @@ -71,7 +71,6 @@ final class PGPAgentLowLevelTests: XCTestCase { func testDecryptWithKeyID_keyNotFound_throws() { mockPGP.privateKeyIDs = [] - mockPGP.keyIDs = ["4712286271220db299883ea7062e678da1024dae", "787eae1a5fa3e749aa34cc6aa0645ebed862027e"] XCTAssertThrowsError(try agent.decrypt(encryptedData: testEncryptedData, keyID: "UNKNOWN", requestPGPKeyPassphrase: passphraseCallback("pass"))) { error in XCTAssertEqual(error as? AppError, AppError.pgpPrivateKeyNotFound(keyID: "UNKNOWN")) @@ -368,7 +367,6 @@ final class PGPAgentLowLevelTests: XCTestCase { func testDecryptWithKeyID_keyNotFound_doesNotChangeDecryptStatus() throws { let longFingerprint = "4712286271220db299883ea7062e678da1024dae" mockPGP.privateKeyIDs = [] - mockPGP.keyIDs = [longFingerprint, "787eae1a5fa3e749aa34cc6aa0645ebed862027e"] // This throws pgpPrivateKeyNotFound without changing latestDecryptStatus. XCTAssertThrowsError(try agent.decrypt(encryptedData: testEncryptedData, keyID: "UNKNOWN", requestPGPKeyPassphrase: passphraseCallback("pass"))) @@ -444,7 +442,6 @@ final class PGPAgentLowLevelTests: XCTestCase { let shortID = "a1024dae" let longFingerprint = "4712286271220db299883ea7062e678da1024dae" mockPGP.privateKeyIDs = [longFingerprint] - mockPGP.keyIDs = [longFingerprint] _ = try agent.decrypt(encryptedData: testEncryptedData, keyID: shortID, requestPGPKeyPassphrase: passphraseCallback("pass")) @@ -457,7 +454,6 @@ final class PGPAgentLowLevelTests: XCTestCase { let shortID = "a1024dae" let longFingerprint = "4712286271220db299883ea7062e678da1024dae" mockPGP.privateKeyIDs = [longFingerprint] - mockPGP.keyIDs = [longFingerprint] mockPGP.selectedKeyForPassphrase = shortID // Store passphrase under the LONG fingerprint. diff --git a/passKitTests/Mocks/MockPGPInterface.swift b/passKitTests/Mocks/MockPGPInterface.swift index 6640986..b6402b9 100644 --- a/passKitTests/Mocks/MockPGPInterface.swift +++ b/passKitTests/Mocks/MockPGPInterface.swift @@ -9,8 +9,6 @@ import Foundation class MockPGPInterface: PGPInterface { // MARK: - Configuration - var keyIDs: [String] = [] - var shortKeyIDs: [String] = [] var publicKeyIDs: Set = [] var privateKeyIDs: Set = [] @@ -91,6 +89,6 @@ class MockPGPInterface: PGPInterface { return privateKeyIDs.contains { $0.hasSuffix(keyID.lowercased()) } } - var keyID: [String] { keyIDs } - var shortKeyID: [String] { shortKeyIDs } + var keyID: [String] { [] } // currently not relevant in these tests + var shortKeyID: [String] { [] } // currently not relevant in these tests }