Skip to content

🌱 fix: resolve test compilation regressions#18006

Merged
kubestellar-hive[bot] merged 1 commit into
mainfrom
scanner/fix-17982
Jun 12, 2026
Merged

🌱 fix: resolve test compilation regressions#18006
kubestellar-hive[bot] merged 1 commit into
mainfrom
scanner/fix-17982

Conversation

@kubestellar-hive

Copy link
Copy Markdown
Contributor

Fixes #17982
Fixes #17983
Fixes #17984
Fixes #17985
Fixes #17986

Resolves test compilation failures in pkg/api/audit, pkg/mcp, federation provider, k8stest, and pkg/store.

Changes

#17983: Federation provider tests - containsString redeclared

  • Created shared helpers_test.go with single containsString definition
  • Removed duplicate declarations from capi_actions_test.go, karmada_actions_test.go, ocm_actions_test.go

#17982: pkg/mcp tests - missing fmt import

  • Added fmt import to bridge_test.go

#17986: k8stest package - wrong authz type imports

  • Replaced corev1.SelfSubjectAccessReview with authv1.SelfSubjectAccessReview
  • Replaced corev1.SelfSubjectAccessReviewSpec with authv1.SelfSubjectAccessReviewSpec
  • Replaced corev1.ResourceAttributes with authv1.ResourceAttributes
  • Added authv1 import for k8s.io/api/authorization/v1
  • Removed unused k8s.io/apimachinery/pkg/api/resource import

#17984: pkg/api/audit tests - SSRF validation issues

  • Updated TestElasticDestination_DefaultIndex to pass custom HTTP client (bypasses SSRF validation for localhost)
  • Updated TestRegisterDestinationSplunkWithFullConfig to use httptest.NewServer instead of fake hostname
  • Updated TestRegisterDestinationElasticWithURL to use httptest.NewServer instead of fake hostname

#17985: pkg/store OAuth tests - missing CREDENTIAL_ENCRYPTION_KEY

  • Added t.Setenv for CREDENTIAL_ENCRYPTION_KEY to:
    • TestOAuthCredentials_RoundTrip
    • TestOAuthCredentials_Upsert
    • TestCleanupExpiredOAuthStates
    • TestTokenRevocation/CleanupExpiredTokens

Copilot AI review requested due to automatic review settings June 12, 2026 09:04

Copilot AI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Jun 12, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions

Copy link
Copy Markdown
Contributor

👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 12, 2026
@github-actions github-actions Bot added ai-generated Pull request generated by AI tier/2-standard labels Jun 12, 2026
@netlify

netlify Bot commented Jun 12, 2026

Copy link
Copy Markdown

Deploy Preview for kubestellarconsole canceled.

Name Link
🔨 Latest commit cc5b397
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6a2bd3564c6ceb0008d4b7c6

- pkg/mcp: add missing fmt import to bridge_test.go
- federation providers: deduplicate containsString into helpers_test.go
- pkg/api/audit: use httptest.NewServer to bypass SSRF in tests
- pkg/store: add CREDENTIAL_ENCRYPTION_KEY in OAuth test setup
- k8stest: fix authorization/v1 imports (was using core/v1)

Fixes #17982, #17983, #17984, #17985, #17986

Signed-off-by: Scanner Bot <scanner@kubestellar.io>
@kubestellar-hive kubestellar-hive Bot merged commit 60d526e into main Jun 12, 2026
20 of 31 checks passed
@kubestellar-prow kubestellar-prow Bot deleted the scanner/fix-17982 branch June 12, 2026 10:33
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

@github-actions

Copy link
Copy Markdown
Contributor

❌ Post-Merge Verification: failed

Commit: 60d526eb2c243bfdd6f6b3730008552a3ecbc424
Specs run: smoke.spec.ts
Report: https://github.com/kubestellar/console/actions/runs/27410306444

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment