Skip to content

Commit efe8a06

Browse files
ret2libcclaude
andcommitted
Document E2E testing in CLAUDE.md, README.md, and Makefile
Add E2E test requirement to critical rules, document the test in both CLAUDE.md and README.md development sections, and add a `make e2e` target. Fix help grep pattern to include digits so `e2e` appears. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 756684b commit efe8a06

3 files changed

Lines changed: 45 additions & 2 deletions

File tree

CLAUDE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Pre-configured cloud-init, Tailscale VPN (enabled by default), and SSH config ma
88
- **Never use `pip`** — always use `uv` for all Python operations
99
- **Always run `prek run`** before committing (or `prek install` to auto-run on commit)
1010
- **Keep README.md in sync** when adding commands or features
11+
- **Run E2E tests before pushing** changes that affect core workflows (create, destroy, SSH config, cloud-init, Tailscale)
1112

1213
## Quick Commands
1314

@@ -35,6 +36,8 @@ dropkit/
3536
│ └── templates/
3637
│ └── default-cloud-init.yaml
3738
└── tests/
39+
├── e2e/
40+
│ └── test_lifecycle.sh # Full create → SSH → destroy E2E test
3841
├── test_api.py
3942
├── test_config.py
4043
├── test_main_helpers.py
@@ -151,6 +154,20 @@ uv run pytest -k "validate_ssh" # Pattern match
151154
uv run pytest -v # Verbose
152155
```
153156

157+
### E2E Testing
158+
159+
The E2E lifecycle test creates a real droplet, verifies SSH connectivity,
160+
and destroys it. **Run before pushing changes that affect core workflows**
161+
(create, destroy, SSH config, cloud-init, Tailscale).
162+
163+
```bash
164+
./tests/e2e/test_lifecycle.sh
165+
```
166+
167+
Requires a valid dropkit config (`~/.config/dropkit/config.yaml`).
168+
Optional environment variables: `DROPLET_NAME`, `DROPLET_REGION`,
169+
`DROPLET_SIZE`, `DROPLET_IMAGE`, `E2E_SSH_TIMEOUT`.
170+
154171
## Pydantic Models
155172

156173
- **`DropkitConfig`** — Root config with `extra='forbid'`

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
.PHONY: help dev lint format test audit
1+
.PHONY: help dev lint format test e2e audit
22

33
help: ## Show available targets
4-
@grep -E '^[a-zA-Z_-]+:.*##' $(MAKEFILE_LIST) | awk -F ':.*## ' '{printf " %-12s %s\n", $$1, $$2}'
4+
@grep -E '^[a-zA-Z0-9_-]+:.*##' $(MAKEFILE_LIST) | awk -F ':.*## ' '{printf " %-12s %s\n", $$1, $$2}'
55

66
dev: ## Install all dependencies
77
uv sync --all-groups
@@ -15,5 +15,8 @@ format: ## Auto-format code
1515
test: ## Run tests
1616
uv run pytest
1717

18+
e2e: ## Run E2E lifecycle test (creates a real droplet)
19+
./tests/e2e/test_lifecycle.sh
20+
1821
audit: ## Audit dependencies for vulnerabilities
1922
uv run pip-audit

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,29 @@ The droplet might belong to someone else. List your droplets:
217217
dropkit list
218218
```
219219

220+
## Development
221+
222+
### Running Unit Tests
223+
224+
```bash
225+
uv run pytest # All tests
226+
uv run pytest -v # Verbose output
227+
uv run pytest -k "pattern" # Filter by name
228+
```
229+
230+
### Running E2E Tests
231+
232+
The E2E lifecycle test creates a real droplet, verifies SSH connectivity,
233+
and destroys it. Run before pushing changes that affect core workflows.
234+
235+
```bash
236+
./tests/e2e/test_lifecycle.sh
237+
```
238+
239+
Requires a valid dropkit config (`~/.config/dropkit/config.yaml`).
240+
Optional environment variables: `DROPLET_NAME`, `DROPLET_REGION`,
241+
`DROPLET_SIZE`, `DROPLET_IMAGE`, `E2E_SSH_TIMEOUT`.
242+
220243
## Technology Stack
221244

222245
- **CLI Framework**: [Typer](https://typer.tiangolo.com/) - Modern CLI framework

0 commit comments

Comments
 (0)