name: smoke-test description: Run the wasteland smoke test plan against a freshly built wl binary
Smoke Test Runner
Execute the smoke tests defined in test/smoke/TESTPLAN.md.
Instructions
Read the test plan. Read
test/smoke/TESTPLAN.mdfrom the repo root. Parse each numbered## Test N:section. Each section has shell commands in fenced code blocks and expected output markers in Expected lines.Build. Run
make buildfrom the repo root. Fail immediately if the build fails.Set up PATH. Put
bin/(from the repo root) at the front ofPATHso the freshly builtwlbinary is used.Set
REPO_ROOT. ExportREPO_ROOTpointing to the repository root so test commands that reference$REPO_ROOT(e.g., schema file paths) resolve correctly.Isolate each test. For every test section, create a fresh temp directory and export:
XDG_DATA_HOME=$tmpdir/dataXDG_CONFIG_HOME=$tmpdir/configHOME=$tmpdir/homeDOLT_ROOT_PATH=$tmpdir/home
Create
$HOME/.dolt/config_global.jsonwith:{"user.name":"smoke-test","user.email":"smoke@test.local","user.creds":""}This ensures real user config/data is never touched and each test starts from a clean slate.
Execute tests sequentially. For each
## Test N:section:- Run each fenced code block as a bash command.
- For blocks preceded by an Expected marker, check:
- "exits non-zero": the command must return a non-zero exit code.
- "exits successfully": the command must return exit code 0.
- "contains:
<text>" or "Expected output contains:<text>": stdout+stderr must contain the specified text (case-sensitive substring match). - "Expected:
N" (a bare number): stdout must contain that exact value (used forgrep -cchecks).
- If
$ITEM_IDis referenced, capture it from thewl postoutput by extracting thew-<hex>pattern (regex:w-[0-9a-f]+). - Print
PASS: Test N — <title>on success. - Print
FAIL: Test N — <title>on failure with the actual output, then stop immediately (do not continue to later tests).
Skip Test 8 (
go installverification) — it requires a pushed tag and network access. PrintSKIP: Test 8 — go install verification.Print summary. After all tests, print a summary line:
Smoke tests: X passed, Y failed, Z skippedClean up. Remove all temp directories created during the run.
Important details
- Do NOT hardcode test content — always read
test/smoke/TESTPLAN.mdas the source of truth. If the plan file changes, the tests change automatically. - The file provider (
--remote-base) uses local filesystem paths, no network. - Test 5 hides dolt from PATH by creating a temp bin directory containing only
the
wlbinary and settingPATHto that single directory. Do NOT usegrep -v doltto filter PATH — dolt is typically in a shared directory like/usr/local/binthat won't be filtered by name. - Test 6 upstream setup requires a proper dolt remote store: init a working
directory, apply schema via
DOLT_ADD/DOLT_COMMITstored procedures, then push to afile://store directory. A baredolt initdirectory is NOT a valid remote store. - When running
dolt sqlto verify database contents,cdinto the database directory first — dolt does not support a-dflag. Use-r csv(not--result-format csv) for output format. - Test 6 requires
dolton PATH. If dolt is not available, fail with a clear message rather than producing confusing errors. - Use
--no-pushon mutation commands (post, claim, done) in Test 6 since the file provider may not support push in all configurations. dolt initneedsHOMEandDOLT_ROOT_PATHset to the temp home dir, or it will try to write to the real home directory.- Items posted with
--no-pushstay in the local fork only.wl browseclones from upstream, so posted items may not appear in browse output. This is correct behavior — verify the post via itsITEM_IDusingwl statusinstead.