Skip to main content

Module command_runner

Module command_runner 

Source
Expand description

A minimal stand-in for internal/executor.CommandRunner.

The real executor package is a separate Go package with its own test suite (internal/executor/*_test.go), which is out of scope for this port (see PORT_NOTES.md). internal/truststore only ever calls two of its methods — RunSudo and ReadStdout — so this trait models exactly those two, as a placeholder until a xianyun-executor crate exists for truststore to depend on instead.

Structs§

CmdError
A minimal stand-in for the Go error values these tests return through the mock (fs.ErrPermission, fs.ErrNotExist, etc.). Not a rich error type — just enough to drive the ported assertions.

Traits§

CommandRunner
Ported from the two CommandRunner methods truststore actually calls.