Skip to content

Commit 7ebb0e5

Browse files
committed
Add tests
1 parent f62542a commit 7ebb0e5

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

Diff for: service/src/test/kotlin/app/cash/backfila/service/listener/AuditClientListenerTest.kt

+18-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class AuditClientListenerTest {
156156
applicationName = "deep-fryer",
157157
approverLDAP = "molly",
158158
automatedChange = true,
159-
description = "Backfill started by molly [dryRun=true][service=deep-fryer][backfill=ChickenSandwich][id=${response.backfill_run_id}]",
159+
description = "Backfill paused due to error [dryRun=true][service=deep-fryer][backfill=ChickenSandwich][id=${response.backfill_run_id}]",
160160
richDescription = null,
161161
environment = "testing",
162162
detailURL = "/backfills/${response.backfill_run_id}",
@@ -168,6 +168,23 @@ class AuditClientListenerTest {
168168

169169
auditClientListener.runCompleted(Id(response.backfill_run_id))
170170
assertEquals(4, fakeAuditClient.sentEvents.size)
171+
assertEquals(
172+
FakeAuditClient.FakeAuditEvent(
173+
eventSource = "backfila",
174+
eventTarget = "ChickenSandwich",
175+
timestampSent = 2147483647,
176+
applicationName = "deep-fryer",
177+
approverLDAP = "molly",
178+
automatedChange = true,
179+
description = "Backfill completed [dryRun=true][service=deep-fryer][backfill=ChickenSandwich][id=${response.backfill_run_id}]",
180+
richDescription = null,
181+
environment = "testing",
182+
detailURL = "/backfills/${response.backfill_run_id}",
183+
region = "us-west-2",
184+
requestorLDAP = "molly",
185+
),
186+
fakeAuditClient.sentEvents.last(),
187+
)
171188
}
172189
}
173190
}

0 commit comments

Comments
 (0)