Skip to content

chore: add keyed fields in auth_test.go - #204

Merged
NigelByrne1 merged 1 commit into
konflux-ci:mainfrom
NigelByrne1:chore/lint-fix
Sep 8, 2026
Merged

chore: add keyed fields in auth_test.go#204
NigelByrne1 merged 1 commit into
konflux-ci:mainfrom
NigelByrne1:chore/lint-fix

Conversation

@NigelByrne1

Copy link
Copy Markdown
Contributor
  • local linter wants named fields
  • add Code: and Body: to TestAuthHandlerServiceAccount

 - local linter wants named fields
 - add `Code:` and `Body:` to TestAuthHandlerServiceAccount

Signed-off-by: nbyrne <nbyrne@redhat.com>
@qodo-app-for-konflux-ci

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can copy the agent prompt from any finding and feed it to your IDE agent

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@qodo-app-for-konflux-ci

Copy link
Copy Markdown

PR Summary by Qodo

Use keyed response literals in authentication tests

🧪 Tests 🕐 Less than 5 minutes

Grey Divider

AI Description

• Names mock response fields in service-account authentication test fixtures.
• Satisfies composite-literal linting without changing test behavior.
High-Level Assessment

The keyed literal approach is optimal because it satisfies linting, improves resilience to struct field reordering, and preserves existing test behavior.

Files changed (1) +4 / -4

Tests (1) +4 / -4
auth_test.goUse keyed fields in authentication response fixtures +4/-4

Use keyed fields in authentication response fixtures

• Adds explicit 'Code' and 'Body' field names to mock OpenShift responses in service-account authentication tests. Test inputs and expected behavior remain unchanged.

pkg/handlers/auth_test.go

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 7, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 4:10 PM UTC · Completed 4:19 PM UTC

Commit: 9ee3c25 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $1.87

@dirgim dirgim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@fullsend-ai-review fullsend-ai-review Bot added the risk/low PR risk: low label Sep 7, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: low (1/5)

Details

Single test-only file change adding named struct fields to satisfy linter requirements, with minimal churn, one author, no protected paths, no dependencies, and no linked issue — composite score 0.62×1.125 + 0.38×1.43 ≈ 1.24, rounded to 1.

@fullsend-ai-review

Copy link
Copy Markdown

Looks good to me

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Sep 7, 2026

@jencull jencull left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@NigelByrne1
NigelByrne1 merged commit fcdf3f5 into konflux-ci:main Sep 8, 2026
14 checks passed
@NigelByrne1
NigelByrne1 deleted the chore/lint-fix branch September 8, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge All reviewers approved — ready to merge risk/low PR risk: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants