Skip to content

Commit

Permalink
Etter oppgraderingen av Koin settes ikke lenger Koin i GlobalScope. M…
Browse files Browse the repository at this point in the history
…å tilpasses for å fremdeles virke i "KoinJavaComponent".

Dropper å gjøre oppslag mot isso i test fordi tjenesten er fjernet i vtp
  • Loading branch information
baskevold committed Nov 15, 2023
1 parent aa15756 commit bf45e6a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/main/kotlin/no/nav/k9/los/K9Los.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -87,6 +88,7 @@ fun Application.k9Los() {

install(Koin) {
modules(selectModuleBasedOnProfile(this@k9Los, config = configuration))
GlobalContext.startKoin(this)
}

val koin = getKoin()
Expand Down
10 changes: 5 additions & 5 deletions src/test/kotlin/no/nav/k9/los/TestConfiguration.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit bf45e6a

Please sign in to comment.