OCPBUGS-97597: use unique usernames in parallel OAuth tests#31363
OCPBUGS-97597: use unique usernames in parallel OAuth tests#31363xueqzhan wants to merge 2 commits into
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
@xueqzhan: This pull request references Jira Issue OCPBUGS-97597, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: xueqzhan The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughThis PR updates OAuth extended tests to use dynamically generated usernames instead of a hardcoded test user. The OAuth server helper now accepts a username, and the affected tests pass that username through setup, token/code flows, verification, and cleanup. ChangesOAuth test username parameterization
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/extended/oauth/expiration.go`:
- Around line 39-43: The AfterEach cleanup in the expiration test ignores Delete
errors, so failures can leave stale User/Identity objects behind. Update the
cleanup in the oauth expiration test’s AfterEach block to handle and surface
errors from oc.AdminUserClient().UserV1().Users().Delete and
Identities().Delete, while still running oauthServerCleanup(), so test cleanup
never silently discards failures.
In `@test/extended/oauth/htpasswd.go`:
- Around line 45-47: The deferred cleanup in htpasswd.go is discarding errors
from the User and Identity Delete calls, which can leave resources behind during
parallel runs. Update the cleanup logic in the affected deferred block to handle
and surface the Delete return values instead of ignoring them, following the
same pattern used in expiration.go, so both
oc.AdminUserClient().UserV1().Users().Delete and
oc.AdminUserClient().UserV1().Identities().Delete are checked and any failures
are reported.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 0bac446b-5343-4171-bf83-d3799874d367
📒 Files selected for processing (4)
test/extended/oauth/expiration.gotest/extended/oauth/helpers.gotest/extended/oauth/htpasswd.gotest/extended/oauth/server_headers.go
|
Scheduling required tests: |
|
Scheduling required tests: |
|
@xueqzhan: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary by CodeRabbit