Package servicetest provides functionality to help write tests for the Vanadium services.
CreateShell builds a new shell. Returns the shell and a cleanup function.
CreateShellAndMountTable builds a new shell and starts a root mount table. Returns the shell and a cleanup function. TODO(sadovsky): Use v23test.StartRootMountTable.
SetupRootDir sets up and returns a directory for the root and returns a cleanup function.
Tape holds a record of function call stimuli and each function call's response. Use Tape to help build a mock framework by first creating a new Tape, then SetResponses to define the mock responses and then Record each function invocation. Play returns the function invocations for verification in a test.
NewTape creates a new Tape.
Play returns the function call stimuli recorded to this Tape.
Record stores a new function invocation in a Tape and returns the response for that function interface.
Rewind resets the tape to the beginning so that it could be used again for further tests.
SetResponses updates the Tape's associated responses.
TapeMap provides multiple tapes for different strings. Use TapeMap to record separate Tapes for each suffix in a service.
NewTapeMap creates a new empty TapeMap.
ForSuffix returns the Tape for suffix s.
Rewind rewinds all of the Tapes in the TapeMap.