HYPERFLEET-1202 - fix: Enable adapter API auth#149
Conversation
📝 WalkthroughWalkthrough
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 10 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (10 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
Extract adapterHelmSetArgs from DeployAdapter for testability. TestAdapterHelmSetArgs verifies: - auth flag included when JWT TokenRequest is enabled - auth flag omitted when JWT is disabled - fullnameOverride, run-id label, image pull policy, custom set values
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@pkg/helper/adapter_test.go`:
- Around line 395-422: Add coverage for the IMAGE_PULL_POLICY branch in
adapterHelmSetArgs by adding a pullPolicyEnv field to the table-driven test case
struct, setting it to "IfNotPresent" for a new case, and applying it with
t.Setenv in the test body. Assert the generated Helm arguments include the
expected image pull policy value while keeping environment isolation safe for
parallel tests.
🪄 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: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 81c0be92-773d-4b0e-9baf-dfb6ca8d9ad6
📒 Files selected for processing (2)
pkg/helper/adapter.gopkg/helper/adapter_test.go
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
openshift-hyperfleet/architecture(manual)openshift-hyperfleet/hyperfleet-api(manual)openshift-hyperfleet/hyperfleet-sentinel(manual)openshift-hyperfleet/hyperfleet-adapter(manual)openshift-hyperfleet/hyperfleet-broker(manual)
🚧 Files skipped from review as they are similar to previous changes (1)
- pkg/helper/adapter.go
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tirthct 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 |
3ad187a
into
openshift-hyperfleet:main
Summary
Test Plan
make test-allpassesmake lintpassesmake test-helm(if applicable)