Increase test coverage to 85% with Kubernetes integration tests

Resolved 💬 2 comments Opened Dec 23, 2025 by teonimesic Closed Dec 23, 2025

Summary

Current test coverage is at 81.55%. The target is to increase this to 85% by adding integration tests for remote mode functionality.

Current State

  • Overall line coverage: 81.55%
  • Many remote mode code paths are not covered because they require Kubernetes cluster access

Key Areas Needing Coverage

  1. commands/start.rs - Remote mode execution (--remote flag)
  2. commands/init.rs - Remote mode initialization
  3. commands/attach.rs - Remote session attachment
  4. k8s/exec.rs - Kubernetes pod execution
  5. k8s/statefulset.rs - StatefulSet management
  6. remote/session.rs - Remote session lifecycle
  7. remote/lifecycle.rs - Remote container lifecycle

Proposed Approach

  1. Set up a test Kubernetes cluster (kind or minikube) in CI
  2. Add integration tests that spin up real pods for remote mode testing
  3. Use test fixtures to simulate various remote session scenarios
  4. Add tests for error handling paths in K8s operations

Acceptance Criteria

  • [ ] Overall line coverage >= 85%
  • [ ] Remote mode commands have integration test coverage
  • [ ] K8s client operations have integration tests
  • [ ] CI runs K8s integration tests (possibly in a separate workflow)

Technical Notes

  • Currently blocked flaky Claude tests that were causing CI issues
  • Some Docker integration tests added for local mode
  • Remote mode tests require actual K8s API access

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗