Skip to content

Commit 7a6826b

Browse files
committed
Linux tests
1 parent 93d1a4f commit 7a6826b

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

Diff for: Tests/AsyncHTTPClientTests/HTTPClientNIOTSTests+XCTest.swift

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ extension HTTPClientNIOTSTests {
2929
("testTLSFailError", testTLSFailError),
3030
("testConnectionFailError", testConnectionFailError),
3131
("testTLSVersionError", testTLSVersionError),
32+
("testTrustRootCertificateLoadFail", testTrustRootCertificateLoadFail),
3233
]
3334
}
3435
}

Diff for: Tests/AsyncHTTPClientTests/HTTPClientNIOTSTests.swift

+9-9
Original file line numberDiff line numberDiff line change
@@ -108,19 +108,19 @@ class HTTPClientNIOTSTests: XCTestCase {
108108
}
109109
#endif
110110
}
111-
111+
112112
func testTrustRootCertificateLoadFail() {
113113
guard isTestingNIOTS() else { return }
114114
#if canImport(Network)
115-
let tlsConfig = TLSConfiguration.forClient(trustRoots: .file("not/a/certificate"))
116-
XCTAssertThrowsError(try tlsConfig.getNWProtocolTLSOptions()) { error in
117-
switch error {
118-
case let error as NIOSSL.NIOSSLError where error == .failedToLoadCertificate:
119-
break
120-
default:
121-
XCTFail("\(error)")
115+
let tlsConfig = TLSConfiguration.forClient(trustRoots: .file("not/a/certificate"))
116+
XCTAssertThrowsError(try tlsConfig.getNWProtocolTLSOptions()) { error in
117+
switch error {
118+
case let error as NIOSSL.NIOSSLError where error == .failedToLoadCertificate:
119+
break
120+
default:
121+
XCTFail("\(error)")
122+
}
122123
}
123-
}
124124
#endif
125125
}
126126
}

0 commit comments

Comments
 (0)