Skip to content

Commit

Permalink
:Fix :HTTPS :tests in :Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jaguililla committed Aug 12, 2024
1 parent 4919f59 commit 1c7f951
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import kotlin.test.assertEquals
internal class KeyStoresTest {

@Test
@DisabledOnOs(WINDOWS) // TODO Fails in windows because Algorithm HmacPBESHA256 not available
// @DisabledOnOs(WINDOWS) // TODO Fails in windows because Algorithm HmacPBESHA256 not available
fun `Key stores are loaded correctly`() {
val n = "hexagontk"
val f = "$n.p12"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import com.hexagonkt.http.test.BaseTest
import com.hexagonkt.serialization.SerializationFormat
import com.hexagonkt.serialization.SerializationManager
import org.junit.jupiter.api.*
import org.junit.jupiter.api.condition.DisabledIf
import java.net.URL

import kotlin.test.assertEquals
Expand Down Expand Up @@ -66,7 +67,9 @@ abstract class ClientHttpsTest(
}
}

@Test fun `Request HTTPS example`() {
@Test
@DisabledIf("nativeMac")
fun `Request HTTPS example`() {

val serverAdapter = serverAdapter()

Expand Down Expand Up @@ -123,4 +126,9 @@ abstract class ClientHttpsTest(

private fun serverBase(server: HttpServer): URL =
urlOf("${server.binding.protocol}://localhost:${server.runtimePort}")

@Suppress("MemberVisibilityCanBePrivate") // Public access required by JUnit
fun nativeMac(): Boolean =
System.getProperty("os.name").lowercase().contains("mac")
&& System.getProperty("org.graalvm.nativeimage.imagecode") != null
}
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,13 @@ abstract class WebSocketsTest(
}

@Test
@DisabledOnOs(WINDOWS) // TODO There are problems with certificates in Windows
// @DisabledOnOs(WINDOWS) // TODO There are problems with certificates in Windows
fun `Serve WSS works properly`() {
wsTest(http2ServerSettings.copy(protocol = HTTPS), clientSettings)
}

@Test
@DisabledOnOs(WINDOWS) // TODO There are problems with certificates in Windows
// @DisabledOnOs(WINDOWS) // TODO There are problems with certificates in Windows
fun `Serve WSS over HTTP2 works properly`() {
wsTest(http2ServerSettings, clientSettings)
}
Expand Down

0 comments on commit 1c7f951

Please sign in to comment.