Skip to content

test(sandbox): Isolate WSL detection in backend selection tests #947

Closed

Description

@euxaristia

Problem

TestSelectBackendChoosesPlatformAdapterWithFallback mocks GOOS and executable lookup, but backend selection still reads the host's real WSL state. On WSL2, the missing-helper case returns BackendWSL instead of the intended non-WSL BackendUnavailable result.

Proposed change

Allow backend selection tests to inject WSL detection while preserving real detection as the production default. Add coverage for both non-WSL and WSL2 fallback behavior.

Acceptance criteria

  • go test ./internal/sandbox -run TestSelectBackendChoosesPlatformAdapterWithFallback/linux_helper_missing_falls_back_explicitly -count=1 passes on WSL and non-WSL hosts.
  • go test ./... passes.

Activity

  1. added
    issue-approvedReviewed and approved by the core team; community PRs may implement this issue.
    on Aug 25, 2026
  2. gnanam1990 commented on Aug 25, 2026

    @gnanam1990
    Collaborator

    Approved after rechecking current main. Backend-selection tests still consult the real host WSL state, so the reported non-WSL expectation can change on WSL. The requested injection seam and WSL/non-WSL coverage are appropriately scoped. PR #948 is already active; please coordinate there rather than opening a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue-approvedReviewed and approved by the core team; community PRs may implement this issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions