e2e/

directory
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT

README

End-to-end tests

clix's e2e suite is e2e_test.go in this directory: a black-box suite that builds exampletool/ — a consumer program wired the way README.md's Use program and docs/specs/consumer-api.md prescribe (ldflags-injected build metadata, App.Run on a cobra root, NewReporter for progress, OutputJSON/OutputJSONError for data) — and runs it as a subprocess. It asserts what only a finished binary shows: fang's --version output carrying the injected metadata, the stdout/stderr split (data on stdout, text progress on stderr), the Silent > JSON > Text priority, the JSON error envelope, and process exit codes. The unit tests next to each source file (clix_test.go, flags_test.go, output_test.go, reporter_test.go) cover the same behavior in-process. TestMain exits early when no go toolchain is on PATH.

Run it with:

go test -v ./tests/e2e/...   # the e2e suite alone
make test                    # everything, e2e included

CI runs it inside the Unit Tests and Race Detection jobs of .github/workflows/ci.yml, which run different commands. Unit Tests runs the repository gate make ci, whose test step is the coverage-instrumented go test -v -coverprofile=coverage.out -covermode=atomic -coverpkg=github.com/frostyard/clix ./... defined by the test target; Race Detection runs go test -race ./... directly. Both invocations end in ./..., so both include this package. This README is the discoverable e2e entry point named by ADR-0001.

Directories

Path Synopsis
Command exampletool is the consumer program clix's end-to-end suite builds and runs as a subprocess.
Command exampletool is the consumer program clix's end-to-end suite builds and runs as a subprocess.

Jump to

Keyboard shortcuts

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