Files
testing/readme.md
T

42 lines
1.6 KiB
Markdown
Raw Normal View History

2026-04-28 19:47:21 +00:00
# serve.zone Testing
Whole-system integration scenarios for serve.zone components.
Fast package tests stay in each component repo. This repo is for stateful cross-component tests that need Docker, Swarm, Cloudly, Coreflow, registry behavior, and later Coretraffic routing.
## Scenarios
- `registry-deploy-on-push`: starts Cloudly with isolated Mongo/S3 helpers, connects Coreflow as a cluster, pushes a Docker image to Cloudly's built-in registry, verifies Cloudly metadata updates, verifies Coreflow creates the workload service, verifies Coretraffic HTTPS routing, then pushes the same tag again and verifies service recreation and routing through the new digest.
2026-04-29 01:30:21 +00:00
- `onebox-basic-lifecycle`: starts Onebox in dev mode, verifies core services, deploys a workload, checks HTTP plus HTTPS routing through ingress, removes the workload, and verifies cleanup.
2026-04-28 19:47:21 +00:00
## Host Run
Requires Docker with Swarm already active.
```bash
pnpm bootstrap:components
2026-04-29 01:30:21 +00:00
pnpm test
2026-04-28 19:47:21 +00:00
```
## Vagrant Run
Requires Vagrant plus a provider on the host. The Vagrant VM installs Docker, Node.js, pnpm, initializes Docker Swarm, and mounts the full `serve.zone` directory at `/serve.zone`.
```bash
pnpm vagrant:up
pnpm vagrant:test
pnpm vagrant:destroy
```
Provider options:
- VirtualBox: install `vagrant` and `virtualbox` on the host.
- libvirt: install `vagrant`, `libvirt`, and the `vagrant-libvirt` plugin on the host.
Useful environment variables:
- `SERVEZONE_ROOT`: host path mounted as `/serve.zone`.
- `SERVEZONE_VAGRANT_BOX`: defaults to `bento/ubuntu-24.04`.
- `SERVEZONE_VAGRANT_CPUS`: defaults to `4`.
- `SERVEZONE_VAGRANT_MEMORY`: defaults to `8192`.