mirror of
https://github.com/logseq/logseq.git
synced 2026-05-13 23:42:19 +00:00
cli-e2e
Shell-first end-to-end tests for logseq CLI.
Test cli-e2e itself
- Run internal cli-e2e harness unit tests:
bb unit-test
cleanup first
- Execute cleanup: terminate stale db-worker-node processes and remove cli-e2e temp graph directories:
bb cleanup - Preview cleanup actions only (no kill/delete):
bb cleanup --dry-run
Run non-sync suite
- List declared non-sync case ids:
bb list-cases - Run non-sync cases with build preflight unless
--skip-buildis provided:bb testbb test --helpfor options- Increase case-level parallelism with
--jobs N(default:4), for example:bb test --skip-build --jobs 4 - Parallelism is case-scoped only; each case still runs setup/main/cleanup sequentially in the existing ephemeral shell model
Run sync suite
- List declared sync case ids:
bb list-sync-cases - Run sync cases with build preflight unless
--skip-buildis provided:bb test-syncbb test-sync --helpfor options--jobsis accepted for CLI consistency but sync cases still run serially- Configure sync E2EE password:
--e2ee-password <value>(default:11111) - Run only sync MVP case:
bb test-sync --skip-build --case sync-upload-download-mvp
Sync suite prerequisites
- CLI auth file must exist at
~/logseq/auth.json(generated bylogseq login). - Sync suite starts/stops a local db-sync server inside the test case.
- Required build artifact for local db-sync server:
deps/db-sync/worker/dist/node-adapter.js
- If artifact is missing, build it before running sync suite:
yarn --cwd deps/db-sync build:node-adapter