Documentation
¶
Overview ¶
Package testkit provides disposable live protocol fixtures shared by SDK consumers. The fixtures are test infrastructure, not production fallbacks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyCandyFixReplace ¶ added in v0.2026215.1748
CopyCandyFixReplace copies a candy module tree to dst, rewriting go.mod's RELATIVE `replace github.com/opencharly/{sdk,spec} => ../../{sdk,spec}` directives to the ABSOLUTE repo-submodule dirs (derived from charlyDir's parent — the repo root) so an out-of-process plugin-candy build resolves them from a staged temp project location. A candy go.mod carries BOTH replaces (the sdk contract + the spec contract module it depends on transitively); a relative `=> ../../spec` staged into a temp project resolves to `<temp>/spec`, which does not exist, so the out-of-process `go build` fails with "reading ../../spec/go.mod: no such file" unless the spec replace is rewritten to the absolute spec dir exactly as the sdk replace is.
This is test-support infrastructure shared by charly's out-of-process plugin end-to-end tests (candy staging for a temp project's LoadUnified/build path). It lives here — outside both the charly module and the sdk contract module — because it spells the sdk/spec module import paths as STRING LITERALS (rewriting go.mod text), which would otherwise defeat a decoupling gate scoped to "no charly/*.go source spells the sdk import path as a literal" even though the file makes no actual Go import of either module.
Types ¶
type SSHProcessServer ¶
SSHProcessServer is a real SSH server whose accepted exec session is wired byte-for-byte to a child process. It lets consumers prove gRPC-over-SSH with the system OpenSSH client without relying on a machine-level sshd fixture.
func StartSSHProcessServer ¶
func StartSSHProcessServer(t TestingT, process func(string) *exec.Cmd) *SSHProcessServer