test: add e2e tests for PAT CRUD lifecycle and role-scope matrix#1559
test: add e2e tests for PAT CRUD lifecycle and role-scope matrix#1559
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 51 minutes and 19 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR modifies the PAT e2e regression test suite to enable race build execution, expand test coverage with four new test functions covering denied roles, role/scope matrix combinations, PAT lifecycle, and create error cases, while also renaming an existing test from org owner to org manager scope. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7ef9ae0d-41bb-4915-b5aa-3e3adf59992d
📒 Files selected for processing (1)
test/e2e/regression/pat_test.go
Coverage Report for CI Build 24707799176Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage remained the same at 42.192%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Summary
TestPATCRUD_Lifecycle— full sequential e2e test covering all 8 PAT RPCs: ListRolesForPAT, CheckTitle, Create, Get, Search, Update, Regenerate, DeleteTestPATScope_RoleMatrix— table-driven test covering 9 org/project role combinationsTestPATScope_DeniedRole— verifies org_owner rejection with denied permissions configTestPATCRUD_CreateErrors— duplicate title, denied role, past expiryTestPATScope_OrgOwnerwithTestPATScope_OrgManager(org_owner is now a denied role)DeniedPermissions: ["app_organization_administer"]to test config (matches production)CRUD Lifecycle flow
Role-scope matrix (9 combinations)
Test plan
go build ./test/e2e/...passes