@api-emulator/crusoe
v0.2.2
Published
Crusoe Cloud provides cloud infrastructure APIs for projects, GPU instance types, virtual machines, SSH keys, and operations.
Readme
@api-emulator/crusoe
Crusoe Cloud provides cloud infrastructure APIs for projects, GPU instance types, virtual machines, SSH keys, and operations.
Use this emulator for local tests, CI, and offline agent runs. It keeps your tests separate from the production API.
Start the emulator
- Install the package.
npm install @api-emulator/crusoe- From this registry, start the emulator.
npx -p api-emulator api --plugin ./providers/@crusoe/api-emulator.mjs --service crusoeThe emulator uses the local URL that api-emulator prints. Set your client base URL to this local URL.
Supported API
GET /v1alpha5/featureflagsGET /v1alpha5/projectsGET /v1alpha5/organizations/projectsGET /v1alpha5/projects/:project_idGET /v1alpha5/locationsGET /v1alpha5/instance-typesGET /v1alpha5/projects/:project_id/instancesGET /v1alpha5/projects/:project_id/compute/vmsGET /v1alpha5/compute/vmsPOST /v1alpha5/projects/:project_id/instancesGET /v1alpha5/projects/:project_id/instances/:instance_idPATCH /v1alpha5/projects/:project_id/instances/:instance_idDELETE /v1alpha5/projects/:project_id/instances/:instance_idGET /v1alpha5/projects/:project_id/ssh-keysPOST /v1alpha5/projects/:project_id/ssh-keysGET /v1alpha5/operations/:operation_idGET /crusoe/inspect/state
Coverage
- Level:
smoke-only - Meaning: A smoke test starts the emulator and checks its main behavior.
- Evidence: a direct smoke test exists, but a conformance manifest does not exist.
Credentials
You do not need production credentials. Use fixed local credentials if your client requires them.
Test data
Add repeatable test data to the provider configuration.
crusoe:
# Add provider-specific seed state here.