Testing
lawn-validate is available to users taking part in our private alpha as a standalone tool. These commands will be integrated into the CLI as lawn template validate and lawn template test in a future release.lawn-validate test tests a template end-to-end. It spins up an isolated container engine, pulls all images, creates a test instance with dynamic ports, starts it, and runs every configured health check. When the test finishes, it tears everything down automatically.
lawn-validate test <template-id>
| Option | Description |
|---|---|
--timeout <seconds> | Timeout for the entire test (default: 300) |
--validate-only | Only validate the manifest, skip image pulling and container startup |
--keep-instance | Keep the test instance after completion for debugging |
--validate-config <path> | Path to a YAML file with env var overrides |
--output <format> | Output format: text (default) or json |
What a test run does
- Validates the manifest and compose files
- Pulls all container images
- Allocates free ports dynamically to avoid conflicts
- Creates a test instance with generated credentials
- Starts the instance and waits for containers to be ready
- Runs all health checks (HTTP and command-based)
- Cleans up the test instance and shuts down the engine
# Test a simple template
lawn-validate test whoami
# Test with a longer timeout
lawn-validate test immich --timeout 600
# Keep the instance running after the test for manual inspection
lawn-validate test jellyfin --keep-instance
Templates with required variables
Templates that declare userProvided variables (like admin passwords or API tokens) cannot start without credentials. By default, lawn-validate test skips container startup for these templates — it still validates the manifest and pulls images.
To run the full test, provide a validate config file:
# secrets.yaml (never commit this file)
env:
RUNNER_TOKEN: "ghp_xxxxxxxxxxxx"
REPO_URL: "https://github.com/your-org/your-repo"
lawn-validate test github-actions-runner --validate-config secrets.yaml
You can also place a validate.yaml file directly in the template's catalog directory. It's in .gitignore and is picked up automatically during local development.
Listing templates
lawn-validate list shows all bundled templates:
lawn-validate list