[ci-maintainer] fix: resolve persistent go vet and test build failures#18233
Conversation
…s across pkg/agent, pkg/settings, and pkg/api/transport - Remove var fakeExecCommandContext from provider_helpers.go (production file had test infrastructure causing redeclaration with server_gitops_test.go) - Fix Ciphertext field type: []byte -> string in manager_validation_test.go - Replace KubectlProxy struct literals (unexported fields) with kube.NewTestKubectlProxy() in server_test.go, server_sse_test.go, server_http_resources_stream_test.go - Add updater import to server_http_test.go; use updater.NewUpdateChecker() and checker.Status().Channel instead of accessing unexported fields - Add SetLookPathForTest/SetStatFileForTest/SetStandardToolCandidatesForTest to pkg/agent/kube/testing.go; update server_ops_clusters_test.go and server_ops_insights_test.go to use kube.* prefixes - Fix server_test.go: NewLocalClusterManager -> kube.NewLocalClusterManager - Move hub_close_test.go and websocket_test.go from pkg/api/handlers to pkg/api/transport (type aliases don't allow unexported field access) Signed-off-by: Copilot <copilot@example.com>
|
[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 |
✅ Deploy Preview for kubestellarconsole canceled.
|
|
👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!
This is an automated message. |
|
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: |
|
Post-merge build verification passed ✅ Both Go and frontend builds compiled successfully against merge commit |
CI Fix
Fixes six categories of
go vet/go testbuild failures onmain:Remove
var fakeExecCommandContextfrom production code (provider_helpers.go) — was test infrastructure accidentally left in a non-test file, causing a redeclaration error withserver_gitops_test.go.Add exported test setters to
pkg/agent/kube/testing.go(SetLookPathForTest,SetStatFileForTest,SetStandardToolCandidatesForTest) — tests inpackage agentwere accessing unexported vars directly frompkg/agent/kube.Fix
UpdateCheckerusage inserver_http_test.go— useupdater.NewUpdateChecker()andchecker.Status().Channelinstead of struct literals with unexported fields.Replace
KubectlProxystruct literals withkube.NewTestKubectlProxy()inserver_test.go,server_sse_test.go,server_http_resources_stream_test.go.Fix
Ciphertexttype mismatch inpkg/settings/manager_validation_test.go([]byte→string).Move hub/websocket tests to
pkg/api/transport— type aliases don't permit cross-package unexported-field access; tests were moved frompkg/api/handlerstopkg/api/transportwhere they can access the fields directly.Fixes #18232
Filed by ci-maintainer agent (ACMM L6 — full mode)