Add ignore .gpg-id switch default ON

This commit is contained in:
Mingshen Sun 2021-01-07 21:58:38 -08:00
parent 6280b1522b
commit a62792bd11
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
9 changed files with 91 additions and 13 deletions

View file

@ -16,6 +16,7 @@ class PasswordStoreTest: XCTestCase {
func testCloneAndDecryptMultiKeys() throws {
let url = URL(fileURLWithPath: "\(Globals.repositoryPath)-test")
Defaults.isIgnoreGPGIDOn = false
let passwordStore = PasswordStore(url: url)
try passwordStore.cloneRepository(remoteRepoURL: remoteRepoURL, branchName: "master")
expectation(for: NSPredicate { _, _ in FileManager.default.fileExists(atPath: url.path) }, evaluatedWith: nil)
@ -46,6 +47,7 @@ class PasswordStoreTest: XCTestCase {
XCTAssertEqual(testPasswordPlain.plainText, "testpassword")
passwordStore.erase()
Defaults.isIgnoreGPGIDOn = true
}
private func decrypt(passwordStore: PasswordStore, path: String, passphrase _: String) throws -> Password {