Skip to content

Commit

Permalink
✅ Fiks tester for auditlogging
Browse files Browse the repository at this point in the history
  • Loading branch information
chsko committed Aug 22, 2023
1 parent 7021d52 commit 632d6d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/src/test/kotlin/no/nav/spanner/AuditLogTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class AuditLogTest {
fun auditLogVerifiedFnr() {
val= 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)
Expand All @@ -23,7 +23,7 @@ class AuditLogTest {
val meldingsreferanse = UUID.randomUUID().toString()
val= 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)
Expand All @@ -32,7 +32,7 @@ class AuditLogTest {
fun `om både fnr og aktørId er oppgitt, logger vi fnr`() {
val= 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)
Expand Down

0 comments on commit 632d6d0

Please sign in to comment.