Skip to content

test: raise pkg coverage above 80% and bump tool versions#65

Merged
dimetron merged 1 commit into
mainfrom
test/coverage-and-tool-version-bumps
Jun 23, 2026
Merged

test: raise pkg coverage above 80% and bump tool versions#65
dimetron merged 1 commit into
mainfrom
test/coverage-and-tool-version-bumps

Conversation

@dimetron

Copy link
Copy Markdown
Collaborator

Summary

  • Add unit tests so every package in ./pkg exceeds 80% statement coverage.
  • Bump CLI tool versions to their latest releases (verified via make check-releases).

Coverage improvements

Package Before After
utils 6.5% 100.0%
cilium 46.7% 85.5%
argo 49.7% 88.3%
istio 61.6% 92.7%
prometheus 72.4% 81.6%
k8s 73.9% 82.2%
kubescape 82.1% 82.1%
helm 87.5% 87.5%

New tests target previously-uncovered handlers (cilium-dbg/CLI handlers, argo gateway plugin & list/logs, istio waypoint apply/delete/status + ztunnel, prometheus RegisterTools/validation/error paths, k8s RegisterTools/NewK8sToolWithConfig, and the utils shell tool). Tests follow the existing conventions (mocked ShellExecutor, table-driven subtests). The shell tool closure was extracted into a named handleShellTool for testability (no behavior change).

Tool version bumps (make check-releases)

  • cilium 0.19.20.19.4
  • istio 1.29.11.30.1
  • helm 4.1.34.2.2
  • kubectl 1.35.31.36.2

(go.mod already at latest Go 1.26.4.)

Test plan

  • go test -tags=test ./pkg/... — all packages pass
  • go test -tags=test -cover ./pkg/... — all packages > 80%
  • make check-releases — all versions current
  • go vet -tags=test ./pkg/... — clean

Add unit tests across pkg providers so every package in ./pkg exceeds 80%
statement coverage:

- utils: 6.5% -> 100% (shell tool, kubeconfig, RegisterTools)
- cilium: 46.7% -> 85.5% (cilium-dbg and CLI handlers)
- argo: 49.7% -> 88.3% (gateway plugin, list/check logs, RegisterTools)
- istio: 61.6% -> 92.7% (waypoint apply/delete/status, ztunnel)
- prometheus: 72.4% -> 81.6% (RegisterTools, validation/error paths)
- k8s: 73.9% -> 82.2% (RegisterTools, NewK8sToolWithConfig)

Extract the shell tool closure into a named handleShellTool for testability.

Bump tool versions to latest releases (make check-releases):
- cilium 0.19.2 -> 0.19.4
- istio 1.29.1 -> 1.30.1
- helm 4.1.3 -> 4.2.2
- kubectl 1.35.3 -> 1.36.2

Signed-off-by: Dmytro Rashko <dmitriy.rashko@amdocs.com>
@dimetron dimetron requested a review from EItanya as a code owner June 23, 2026 14:06
@dimetron dimetron merged commit a648547 into main Jun 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants