Skip to main content

Module shell_mock

Module shell_mock 

Source
Expand description

Test mock for shell::run_in_vm and related functions.

Provides a thread-local mock handler that intercepts shell commands during tests, backed by an in-memory filesystem simulation.

Structs§

MockFsBuilder
MockGuard
Guard that clears the mock handler on drop.
MockResponse
Mock response for a shell command.

Functions§

mock_fs
Build a mock backed by an in-memory filesystem.
pool_fixture
Generate a pool spec JSON string for use in tests.
tenant_fixture
Generate a tenant config JSON string for use in tests.

Type Aliases§

SharedFs
Shared reference to the in-memory filesystem backing the mock.