Phase 2 — Compute
Jennifer's deliverable: Review the 12 compute test specs below. Walk the engineer through the
create → operate → delete lifecycle. Explain what each negative test (tests 14, 15, 17) is
checking and why the error code matters, not just the fact of failure.
Engineer builds: 03-compute.spec.ts (tests 11–22)
Gate: All 22 tests pass (Phase 1 + Phase 2). Cleanup is verified: after the run, no
smoke-vm-* resources remain in the test project.
Compute — 03-compute.spec.ts — tags: @compute @smoke
The spec creates smoke-vm-01 in beforeAll, runs all operation tests against it, then deletes
it in afterAll. Tests 14, 15, 17 are negative tests — they must return an error, not a 200.
# | Test name | Method | Endpoint | Pass condition
-- | -- | -- | -- | --
11 | list all VMs | GET | /virtual-machines | HTTP 200, array
12 | list VMs filtered by project | GET | /virtual-machines?project=smoke-tests | HTTP 200, array
13 | create VM with valid payload | POST | /virtual-machines | HTTP 200/201, data.slug present, data.state present
14 | create VM missing required field | POST | /virtual-machines (no name) | HTTP 400/422, status=Error
15 | create VM with duplicate name | POST | /virtual-machines (name already exists) | HTTP 409/422, status=Error
16 | get VM by slug | GET | /virtual-machines/smoke-vm-01 | HTTP 200, data.slug=smoke-vm-01
17 | get VM with unknown slug | GET | /virtual-machines/does-not-exist | HTTP 404, status=Error
18 | stop VM | PUT | /virtual-machines/smoke-vm-01/stop | HTTP 200, status=Success
19 | start VM | PUT | /virtual-machines/smoke-vm-01/start | HTTP 200, status=Success
20 | reboot VM | PUT | /virtual-machines/smoke-vm-01/reboot | HTTP 200, status=Success
21 | get VM console URL | GET | /virtual-machines/smoke-vm-01/console | HTTP 200, data.url is a non-empty string
22 | delete VM | DELETE | /virtual-machines/smoke-vm-01 | HTTP 200/204, status=Success
Note on lifecycle order: Tests 18–20 (stop → start → reboot) are order-dependent within this
spec. Run them sequentially, not in parallel. The VM must be running before stop, stopped before
start, running before reboot.
Phase 2 — Compute
Jennifer's deliverable: Review the 12 compute test specs below. Walk the engineer through the
create → operate → delete lifecycle. Explain what each negative test (tests 14, 15, 17) is
checking and why the error code matters, not just the fact of failure.
Engineer builds:
03-compute.spec.ts(tests 11–22)Gate: All 22 tests pass (Phase 1 + Phase 2). Cleanup is verified: after the run, no
smoke-vm-*resources remain in the test project.Compute —
03-compute.spec.ts— tags:@compute @smokeThe spec creates
# | Test name | Method | Endpoint | Pass condition -- | -- | -- | -- | -- 11 | list all VMs | GET | /virtual-machines | HTTP 200, array 12 | list VMs filtered by project | GET | /virtual-machines?project=smoke-tests | HTTP 200, array 13 | create VM with valid payload | POST | /virtual-machines | HTTP 200/201, data.slug present, data.state present 14 | create VM missing required field | POST | /virtual-machines (no name) | HTTP 400/422, status=Error 15 | create VM with duplicate name | POST | /virtual-machines (name already exists) | HTTP 409/422, status=Error 16 | get VM by slug | GET | /virtual-machines/smoke-vm-01 | HTTP 200, data.slug=smoke-vm-01 17 | get VM with unknown slug | GET | /virtual-machines/does-not-exist | HTTP 404, status=Error 18 | stop VM | PUT | /virtual-machines/smoke-vm-01/stop | HTTP 200, status=Success 19 | start VM | PUT | /virtual-machines/smoke-vm-01/start | HTTP 200, status=Success 20 | reboot VM | PUT | /virtual-machines/smoke-vm-01/reboot | HTTP 200, status=Success 21 | get VM console URL | GET | /virtual-machines/smoke-vm-01/console | HTTP 200, data.url is a non-empty string 22 | delete VM | DELETE | /virtual-machines/smoke-vm-01 | HTTP 200/204, status=Successsmoke-vm-01inbeforeAll, runs all operation tests against it, then deletesit in
afterAll. Tests 14, 15, 17 are negative tests — they must return an error, not a 200.Note on lifecycle order: Tests 18–20 (stop → start → reboot) are order-dependent within this
spec. Run them sequentially, not in parallel. The VM must be running before stop, stopped before
start, running before reboot.