CliSubprocessCore.TestSupport.FakeSSH (CliSubprocessCore v0.2.0)

Copy Markdown View Source

Canonical fake-SSH parity harness for exercising the real execution-surface path without injecting fake transport implementations.

The harness materializes an executable ssh shim, records the translated SSH invocation into a manifest file, and then runs the translated remote command locally through /bin/sh -lc.

Summary

Types

t()

@type t() :: %CliSubprocessCore.TestSupport.FakeSSH{
  manifest_path: String.t(),
  root_dir: String.t(),
  ssh_path: String.t()
}

Functions

cleanup(fake_ssh)

@spec cleanup(t()) :: :ok

new!(opts \\ [])

@spec new!(keyword()) :: t()

read_manifest!(fake_ssh)

@spec read_manifest!(t()) :: binary()

transport_options(fake_ssh, opts \\ [])

@spec transport_options(
  t(),
  keyword()
) :: keyword()

wait_until_written(fake_ssh, timeout_ms)

@spec wait_until_written(t(), non_neg_integer()) :: :ok | :timeout