Skip to content

Commit 869ec00

Browse files
committed
Linux tests
1 parent ad02945 commit 869ec00

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
@@ -111,19 +111,19 @@ class HTTPClientNIOTSTests: XCTestCase {
111111
}
112112
#endif
113113
}
114-
114+
115115
func testTrustRootCertificateLoadFail() {
116116
guard isTestingNIOTS() else { return }
117117
#if canImport(Network)
118-
let tlsConfig = TLSConfiguration.forClient(trustRoots: .file("not/a/certificate"))
119-
XCTAssertThrowsError(try tlsConfig.getNWProtocolTLSOptions()) { error in
120-
switch error {
121-
case let error as NIOSSL.NIOSSLError where error == .failedToLoadCertificate:
122-
break
123-
default:
124-
XCTFail("\(error)")
118+
let tlsConfig = TLSConfiguration.forClient(trustRoots: .file("not/a/certificate"))
119+
XCTAssertThrowsError(try tlsConfig.getNWProtocolTLSOptions()) { error in
120+
switch error {
121+
case let error as NIOSSL.NIOSSLError where error == .failedToLoadCertificate:
122+
break
123+
default:
124+
XCTFail("\(error)")
125+
}
125126
}
126-
}
127127
#endif
128128
}
129129
}

0 commit comments

Comments
 (0)