Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
severinstampler committed Oct 10, 2023
1 parent 4800ead commit 8966076
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/jvmTest/kotlin/id/walt/oid4vc/CI_JVM_Test.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import io.ktor.client.*
import io.ktor.client.call.*
import io.ktor.client.engine.java.*
import io.ktor.client.plugins.contentnegotiation.*
import io.ktor.client.plugins.logging.*
import io.ktor.client.request.*
import io.ktor.client.request.forms.*
import io.ktor.client.statement.*
Expand Down Expand Up @@ -89,6 +90,10 @@ class CI_JVM_Test : AnnotationSpec() {
install(ContentNegotiation) {
json()
}
install(Logging) {
logger = Logger.SIMPLE
level = LogLevel.ALL
}
followRedirects = false
}

Expand Down Expand Up @@ -295,7 +300,7 @@ class CI_JVM_Test : AnnotationSpec() {
}
println("authResp: $authResp")
authResp.status shouldBe HttpStatusCode.Found
authResp.headers.names() shouldContain HttpHeaders.Location
authResp.headers.names() shouldContain HttpHeaders.Location.lowercase()
val location = Url(authResp.headers[HttpHeaders.Location]!!)
println("location: $location")
location.toString() shouldStartWith credentialWallet.config.redirectUri!!
Expand Down Expand Up @@ -698,7 +703,7 @@ class CI_JVM_Test : AnnotationSpec() {
println("authResp: $authResp")

authResp.status shouldBe HttpStatusCode.Found
authResp.headers.names() shouldContain HttpHeaders.Location
authResp.headers.names() shouldContain HttpHeaders.Location.lowercase()

val location = Url(authResp.headers[HttpHeaders.Location]!!)
println("location: $location")
Expand Down
2 changes: 1 addition & 1 deletion src/jvmTest/kotlin/id/walt/oid4vc/VP_JVM_Test.kt
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class VP_JVM_Test : AnnotationSpec() {
}
println("Auth resp: $authReq")
authResp.status shouldBe HttpStatusCode.Found
authResp.headers.names() shouldContain HttpHeaders.Location
authResp.headers.names() shouldContain HttpHeaders.Location.lowercase()
val redirectUrl = Url(authResp.headers[HttpHeaders.Location]!!)
val tokenResponse = TokenResponse.fromHttpParameters(redirectUrl.parameters.toMap())
tokenResponse.vpToken shouldNotBe null
Expand Down

0 comments on commit 8966076

Please sign in to comment.