Skip to content

test: expand coverage for runtime resolution, shims, and installers #89

@CalvinAllen

Description

@CalvinAllen

Expand test coverage for archive extraction, installers, and integration workflows.

Current State

12 test files exist with coverage in:

  • src/runtimes/python/provider_test.go - Python provider
  • src/runtimes/node/provider_test.go - Node provider
  • src/internal/shim/manager_test.go - Shim management
  • src/internal/runtime/version_test.go, registry_test.go - Runtime infrastructure
  • src/cmd/migrate_test.go, uninstall_test.go - Command tests
  • src/internal/config/paths_test.go, version_test.go - Config tests

Remaining Work

Missing Unit Tests

  • src/internal/download/extract_test.go - Test ExtractZip, ExtractTarGz, ZipSlip protection
  • src/internal/download/download_test.go - Test HTTP download logic
  • src/cmd/shim/ - Shim path resolution edge cases

Missing Integration Tests

  • Installer dry-run mode (install.sh --dry-run, install.ps1 -DryRun)
  • Full install → configure → execute workflow
  • Migration workflow (detect → migrate → verify)
  • Reshim workflow (install package → reshim → verify new shim)

CI Integration

  • Add testable mode to installers for CI validation
  • Platform-specific test matrix (Windows, macOS, Linux)

Acceptance Criteria

  • Archive extraction has unit tests (including security edge cases)
  • Installers have a testable mode exercised in CI
  • Shim resolution covered by platform-specific tests

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions