CliSubprocessCore.TestSupport.LiveSSH (CliSubprocessCore v0.2.0)

Copy Markdown View Source

Shared config-driven helpers for opt-in live SSH execution-surface tests.

Test wrappers materialize these values into :cli_subprocess_core, :live_ssh_env:

  • CLI_SUBPROCESS_CORE_LIVE_SSH=1 enables the helpers
  • CLI_SUBPROCESS_CORE_LIVE_SSH_DESTINATION=<host> selects the SSH target
  • optional CLI_SUBPROCESS_CORE_LIVE_SSH_USER
  • optional CLI_SUBPROCESS_CORE_LIVE_SSH_PORT
  • optional CLI_SUBPROCESS_CORE_LIVE_SSH_IDENTITY_FILE
  • optional CLI_SUBPROCESS_CORE_LIVE_SSH_PATH
  • optional provider command overrides such as CLI_SUBPROCESS_CORE_LIVE_SSH_CLAUDE_COMMAND=/path/to/claude

Summary

Functions

destination()

@spec destination() :: String.t() | nil

enabled?()

@spec enabled?() :: boolean()

execution_surface(opts \\ [])

@spec execution_surface(keyword()) :: CliSubprocessCore.ExecutionSurface.t()

execution_surface_options(opts \\ [])

@spec execution_surface_options(keyword()) :: keyword()

provider_command(provider)

@spec provider_command(:amp | :claude | :codex) :: String.t() | nil

provider_command_env(provider)

@spec provider_command_env(:amp | :claude | :codex) :: String.t()

run(command, args \\ [], opts \\ [])

@spec run(String.t(), [String.t()], keyword()) ::
  {:ok, CliSubprocessCore.Command.RunResult.t()} | {:error, term()}

runnable?(command, args \\ ["--version"], opts \\ [])

@spec runnable?(String.t(), [String.t()], keyword()) :: boolean()

skip_reason()

@spec skip_reason() :: String.t()