Skip to content

Commit

Permalink
småting
Browse files Browse the repository at this point in the history
  • Loading branch information
jankroken-nav committed Oct 18, 2024
1 parent 8aee884 commit 84861ff
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
11 changes: 5 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ val navTokenSupportVersion = "5.0.5"
val hibernateValidatorVersion = "8.0.1.Final"
val logbackEncoderVersion = "8.0"
val postgresqlVersion = "42.7.4"
val flywayCoreVersion = "10.19.0"
val flywayCoreVersion = "10.20.0"
val testcontainersVersion = "1.20.2"
val jacksonVersion = "2.17.1"
val springKafkaTestVersion = "3.2.4"
val azureAdClient = "0.0.7"
val assertjVersion = "3.26.3"
val awaitilityVersion = "4.2.2"
val wiremockVersion = "3.9.1"
val micrometerRegistryPrometheusVersion = "1.13.4"
val micrometerRegistryPrometheusVersion = "1.13.6"
val mockitoKotlinVersion = "5.4.0"
val unleashVersion = "9.2.4"
val jsonAssertVersion = "1.5.2"
Expand All @@ -26,8 +26,9 @@ val snappyJavaVersion = "1.1.10.7"
val snakeYamlVersion = "2.3"

plugins {
kotlin("jvm") version "2.0.20"
kotlin("plugin.spring") version "2.0.20"
val kotlinVersion = "2.0.21"
kotlin("jvm") version kotlinVersion
kotlin("plugin.spring") version kotlinVersion
id("org.springframework.boot") version "3.3.4"
id("com.github.ben-manes.versions") version "0.51.0"
}
Expand Down Expand Up @@ -91,8 +92,6 @@ dependencies {
testImplementation("org.assertj:assertj-core:$assertjVersion")
testImplementation("org.awaitility:awaitility:$awaitilityVersion")
testImplementation("org.wiremock:wiremock-jetty12:$wiremockVersion")
// testImplementation("org.scyscreamer:jsonassert:$jsonAssertVersion")
// testImplementation("org.skyscreamer:jsonassert:1.5.2")
testImplementation("org.skyscreamer:jsonassert:$jsonAssertVersion")
testImplementation("net.javacrumbs.json-unit:json-unit-assertj:$jsunUnitVersion")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.slf4j.LoggerFactory
import org.springframework.scheduling.annotation.Scheduled

class FrigiLaserTask(
val barnetrygdmottakerRepo: BarnetrygdmottakerRepository,
private val barnetrygdmottakerRepo: BarnetrygdmottakerRepository,
) {
companion object {
private val log: Logger = LoggerFactory.getLogger(FrigiLaserTask::class.java)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import no.nav.pensjon.opptjening.omsorgsopptjening.start.innlesning.external.hje
import no.nav.pensjon.opptjening.omsorgsopptjening.start.innlesning.external.pdl.pdl
import no.nav.pensjon.opptjening.omsorgsopptjening.start.innlesning.external.pdl.`pdl fnr fra query`
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.RegisterExtension
import org.springframework.beans.factory.annotation.Autowired
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package no.nav.pensjon.opptjening.omsorgsopptjening.start.innlesning.external.pdl

import com.github.tomakehurst.wiremock.client.WireMock
import com.github.tomakehurst.wiremock.client.WireMock.*
import com.github.tomakehurst.wiremock.client.WireMock.aResponse
import com.github.tomakehurst.wiremock.client.WireMock.or
import com.github.tomakehurst.wiremock.junit5.WireMockExtension
import com.github.tomakehurst.wiremock.stubbing.StubMapping

Expand All @@ -10,7 +11,7 @@ private fun WireMockExtension.pdlResponse(fileName: String): StubMapping {
return this.stubFor(
WireMock.post(WireMock.urlPathEqualTo("/graphql"))
.willReturn(
WireMock.aResponse()
aResponse()
.withHeader("Content-Type", "application/json")
.withStatus(202)
.withBodyFile("pdl/$fileName")
Expand All @@ -24,7 +25,7 @@ fun WireMockExtension.`pdl med ett fnr`(fnr: String): StubMapping {
return this.stubFor(
WireMock.post(WireMock.urlPathEqualTo("/graphql"))
.willReturn(
WireMock.aResponse()
aResponse()
.withHeader("Content-Type", "application/json")
.withStatus(202)
.withTransformerParameter("fnr", fnr)
Expand All @@ -43,7 +44,7 @@ fun WireMockExtension.pdl(fnr: String, historiske: List<String>): StubMapping {
.withRequestBody(
or(
*fnrs.map { fnr ->
containing(""""variables":{"ident":"$fnr"}""")
WireMock.containing(""""variables":{"ident":"$fnr"}""")
}.toTypedArray()
)
)
Expand All @@ -65,7 +66,7 @@ fun WireMockExtension.`pdl fnr fra query`(): StubMapping {
return this.stubFor(
WireMock.post(WireMock.urlPathEqualTo("/graphql"))
.willReturn(
WireMock.aResponse()
aResponse()
.withTransformers("response-template")
.withHeader("Content-Type", "application/json")
.withStatus(202)
Expand Down

0 comments on commit 84861ff

Please sign in to comment.