From bf45e6a235eee58602cce8419ed72a5c97093392 Mon Sep 17 00:00:00 2001 From: Bjornar Askevold Date: Wed, 15 Nov 2023 16:25:00 +0100 Subject: [PATCH] =?UTF-8?q?Etter=20oppgraderingen=20av=20Koin=20settes=20i?= =?UTF-8?q?kke=20lenger=20Koin=20i=20GlobalScope.=20M=C3=A5=20tilpasses=20?= =?UTF-8?q?for=20=C3=A5=20fremdeles=20virke=20i=20"KoinJavaComponent".?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dropper å gjøre oppslag mot isso i test fordi tjenesten er fjernet i vtp --- src/main/kotlin/no/nav/k9/los/K9Los.kt | 2 ++ src/test/kotlin/no/nav/k9/los/TestConfiguration.kt | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/no/nav/k9/los/K9Los.kt b/src/main/kotlin/no/nav/k9/los/K9Los.kt index c381af9a3..6a4e17302 100644 --- a/src/main/kotlin/no/nav/k9/los/K9Los.kt +++ b/src/main/kotlin/no/nav/k9/los/K9Los.kt @@ -68,6 +68,7 @@ import no.nav.k9.los.tjenester.saksbehandler.oppgave.OppgaveApis import no.nav.k9.los.tjenester.saksbehandler.saksliste.SaksbehandlerOppgavekoApis import no.nav.k9.los.tjenester.sse.RefreshKlienterWebSocket import no.nav.k9.los.tjenester.sse.SseEvent +import org.koin.core.context.GlobalContext import org.koin.core.qualifier.named import org.koin.ktor.ext.getKoin import org.koin.ktor.plugin.Koin @@ -87,6 +88,7 @@ fun Application.k9Los() { install(Koin) { modules(selectModuleBasedOnProfile(this@k9Los, config = configuration)) + GlobalContext.startKoin(this) } val koin = getKoin() diff --git a/src/test/kotlin/no/nav/k9/los/TestConfiguration.kt b/src/test/kotlin/no/nav/k9/los/TestConfiguration.kt index c029e0016..32ce17618 100644 --- a/src/test/kotlin/no/nav/k9/los/TestConfiguration.kt +++ b/src/test/kotlin/no/nav/k9/los/TestConfiguration.kt @@ -31,13 +31,13 @@ object TestConfiguration { map["nav.auth.clients.size"] = "2" map["nav.auth.clients.0.alias"] = "nais-sts" - map["nav.auth.clients.0.client_id"] = "srvpps-k9-los-api" - map["nav.auth.clients.0.client_secret"] = "very-secret" - map["nav.auth.clients.0.discovery_endpoint"] = - "http://vtp:8060/rest/isso/oauth2/.well-known/openid-configuration" + map["nav.auth.clients.0.client_id"] = "k9-los" + map["nav.auth.clients.0.private_key_jwk"] = ClientCredentials.ClientA.privateKeyJwk + map["nav.auth.clients.0.certificate_hex_thumbprint"] = ClientCredentials.ClientA.certificateHexThumbprint + map["nav.auth.clients.0.discovery_endpoint"] = "http://azure-mock:8100/v2.0/.well-known/openid-configuration" map["nav.auth.clients.1.alias"] = "azure-v2" - map["nav.auth.clients.1.client_id"] = "pleiepengesoknad-prosessering" + map["nav.auth.clients.1.client_id"] = "k9-los" map["nav.auth.clients.1.private_key_jwk"] = ClientCredentials.ClientA.privateKeyJwk map["nav.auth.clients.1.certificate_hex_thumbprint"] = ClientCredentials.ClientA.certificateHexThumbprint map["nav.auth.clients.1.discovery_endpoint"] = "http://azure-mock:8100/v2.0/.well-known/openid-configuration"