Skip to content

test: add integration test suite for data redaction and validation in…#502

Merged
mikewheeleer merged 1 commit into
Liquifact:mainfrom
extolkom:test/retention-18-dryrun-redaction
Jun 28, 2026
Merged

test: add integration test suite for data redaction and validation in…#502
mikewheeleer merged 1 commit into
Liquifact:mainfrom
extolkom:test/retention-18-dryrun-redaction

Conversation

@extolkom

Copy link
Copy Markdown
Contributor

closes #280

Summary
While several retention tests existed, there was no focused coverage proving that dry-run never mutates data and that only declared piiFields are redacted. This PR adds that coverage across two test files.
Changes
tests/retention.dryRun.test.js

dryRun: true produces zero writes — seeds rows into the retention table, runs the job with dryRun: true, asserts no rows were deleted or modified, and confirms the returned report contains the expected candidate count
dryRun report includes candidate rows without touching them — verifies the report lists affected row IDs while the actual table rows remain intact after the run
dryRun: false mutates data — confirms the non-dry path does delete/redact, proving the dry-run guard is the only difference between the two modes

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@extolkom Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@extolkom

Copy link
Copy Markdown
Contributor Author

CI failures are pre-existing — both Lint and Test jobs fail with npm error notarget No matching version found for c8@^11.1.0, a broken dependency in package.json unrelated to this PR. No files outside tests/retention.dryRun.test.js and tests/retention.unit.test.js were modified.

@mikewheeleer

Copy link
Copy Markdown
Contributor

clean diff — merging this 🙌

@mikewheeleer mikewheeleer merged commit 28ea673 into Liquifact:main Jun 28, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tests for retention purge dry-run and PII redaction behavior

2 participants