Skip to content

test: add unit tests for secureMaxVersioned / secureMaxRemovalPolicy (fixes #44)#57

Open
hanu-14 wants to merge 3 commits into
alphacrack:mainfrom
hanu-14:test/fields-merge-helpers
Open

test: add unit tests for secureMaxVersioned / secureMaxRemovalPolicy (fixes #44)#57
hanu-14 wants to merge 3 commits into
alphacrack:mainfrom
hanu-14:test/fields-merge-helpers

Conversation

@hanu-14

@hanu-14 hanu-14 commented Jul 19, 2026

Copy link
Copy Markdown

Table-driven unit tests covering all combinations of tier x incoming values for the tighten-only merge helpers, including SNAPSHOT ranking.

@hanu-14
hanu-14 requested a review from alphacrack as a code owner July 19, 2026 16:46
@github-actions github-actions Bot added s3 Relates to the S3 SecureBucket resource tests Test coverage and test infrastructure labels Jul 19, 2026

@alphacrack alphacrack left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good table coverage of the ranking — the tighten-only direction is well exercised in both arguments. One gap to close before merge, since it's an explicit acceptance criterion in #44:

Missing: the unknown-rank fallback path. No case exercises a policy outside the DESTROY/SNAPSHOT/RETAIN ranking — e.g. RemovalPolicy.RETAIN_ON_UPDATE_OR_DELETE. Please add cases passing it as the tier value and as the incoming value, asserting the documented fallback behavior. That should take fields.ts branch coverage to 100%, which is the bar #44 sets.

Minor (non-blocking): should treat truthy/incoming coercion correctly repeats assertions from the two tests above it — fold it into them or drop it.

Also FYI: the diff currently includes #54/#56 content because the branches are stacked; that resolves itself as the stack merges bottom-up.

@alphacrack

Copy link
Copy Markdown
Owner

Status check: no new commits since the review, so this is still blocked on the one requested change — cases for the unknown-rank fallback path (RemovalPolicy.RETAIN_ON_UPDATE_OR_DELETE as the tier value and as the incoming value), which #44 requires for 100% branch coverage of fields.ts.

Heads-up on the environment: main moved to ESLint 10 + TypeScript 6 today (#59, #61). No action needed on your branch beyond the test cases — the lint rules were preserved 1:1 and your CI will simply run on the new toolchain after you push.

@hanu-14

hanu-14 commented Jul 21, 2026

Copy link
Copy Markdown
Author

Thanks for the heads-up on the review and the environment update. I’ll add test cases for the unknown-rank fallback path in fields.ts to cover RemovalPolicy.RETAIN_ON_UPDATE_OR_DELETE. The new ESLint/TypeScript versions won’t require changes to my branch, so I’ll push the update after adding the test cases.

@hanu-14 hanu-14 closed this Jul 22, 2026
@hanu-14 hanu-14 reopened this Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

s3 Relates to the S3 SecureBucket resource tests Test coverage and test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants