Skip to content

Commit

Permalink
Upgrade deps and remove unused kafka-embedded
Browse files Browse the repository at this point in the history
  • Loading branch information
andersrognstad committed Sep 11, 2023
1 parent 9f02c48 commit 42e09dc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 31 deletions.
12 changes: 5 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@ version = "0.0.1"

object Versions {
const val confluent = "7.4.0"
const val flyway = "9.14.0"
const val flyway = "9.12.0"
const val hikari = "5.0.1"
const val isdialogmoteSchema = "1.0.5"
const val jacksonDataType = "2.15.2"
const val kafka = "3.3.2"
const val kafkaEmbedded = "3.2.3"
const val kafka = "3.5.1"
const val kluent = "1.73"
const val ktor = "2.3.1"
const val ktor = "2.3.4"
const val logback = "1.4.7"
const val logstashEncoder = "7.2"
const val micrometerRegistry = "1.11.0"
const val micrometerRegistry = "1.11.3"
const val nimbusJoseJwt = "9.31"
const val mockk = "1.13.5"
const val mockk = "1.13.7"
const val postgres = "42.5.1"
val postgresEmbedded = if (Os.isFamily(Os.FAMILY_MAC)) "1.0.0" else "0.13.4"
const val scala = "2.13.11"
Expand Down Expand Up @@ -89,7 +88,6 @@ dependencies {
implementation("io.confluent:kafka-avro-serializer:${Versions.confluent}", excludeLog4j)
implementation("io.confluent:kafka-schema-registry:${Versions.confluent}", excludeLog4j)
implementation("no.nav.syfo.dialogmote.avro:isdialogmote-schema:${Versions.isdialogmoteSchema}")
testImplementation("no.nav:kafka-embedded-env:${Versions.kafkaEmbedded}", excludeLog4j)

testImplementation("com.nimbusds:nimbus-jose-jwt:${Versions.nimbusJoseJwt}")
testImplementation("io.ktor:ktor-server-tests:${Versions.ktor}")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package no.nav.syfo.testhelper

import no.nav.common.KafkaEnvironment
import no.nav.syfo.application.ApplicationState
import no.nav.syfo.application.Environment
import no.nav.syfo.client.wellknown.WellKnown
Expand All @@ -19,7 +18,6 @@ fun wellKnownInternalAzureAD(): WellKnown {
class ExternalMockEnvironment private constructor() {
val applicationState: ApplicationState = testAppState()
val database = TestDatabase()
val embeddedEnvironment: KafkaEnvironment = testKafka()

private val azureAdMock = AzureADMock()
private val syfoTilgangskontrollMock = SyfoTilgangskontrollMock()
Expand All @@ -34,7 +32,6 @@ class ExternalMockEnvironment private constructor() {

val environment: Environment by lazy {
testEnvironment(
kafkaBootstrapServers = embeddedEnvironment.brokersURL,
azureOpenIdTokenEndpoint = azureAdMock.url(),
syfoTilgangskontrollUrl = syfoTilgangskontrollMock.url(),
oppfolgingstilfelleUrl = oppfolgingstilfelleMock.url(),
Expand All @@ -54,6 +51,5 @@ class ExternalMockEnvironment private constructor() {
}

fun ExternalMockEnvironment.startExternalMocks() {
this.embeddedEnvironment.start()
this.externalMocks.forEach { (_, externalMock) -> externalMock.start() }
}
3 changes: 1 addition & 2 deletions src/test/kotlin/no/nav/syfo/testhelper/TestEnvironment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import no.nav.syfo.client.ClientsEnvironment
import no.nav.syfo.client.azuread.AzureEnvironment

fun testEnvironment(
kafkaBootstrapServers: String,
azureOpenIdTokenEndpoint: String,
syfoTilgangskontrollUrl: String,
oppfolgingstilfelleUrl: String,
Expand All @@ -29,7 +28,7 @@ fun testEnvironment(
),
electorPath = "/tmp",
kafka = KafkaEnvironment(
aivenBootstrapServers = kafkaBootstrapServers,
aivenBootstrapServers = "kafkaBootstrapServers",
aivenCredstorePassword = "credstorepassord",
aivenKeystoreLocation = "keystore",
aivenSecurityProtocol = "SSL",
Expand Down
18 changes: 0 additions & 18 deletions src/test/kotlin/no/nav/syfo/testhelper/TestKafka.kt

This file was deleted.

0 comments on commit 42e09dc

Please sign in to comment.