29 lines
554 B
Swift
29 lines
554 B
Swift
import NIOSSL
|
|||
|
|
import Testing
|
||
|
|
|
||
|
|
@testable import Persistence
|
||
|
|
|
||
|
|
@Suite("TLS enumeration")
|
||
|
|
struct TLSTests {
|
||
|
|
|
||
|
|
// MARK: Properties tests
|
||
|
|
|
||
|
|
@Test
|
||
|
|
func `off has no TLS configuration`() {
|
||
|
|
#expect(TLS.off.tlsConfiguration == nil)
|
||
|
|
}
|
||
|
|
|
||
|
|
@Test(arguments: [
|
||
|
|
TLS.prefer,
|
||
|
|
TLS.require
|
||
|
|
])
|
||
|
|
func `maps to the default client configuration`(
|
||
|
|
for tls: TLS
|
||
|
|
) throws {
|
||
|
|
let configuration = try #require(tls.tlsConfiguration)
|
||
|
|
|
||
|
|
#expect(configuration.bestEffortEquals(.makeClientConfiguration()))
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|