fix: audit target is the record acted on, never a typed username; guard retention
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
This commit is contained in:
1 parent
81ef54f996
commit
7aa5c4b921
10 files changed
+61
-7
No files matched your search
+8
@@ -26,6 +26,14 @@ class AuditEventLogPurgeTest {
|
||||
return c.getValue();
|
||||
}
|
||||
|
||||
@Test
|
||||
void rejectsARetentionBelowOneDay() {
|
||||
for (int days : new int[] {0, -1}) {
|
||||
org.assertj.core.api.Assertions.assertThatThrownBy(() -> new AuditEventLogPurge(repository, days))
|
||||
.isInstanceOf(IllegalArgumentException.class);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void cutoffIsNowMinusConfiguredRetention() {
|
||||
for (int days : new int[] {730, 30}) {
|
||||
|
||||
Reference in new issue
Block a user