-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:OperatorFoundation/KeychainCli
Showing
2 changed files
with
22 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
import XCTest | ||
@testable import Keychain | ||
//@testable import Keychain | ||
|
||
final class KeychainTests: XCTestCase | ||
{ | ||
func testSaveAndLoad() | ||
{ | ||
let url = URL(fileURLWithPath: "keychain") | ||
guard let keychain = Keychain(baseDirectory: url) else | ||
{ | ||
XCTFail() | ||
return | ||
} | ||
//final class KeychainTests: XCTestCase | ||
//{ | ||
// func testSaveAndLoad() | ||
// { | ||
// let url = URL(fileURLWithPath: "keychain") | ||
// guard let keychain = Keychain(baseDirectory: url) else | ||
// { | ||
// XCTFail() | ||
// return | ||
// } | ||
// | ||
// let key1 = keychain.generateAndSavePrivateKey(label: "test", type: KeyType.P256KeyAgreement) | ||
// let key2 = keychain.retrieveOrGeneratePrivateKey(label: "test", type: KeyType.P256KeyAgreement) | ||
|
||
let key1 = keychain.generateAndSavePrivateKey(label: "test", type: KeyType.P256KeyAgreement) | ||
let key2 = keychain.retrieveOrGeneratePrivateKey(label: "test", type: KeyType.P256KeyAgreement) | ||
// XCTAssertEqual(key1, key2) } | ||
|
||
XCTAssertEqual(key1, key2) } | ||
|
||
static var allTests = [ | ||
("testSaveAndLoad", testSaveAndLoad), | ||
] | ||
} | ||
// static var allTests = [ | ||
// ("testSaveAndLoad", testSaveAndLoad), | ||
// ] | ||
//} |