File tree 2 files changed +4
-2
lines changed
Tests/AsyncHTTPClientTests
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,8 @@ class HTTPClientNIOTSTests: XCTestCase {
63
63
_ = try httpClient. get ( url: " https://localhost: \( httpBin. port) /get " ) . wait ( )
64
64
XCTFail ( " This should have failed " )
65
65
} catch let error as HTTPClient . NWTLSError {
66
- XCTAssertEqual ( error. status, errSSLHandshakeFail)
66
+ XCTAssert ( error. status == errSSLHandshakeFail || error. status == errSSLBadCert,
67
+ " unexpected NWTLSError with status \( error. status) " )
67
68
} catch {
68
69
XCTFail ( " Error should have been NWTLSError not \( type ( of: error) ) " )
69
70
}
Original file line number Diff line number Diff line change @@ -901,7 +901,8 @@ class HTTPClientTests: XCTestCase {
901
901
XCTFail ( " Unexpected error: \( error) " )
902
902
continue
903
903
}
904
- XCTAssertEqual ( clientError. status, errSSLHandshakeFail)
904
+ XCTAssert ( clientError. status == errSSLHandshakeFail || clientError. status == errSSLBadCert,
905
+ " unexpected NWTLSError with status \( clientError. status) " )
905
906
#endif
906
907
} else {
907
908
guard let clientError = error as? NIOSSLError , case NIOSSLError . handshakeFailed = clientError else {
You can’t perform that action at this time.
0 commit comments