🌱 fix: resolve test compilation regressions#18006
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!
This is an automated message. |
✅ Deploy Preview for kubestellarconsole canceled.
|
- 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>
b0d6d90 to
cc5b397
Compare
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
❌ Post-Merge Verification: failedCommit: |
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
helpers_test.gowith singlecontainsStringdefinitioncapi_actions_test.go,karmada_actions_test.go,ocm_actions_test.go#17982: pkg/mcp tests - missing fmt import
fmtimport tobridge_test.go#17986: k8stest package - wrong authz type imports
corev1.SelfSubjectAccessReviewwithauthv1.SelfSubjectAccessReviewcorev1.SelfSubjectAccessReviewSpecwithauthv1.SelfSubjectAccessReviewSpeccorev1.ResourceAttributeswithauthv1.ResourceAttributesauthv1import fork8s.io/api/authorization/v1k8s.io/apimachinery/pkg/api/resourceimport#17984: pkg/api/audit tests - SSRF validation issues
TestElasticDestination_DefaultIndexto pass custom HTTP client (bypasses SSRF validation for localhost)TestRegisterDestinationSplunkWithFullConfigto usehttptest.NewServerinstead of fake hostnameTestRegisterDestinationElasticWithURLto usehttptest.NewServerinstead of fake hostname#17985: pkg/store OAuth tests - missing CREDENTIAL_ENCRYPTION_KEY
t.Setenvfor CREDENTIAL_ENCRYPTION_KEY to:TestOAuthCredentials_RoundTripTestOAuthCredentials_UpsertTestCleanupExpiredOAuthStatesTestTokenRevocation/CleanupExpiredTokens