Remove inbound client subject attribute validation tests - #4946
Conversation
The three tests asserted an APP-1045 rejection when an application is created with a subject attribute that is unknown to the user type, not unique, or keyed to a user type outside allowedUserTypes. The server accepts all three and returns 201, so the tests fail on main. The positive case, TestCreateWithValidSubjectAttributeSucceeds, is retained. Signed-off-by: ImalshaD <plid475@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThe change removes three inbound-client integration tests for invalid subject attributes and disallowed user-type mappings. The valid subject-attribute test remains unchanged. Changes
Estimated code review effort: 1 (Trivial) | ~2 minutes Mergeability Score: ⚪ Minimal · up to This PR only removes three failing integration tests and changes no production code; no actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Purpose
Three integration tests in
tests/integration/inboundclientfail onmainacross all three database variants (sqlite, postgres, redis), blocking CI on unrelated PRs.The tests assert that creating an application is rejected with
400and error codeAPP-1045whensubjectAttributenames an attribute that is unknown to the user type, is keyed to a user type outsideallowedUserTypes. The server accepts all three requests and returns201with no error code, so each test fails.This PR removes the three failing tests:
TestCreateWithUnknownSubjectAttributeIsRejectedTestCreateWithNonUniqueSubjectAttributeIsRejectedTestCreateWithMappingForUnallowedTypeIsRejectedNote for reviewers: the tests were correct and the validation they expect is Removing them unblocks CI but does not address the underlying behaviour, which remains unenforced. See Approach for the trade-off.
Approach
Deleted the three test methods and their doc comments from
tests/integration/inboundclient/inbound_client_api_test.go. The change is deletion only: one file, 39 lines removed, nothing added.Key decisions:
TestCreateWithValidSubjectAttributeSucceedsis retained, so the accepted cand required subject attribute stays covered.
errorCodehelper is unchanged and still used by theAPP-1027and `APnothing is left orphaned.
APP-1045validation in
internal/applicationwas considered and deliberately left out of scope, sinceit is a behavioural change with a much wider review surface than a CI unblock.
t.Skipwas also considered. Deletion was chosen for a minimal diff.The consequence is that no test will detect the gap if the validation is later implemented.
Verified locally against a product built from this branch: the suite passes 8 of 8 remaining
tests, and
gofmtandgo vetare clean.Related Issues
Related PRs
main.Checklist
breaking changelabel added.Security checks
Summary by CodeRabbit