Versions in this module Expand all Collapse all v0 v0.0.3 Feb 13, 2026 v0.0.2 Feb 10, 2026 Changes in this version + func AssertCLIOutput(stdout, stderr string, exitCode int, expect CLIExpectation) []error + func AssertHeaders(resp http.Header, expected map[string]string) []error + func AssertResponse(resp *Response, expect Expectation) []error + func FormatErrors(errors []error) string + type AssertionError struct + Actual any + Expected any + Field string + Message string + func (e *AssertionError) Error() string + type BuildConfig struct + Package string + Timeout Duration + type CC2Config struct + CacheDir string + Image string + Timeout Duration + type CC2Expectation struct + ExitCode int + Files map[string]FileExpect + StderrContains string + StderrEquals string + StdoutContains string + StdoutEquals string + type CC2Fixtures struct + Dirs []string + Files map[string]string + type CC2Flags struct + Arch string + Build string + CPUs int + CacheDir string + Dmesg bool + Env []string + Exec bool + GPU bool + Memory uint64 + Mounts []string + Packetdump string + Timeout Duration + User string + Workdir string + type CC2TestCase struct + Bundle string + Command []string + Dockerfile string + Expect CC2Expectation + Fixtures CC2Fixtures + Flags CC2Flags + Image string + Name string + Skip bool + SkipCI bool + Stdin string + type CLIConfig struct + Env map[string]string + Timeout Duration + type CLIExpectation struct + ExitCode int + StderrContains string + StderrEquals string + StdoutContains string + StdoutEquals string + type CLITestCase struct + Args []string + Env map[string]string + Expect CLIExpectation + Name string + Stdin string + type Duration time.Duration + func (d *Duration) UnmarshalYAML(value *yaml.Node) error + func (d Duration) Duration() time.Duration + type ExampleResult struct + Duration time.Duration + Error string + Failed int + Name string + Passed int + Tests []TestResult + Total int + type Expectation struct + BodyContains string + BodyEquals string + Headers map[string]string + JSON map[string]any + Status int + type FileExpect struct + Contains string + Exists bool + type Output struct + func NewOutput() *Output + func (o *Output) Cleanup() + func (o *Output) IsTTY() bool + func (o *Output) PrintBanner(exampleCount, testCount int) + func (o *Output) PrintBuildProgress(current, total int, name string) + func (o *Output) PrintExampleError(err string) + func (o *Output) PrintExampleHeader(name string) + func (o *Output) PrintResults(results *Results) + func (o *Output) PrintTestFail(name string, errMsg string, dir string, details interface{}) + func (o *Output) PrintTestPass(name string, duration time.Duration) + func (o *Output) StartSpinner(message string) + func (o *Output) StartTestRun(name string) + func (o *Output) StopSpinner() + func (o *Output) StopTestRun() + type Response struct + Body []byte + Headers http.Header + StatusCode int + func (r *Response) JSON(v any) error + func (r *Response) String() string + type Results struct + Duration time.Duration + Examples []ExampleResult + Failed int + Passed int + Total int + type Runner struct + CC2Binary string + KeepAlive bool + Output *Output + Parallel int + Verbose bool + func NewRunner() *Runner + func (r *Runner) PrintResults(results *Results) + func (r *Runner) Run(ctx context.Context, patterns []string) (*Results, error) + type Server struct + func (s *Server) Stop() error + type ServerConfig struct + Env map[string]string + Port int + ShutdownTimeout Duration + StartupTimeout Duration + type TestCase struct + Body any + BodyBase64 string + BodyRaw string + Expect Expectation + Headers map[string]string + Method string + Name string + Path string + type TestResult struct + Details *TestResultDetails + Duration time.Duration + Error string + Name string + Passed bool + type TestResultDetails struct + Args []string + Body string + ExitCode int + Method string + Path string + StatusCode int + Stderr string + Stdout string + type TestSpec struct + Build BuildConfig + CC2 *CC2Config + CC2Tests []CC2TestCase + CLI *CLIConfig + CLITests []CLITestCase + Description string + Name string + Server ServerConfig + Tests []TestCase + func LoadSpec(path string) (*TestSpec, error) + func (s *TestSpec) IsCC2() bool + func (s *TestSpec) IsCLI() bool