problem: unit tests failed because of enabled jdk ssl implementation
This commit is contained in:
@@ -18,6 +18,7 @@ package io.emeraldpay.dshackle
|
||||
|
||||
import io.emeraldpay.dshackle.config.AuthConfig
|
||||
import io.netty.handler.ssl.ClientAuth
|
||||
import io.netty.handler.ssl.OpenSsl
|
||||
import io.netty.handler.ssl.OpenSslServerContext
|
||||
import io.netty.handler.ssl.SslContext
|
||||
import spock.lang.Specification
|
||||
@@ -27,6 +28,13 @@ class TlsSetupSpec extends Specification {
|
||||
|
||||
TlsSetup tlsSetup = new TlsSetup(new FileResolver(new File("src/test/resources/tls-local")))
|
||||
|
||||
def setup() {
|
||||
// !!!!!!!!!!!!
|
||||
// run test on OS with OpenSSL installed
|
||||
// !!!!!!!!!!!!
|
||||
OpenSsl.ensureAvailability()
|
||||
}
|
||||
|
||||
def "TLS disabled"() {
|
||||
setup:
|
||||
def config = new AuthConfig.ServerTlsAuth(
|
||||
@@ -52,7 +60,7 @@ class TlsSetupSpec extends Specification {
|
||||
act.server
|
||||
!act.client
|
||||
with((OpenSslServerContext) act) {
|
||||
act.clientAuth == ClientAuth.NONE
|
||||
clientAuth == ClientAuth.NONE
|
||||
with((X509CertImpl) keyCertChain[0]) {
|
||||
getIssuerDN().name == "CN=ca.myhost.dev, OU=Blockchain CA, O=My Company"
|
||||
}
|
||||
@@ -75,7 +83,6 @@ class TlsSetupSpec extends Specification {
|
||||
act.server
|
||||
!act.client
|
||||
|
||||
// run test on OS with OpenSSL installed
|
||||
with((OpenSslServerContext) act) {
|
||||
clientAuth == ClientAuth.REQUIRE
|
||||
with((X509CertImpl) keyCertChain[0]) {
|
||||
|
||||
Reference in New Issue
Block a user