Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,10 @@ jobs:
NEMOCLAW_CLUSTER_IMAGE: ghcr.io/nvidia/nemoclaw/cluster:${{ inputs.image-tag }}
run: mise run --no-prepare --skip-deps cluster

- name: Install SSH client for Rust CLI e2e tests
run: apt-get update && apt-get install -y --no-install-recommends openssh-client && rm -rf /var/lib/apt/lists/*

- name: Run E2E tests
run: mise run --no-prepare --skip-deps test:e2e:sandbox
run: |
mise run --no-prepare --skip-deps e2e:python
mise run --no-prepare --skip-deps e2e:rust
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

# Build output
/target/
e2e/rust/target/
debug/
release/

Expand Down
39 changes: 30 additions & 9 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ crates/*/src/ # Inline #[cfg(test)] modules
crates/*/tests/ # Rust integration tests
python/navigator/ # Python unit tests (*_test.py suffix)
e2e/python/ # Python E2E tests (test_*.py prefix)
e2e/bash/ # Bash E2E scripts
e2e/rust/ # Rust CLI E2E tests
```

## Rust Tests
Expand Down Expand Up @@ -130,20 +130,41 @@ def test_multiply(sandbox):
| `inference_client` | session | Client for managing inference routes |
| `mock_inference_route` | session | Creates a mock OpenAI-protocol route for tests |

### Bash E2E (`e2e/bash/`)
### Rust CLI E2E (`e2e/rust/`)

Self-contained shell scripts that exercise the CLI directly:
Rust-based e2e tests that exercise the `nemoclaw` CLI binary as a subprocess.
They live in the `nemoclaw-e2e` crate and use a shared harness for sandbox
lifecycle management, output parsing, and cleanup.

- `test_sandbox_sync.sh` — file sync round-trip
- `test_sandbox_custom_image.sh` — custom Docker image build and run
- `test_port_forward.sh` — TCP port forwarding through a sandbox
Tests:

Pattern: `set -euo pipefail`, cleanup via `trap`, poll-based readiness checks
parsing CLI output.
- `tests/custom_image.rs` — custom Docker image build and sandbox run
- `tests/sync.rs` — bidirectional file sync round-trip (including large files)
- `tests/port_forward.rs` — TCP port forwarding through a sandbox

Run all CLI e2e tests:

```bash
mise run e2e:rust
```

Run a single test directly with cargo:

```bash
cargo test --manifest-path e2e/rust/Cargo.toml --features e2e --test sync
```

The harness (`e2e/rust/src/harness/`) provides:

| Module | Purpose |
|---|---|
| `binary` | Builds and resolves the `nemoclaw` binary from the workspace |
| `sandbox` | `SandboxGuard` RAII type — creates sandboxes and deletes them on drop |
| `output` | ANSI stripping and field extraction from CLI output |
| `port` | `wait_for_port()` and `find_free_port()` for TCP testing |

## Environment Variables

| Variable | Purpose |
|---|---|
| `NEMOCLAW_CLUSTER` | Override active cluster name for E2E tests |
| `NAV_BIN` | Override `nemoclaw` binary path in bash E2E tests |
1 change: 1 addition & 0 deletions deploy/docker/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libssl-dev \
openssh-client \
python3 \
python3-venv \
cmake \
Expand Down
253 changes: 0 additions & 253 deletions e2e/bash/test_port_forward.sh

This file was deleted.

Loading
Loading