test

package
v0.1.0-rc.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package test wires `w17ctl test` — a thin kong adapter over the e2e suite runner in internal/testsuite. It parses the flags, maps them into a testsuite.Config, and runs it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd struct {
	ComposeFile    string `` /* 127-byte string literal not displayed */
	Project        string `name:"project" help:"COMPOSE_PROJECT_NAME for the run (default: <compose-name>-e2e-<random> so runs never collide)."`
	GatewayService string `` /* 126-byte string literal not displayed */
	GatewayPort    int    `` /* 133-byte string literal not displayed */
	Format         string `` /* 203-byte string literal not displayed */
	Mcp            string `name:"mcp" help:"MCP endpoint URL (set when running MCP scenarios)."`
	Admin          string `name:"admin" help:"Admin bundle endpoint URL (default: auto-discovered from the -admin compose service)."`
	Domain         string `name:"domain" help:"Run only this domain (empty = all)."`
	Transport      string `name:"transport" help:"Run only this transport: rest|mcp|admin (empty = all)."`
	Verbose        bool   `name:"verbose" help:"Per-step progress output (passes -test.v to the suite)."`
	Image          string `name:"image" default:"golang:1.26-alpine" help:"Builder image used to cross-compile the suite."`
	GomodVolume    string `name:"gomod-volume" default:"w17ctl-gomod" help:"Named Docker volume for the Go module cache (shared across runs)."`
	Keep           bool   `name:"keep" help:"Leave the stack running after the suite (skip teardown) for debugging."`
	Timeout        int    `name:"timeout" default:"300" help:"Seconds to wait for the stack to become healthy (docker compose up --wait-timeout)."`
	Console        string `` /* 213-byte string literal not displayed */
}

Cmd runs the project's generated e2e suite against an EPHEMERAL, self-owned stack: it brings the project's OWN compose.yaml up (unique project name + dynamic host ports so runs never collide), discovers the gateway's assigned host port, builds the e2erunner as a host binary (cross-compiled in Docker — no local Go needed), runs it against http://localhost:<port> as a true external client, and tears the stack down.

func (*Cmd) Run

func (c *Cmd) Run() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL