Restructure integration-test just targets

`just e2e` was the visible-UI runner, but it's only useful for a single test
(and even then only with --sandbox/--slow); running it without arguments is far
too slow, yet it was easy to invoke by reflex when `just e2e-all` (run all
headlessly) was meant.

Make `just e2e` the everyday headless runner: no arguments runs the whole
suite (what e2e-all did), and a test name runs just that one headlessly via
`go test -run` — which we had no target for before. The visible-UI runner moves
to `e2e-cli`, pairing with the existing `e2e-tui` (the two main.go subcommands).
e2e-all is now redundant and removed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Stefan Haller
2026-06-23 13:09:05 +02:00
co-authored by Claude Opus 4.8
parent f3eabb5351
commit 658a66e14b
2 changed files with 20 additions and 8 deletions
+3 -2
View File
@@ -21,8 +21,9 @@ Windows box has only `just`).
- `just format``gofumpt -l -w .`. Run before every commit.
- `just build` — build the binary.
- `just unit-test``go test ./... -short`.
- `just e2e-all` — run all integration tests headlessly (`just e2e <name>` runs a
single one with a visible UI).
- `just e2e` — run all integration tests headlessly; `just e2e <name>` runs a
single one headlessly too. `just e2e-cli <name>` runs one with a visible UI
(most useful with `--sandbox` or `--slow`).
- `just lint` — run golangci-lint.
## When to commit
+17 -6
View File
@@ -23,7 +23,7 @@ unit-test:
# Run both unit tests and integration tests.
[unix]
test: unit-test e2e-all
test: unit-test e2e
# On Windows, integration tests are not supported right now
[windows]
@@ -39,18 +39,29 @@ format:
lint:
./scripts/golangci-lint-shim.sh run
# Run integration tests with a visible UI. Most useful for running a single test; for running all tests, use `e2e-all` instead.
e2e-test-command := "go test pkg/integration/clients/*.go"
# Run integration tests headlessly: no args runs all tests, a test name (or path) runs just that one. Use e2e-cli for a visible UI.
e2e *args:
{{ if args == "" { e2e-test-command } else { \
e2e-test-command + " -run 'TestIntegration/" + \
replace( \
replace_regex( \
replace_regex(args, '\S*pkg/integration/tests/', ''), \
'\.go( |$)', '${1}' \
), \
" ", "$' && " + e2e-test-command + " -run 'TestIntegration/" \
) + "$'" \
} }}
# Run a single integration test with a visible UI; most useful with --sandbox or --slow.
e2e-cli *args:
go run cmd/integration_test/main.go cli {{ args }}
# Open the TUI for running integration tests.
e2e-tui *args:
go run cmd/integration_test/main.go tui {{ args }}
# Run all integration tests headlessly (without a visible UI).
e2e-all:
go test pkg/integration/clients/*.go
# Run some tests on the current commit, similar to what CI does.
check:
./scripts/check_commit.sh