From 632d6d01ff87f51d5ae0a8f6493cae85e2f33c8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20B=C3=BClow=20Skovborg?= Date: Tue, 22 Aug 2023 13:20:36 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Fiks=20tester=20for=20auditlogging?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/test/kotlin/no/nav/spanner/AuditLogTest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/test/kotlin/no/nav/spanner/AuditLogTest.kt b/backend/src/test/kotlin/no/nav/spanner/AuditLogTest.kt index 8ec410a..de46f49 100644 --- a/backend/src/test/kotlin/no/nav/spanner/AuditLogTest.kt +++ b/backend/src/test/kotlin/no/nav/spanner/AuditLogTest.kt @@ -12,7 +12,7 @@ class AuditLogTest { fun auditLogVerifiedFnr() { val nå = now() val end = nå.toInstant().toEpochMilli() - val expected = "CEF:0|Spanner|auditLog|1.0|audit:access|Sporingslogg|INFO|end=$end duid=01010012345 suid=X000000 request=/api/person" + val expected = "CEF:0|Vedtaksløsning for sykepenger|Spanner|auditLog|1.0|audit:access|Sporingslogg|INFO|end=$end duid=01010012345 suid=X000000 request=/api/person" val actual = AuditLogger("X000000").lagMelding(AuditLogger.Operasjon.LES, 1010012345L, null, "/api/person", nå) Assertions.assertEquals(expected, actual) @@ -23,7 +23,7 @@ class AuditLogTest { val meldingsreferanse = UUID.randomUUID().toString() val nå = now() val end = nå.toInstant().toEpochMilli() - val expected = "CEF:0|Spanner|auditLog|1.0|audit:update|Sporingslogg|INFO|end=$end duid=1000000000000 suid=X000000 request=/api/hendelse/$meldingsreferanse" + val expected = "CEF:0|Vedtaksløsning for sykepenger|Spanner|auditLog|1.0|audit:update|Sporingslogg|INFO|end=$end duid=1000000000000 suid=X000000 request=/api/hendelse/$meldingsreferanse" val actual = AuditLogger("X000000").lagMelding(AuditLogger.Operasjon.SKRIV, null, 1000000000000L, "/api/hendelse/$meldingsreferanse", nå) Assertions.assertEquals(expected, actual) @@ -32,7 +32,7 @@ class AuditLogTest { fun `om både fnr og aktørId er oppgitt, logger vi fnr`() { val nå = now() val end = nå.toInstant().toEpochMilli() - val expected = "CEF:0|Spanner|auditLog|1.0|audit:access|Sporingslogg|INFO|end=$end duid=01010012345 suid=X000000 request=/api/person" + val expected = "CEF:0|Vedtaksløsning for sykepenger|Spanner|auditLog|1.0|audit:access|Sporingslogg|INFO|end=$end duid=01010012345 suid=X000000 request=/api/person" val actual = AuditLogger("X000000").lagMelding(AuditLogger.Operasjon.LES, 1010012345L, 1000000000000L, "/api/person", nå) Assertions.assertEquals(expected, actual)