Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

next
md 45 lines 1.37 KB
Rendered Raw
1 # Docker CLI E2E Tests
2
3 ## Architecture
4
5 CLI E2E tests run the compiled standalone `composio` binary inside scratch Debian Docker containers.
6
7 Key properties:
8
9 - Each suite lives under `ts/e2e-tests/cli/<suite-name>/`.
10 - Each suite has `e2e.test.ts` and `package.json`.
11 - Each command call runs in a fresh container.
12 - Runtime shell is POSIX `sh`.
13 - `HOME=/tmp`; auth and API state must come from env vars or command setup.
14 - stdout is not a TTY, so piped-mode output rules apply.
15
16 A test that needs several commands to share state (log in, then link, then execute) uses a journey container instead: `startJourneyContainer` from `@e2e-tests/utils`, or `startCliRig` from `@e2e-tests/cli-fake-backend/rig` when the commands need a backend. See `ts/e2e-tests/cli/operations/README.md` for the fault catalogue those suites implement and `ts/e2e-tests/cli/fake-backend/README.md` for what the fake backend does and does not verify.
17
18 ## Package Template
19
20 ```json
21 {
22 "name": "@e2e-tests/cli-<suite-name>",
23 "version": "0.0.0",
24 "private": true,
25 "type": "module",
26 "scripts": {
27 "typecheck": "tsc --noEmit",
28 "test:e2e": "bun test e2e.test.ts",
29 "test:e2e:cli": "bun test e2e.test.ts"
30 },
31 "devDependencies": {
32 "@e2e-tests/utils": "workspace:*"
33 }
34 }
35 ```
36
37 ## Verification
38
39 Run from the repo root:
40
41 ```bash
42 pnpm test:e2e:cli
43 ```
44
45 Use focused Turbo filters when iterating on a single suite.