Documentation
¶
Index ¶
- Constants
- func DonePort(i int)
- func GetPort(t *testing.T) int
- func ReadInt(t *testing.T, p string) int
- func ReadString(t *testing.T, p string) string
- func RunTestRuntimes(t *testing.T, tests ...TestSpec)
- func StartDirServer(t *testing.T, dir string) (pid int, port int)
- func StartHelloServer(t *testing.T) (pid int, port int)
- func StringFlags(opts ...string) func(t *testing.T, env Env) []string
- func WantPrompt(prompt string, inputoutput ...[2]string) func(t *testing.T, env Env, in io.Writer, out io.Reader)
- func WantPromptWithWorkdir(prompt string, inputoutputFunc func(workdir string) [][2]string) func(t *testing.T, env Env, in io.Writer, out io.Reader)
- func WantString(wantstr string) func(t *testing.T, env Env, in io.Writer, out io.Reader)
- type Architecture
- type Env
- type Input
- type TestSpec
Constants ¶
View Source
const AssetPath = "/test/"
Defined in Dockerfile.test. TODO: Make it a flag
View Source
const C2wBin = "c2w"
View Source
const C2wNetProxyBin = "/opt/c2w-net-proxy.wasm"
View Source
const ImageMounterBin = "/opt/imagemounter.wasm"
Variables ¶
This section is empty.
Functions ¶
func RunTestRuntimes ¶
func StartDirServer ¶ added in v0.6.0
func WantPrompt ¶
func WantPromptWithWorkdir ¶
Types ¶
type Architecture ¶ added in v0.5.0
type Architecture int
const ( X86_64 Architecture = iota RISCV64 AArch64 )
type TestSpec ¶
type TestSpec struct { Name string Inputs []Input Prepare func(t *testing.T, env Env) Finalize func(t *testing.T, env Env) ImageName string // default: test.wasm Runtime string RuntimeOpts func(t *testing.T, env Env) []string Args func(t *testing.T, env Env) []string Want func(t *testing.T, env Env, in io.Writer, out io.Reader) NoParallel bool IgnoreExitCode bool }
Click to show internal directories.
Click to hide internal directories.