corgi test
corgi test
Run each service's test script in its resolved environment
Synopsis
Run the test script configured for each selected service, in that service's working directory with the same env corgi uses for its start commands. corgi test does NOT start databases or services — that is corgi run's job; with --ensure-deps it only WAITS for already-starting dependencies to be ready.
A service runs if it has a script named "test" in its scripts. Services without one are skipped (not failed). Multi-command test scripts run sequentially and stop on the first non-zero exit.
Examples: corgi test corgi test --service api corgi test --profile backend --json corgi test --ensure-deps
corgi test [flags]
Options
--e2e Run the stack's e2e: block against the already-running stack, instead of
each service's own test script. A suite that drives several services at once
belongs to the stack rather than to any one of them.
--ensure-deps Wait for each service's depends_on_db and depends_on_services to be ready before testing.
--feature string Run every service that has this branch (locally or on origin) from a
worktree for it; services without the branch stay on their current checkout.
For a change spanning several repos that share one branch name. Per-service
flags win over it. Clean up with: corgi worktree prune.
-h, --help help for test
--profile string Narrow to services in this profile (comma-separated for a union) before selecting test scripts.
--ready-timeout duration Max time to wait for dependencies when --ensure-deps is set. (default 15s)
--service string Only run the test script for this service.
--service-branch stringArray Run a service on a git branch via a reused worktree under
corgi_services/.worktrees: --service-branch name=branch (repeatable).
Non-destructive — the main checkout is untouched. Clean up with: corgi worktree prune.
--service-checkout stringArray Run a service on a git branch by checking it out in place:
--service-checkout name=branch (repeatable). Refuses on a dirty tree; leaves the
repo on that branch afterwards.
--service-dir stringArray Override a service's working dir: --service-dir name=/path (repeatable),
e.g. a git worktree. The dir must exist.
Options inherited from parent commands
--describe Describe contents of corgi-compose file
--dockerContext string Specify docker context to use, can be default,orbctl,colima (default "default")
-l, --exampleList List examples to choose from. Click on any example to download it
-f, --filename string Custom filepath for for corgi-compose
--fromScratch Clean corgi_services folder before running
-t, --fromTemplate string Create corgi service from template url
--fromTemplateName string Create corgi service from template name and url
-g, --global Use global path to one of the services
--interactive Force interactive prompts even when no TTY/agent detected
--json Emit machine-readable JSON output
--privateToken string Private token for private repositories to download files
-o, --runOnce Run corgi once and exit
--silent Hide all welcome messages
SEE ALSO
- corgi - Corgi cli magic friend