problem: unit tests failed because of enabled jdk ssl implementation
This commit is contained in:
3
.github/workflows/test.yaml
vendored
3
.github/workflows/test.yaml
vendored
@@ -25,6 +25,9 @@ jobs:
|
||||
with:
|
||||
java-version: 13
|
||||
|
||||
- name: Install System Libs
|
||||
run: sudo apt-get install -y openssl libapr1
|
||||
|
||||
- name: Check
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
|
||||
@@ -71,12 +71,14 @@ dependencies {
|
||||
implementation "io.netty:netty-common:$nettyVersion"
|
||||
implementation "io.netty:netty-handler:$nettyVersion"
|
||||
implementation "io.netty:netty-handler-proxy:$nettyVersion"
|
||||
implementation "io.netty:netty-resolver:$nettyVersion"
|
||||
implementation "io.netty:netty-resolver-dns:$nettyVersion"
|
||||
implementation "io.netty:netty-codec:$nettyVersion"
|
||||
implementation "io.netty:netty-codec-http2:$nettyVersion"
|
||||
implementation "io.netty:netty-codec-http:$nettyVersion"
|
||||
implementation "io.netty:netty-buffer:$nettyVersion"
|
||||
implementation "io.netty:netty-tcnative:2.0.39.Final:linux-x86_64@jar"
|
||||
implementation "io.netty:netty-tcnative-boringssl-static:2.0.39.Final:linux-x86_64@jar"
|
||||
implementation "io.netty:netty-tcnative:2.0.39.Final"
|
||||
implementation "io.netty:netty-tcnative-boringssl-static:2.0.39.Final"
|
||||
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
||||
implementation "org.jetbrains.kotlin:kotlin-reflect"
|
||||
|
||||
@@ -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