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 42 lines 1.37 KB
Rendered Raw
1 # Node.js File Upload Round-Trip Integrity Test
2
3 Verifies that `@composio/core` can upload a file and download it back without corruption.
4
5 ## Why This Exists
6
7 This suite is meant to catch regressions where file content is altered during upload (for example, sending base64 text instead of raw bytes).
8
9 It performs a real round-trip:
10
11 - Upload deterministic binary bytes via the SDK
12 - Download the uploaded object back
13 - Verify **size** and **SHA-256 checksum** match the original bytes
14
15 ## What It Tests
16
17 | Test | Description |
18 | --------- | -------------------------------------------------------------------- |
19 | Upload | Uploads a deterministic binary payload via `composio.files.upload()` |
20 | Download | Downloads the uploaded object back from storage |
21 | Integrity | Compares byte length and SHA-256 checksum |
22
23 ## Requirements
24
25 This suite requires a real API key.
26
27 - `COMPOSIO_API_KEY` (**required**) – Composio API key
28 - `COMPOSIO_BASE_URL` (optional) – override backend base URL
29
30 If `COMPOSIO_API_KEY` is not set, the suite is skipped.
31
32 ## Isolation Tool
33
34 **Docker** with Node.js versions: 22.23.5, 24.22.3, 26.13.1.
35
36 This ensures the behavior is tested against specific Node.js versions independent of the developer's local setup.
37
38 ## Running
39
40 ```bash
41 pnpm test:e2e
42 ```