Skip to content

Stabilize doctor command tests across local environments #28

@jjuanrivvera99

Description

@jjuanrivvera99

Problem

TestDoctorCmd can fail in local runs because canvas doctor performs environment and network checks that depend on host state and local credentials.

Context

  • During v1.8.0 release validation, full test runs passed under CI=1 but local doctor tests were environment-dependent.
  • Current tests skip in CI, but local determinism is still weak.

Goal

Make doctor command tests deterministic and resilient while preserving useful coverage.

Suggested approach

  • Add dependency injection or a mockable diagnostics runner in commands/doctor.go.
  • Add focused unit tests for output formatting and failure handling without live network/filesystem dependencies.
  • Keep one opt-in integration smoke test behind an explicit env var.

Acceptance criteria

  • go test ./commands -run TestDoctorCmd is deterministic locally.
  • No live network or host permission dependency by default.
  • Runtime behavior of canvas doctor for users remains unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions