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 StartHelloServer(t *testing.T) (pid int, port int)
- func StringFlags(opts ...string) func(t *testing.T, workdir string) []string
- func WantPrompt(prompt string, inputoutput ...[2]string) func(t *testing.T, workdir string, in io.Writer, out io.Reader)
- func WantPromptWithWorkdir(prompt string, inputoutputFunc func(workdir string) [][2]string) func(t *testing.T, workdir string, in io.Writer, out io.Reader)
- func WantString(wantstr string) func(t *testing.T, workdir string, in io.Writer, out io.Reader)
- type Architecture
- 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"
Variables ¶
This section is empty.
Functions ¶
func RunTestRuntimes ¶
func WantPrompt ¶
func WantPromptWithWorkdir ¶
Types ¶
type Architecture ¶ added in v0.5.0
type Architecture int
const ( X86_64 Architecture = iota RISCV64 AArch64 )
type Input ¶
type Input struct {
Image string
ConvertOpts []string
Architecture Architecture
Dockerfile string
}
type TestSpec ¶
type TestSpec struct {
Name string
Inputs []Input
Prepare func(t *testing.T, workdir string)
Finalize func(t *testing.T, workdir string)
ImageName string // default: test.wasm
Runtime string
RuntimeOpts func(t *testing.T, workdir string) []string
Args func(t *testing.T, workdir string) []string
Want func(t *testing.T, workdir string, in io.Writer, out io.Reader)
NoParallel bool
IgnoreExitCode bool
}
Click to show internal directories.
Click to hide internal directories.