Skip to content

Commit

Permalink
Skip PKCS12 import when interaction isnt allowed on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Apr 3, 2024
1 parent a72b613 commit 14795f2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Tests/HummingbirdCoreTests/ClientTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,14 @@ final class ClientTests: XCTestCase {
func testTransportServicesTLSClient() async throws {
let p12Path = Bundle.module.path(forResource: "client", ofType: "p12")!
let derPath = Bundle.module.path(forResource: "ca", ofType: "der")!
let identity: TSTLSOptions.Identity
do {
identity = try .p12(filename: p12Path, password: "HBTests")
} catch let error as TSTLSOptions.Error where error == .interactionNotAllowed {
throw XCTSkip("Unable to import PKCS12 bundle: no interaction allowed")
}
let tlsOptions = try XCTUnwrap(TSTLSOptions.options(
clientIdentity: .p12(filename: p12Path, password: "HBTests"),
clientIdentity: identity,
trustRoots: .der(filename: derPath),
serverName: testServerName
))
Expand Down

0 comments on commit 14795f2

Please sign in to comment.