Doctor (E2E Testing)
workspaces-doctor is the backend E2E test suite for the Burdenoff Workspaces platform. It focuses on GraphQL/curl backend coverage for workspace and global subgraphs through the public gateways.
Repo structure
workspaces-doctor/
├── Makefile # Root test orchestration
├── README.md
├── core/scripts/common.sh # Shared E2E utilities
├── core/env/ # Environment files (local only)
├── wspace/modules/ # Workspace-layer E2E suites
├── global/modules/ # Global-layer E2E suites
├── load/ # k6 load testing scenarios
└── logs/ # Test output logs
Environment selection
The suite defaults to production endpoints. Select the target environment with WORKSPACES_TARGET or E2E_TARGET_ENV:
| Target | Variable | Workspace gateway | Global gateway |
|---|---|---|---|
| local | WORKSPACES_TARGET=local | http://localhost:4003/workspaces/graphql | http://localhost:4000/global/graphql |
| alpha | WORKSPACES_TARGET=alpha | https://alphagraphqlworkspaces.burdenoff.com/workspaces/graphql | https://alphagraphql.burdenoff.com/global/graphql |
| prod | WORKSPACES_TARGET=prod (default) | https://graphqlworkspaces.burdenoff.com/workspaces/graphql | https://graphql.burdenoff.com/global/graphql |
Direct endpoint overrides are also supported:
E2E_WSPACE_PUBLIC_GATEWAY=https://custom.workspaces.example/workspaces/graphql \
E2E_GLOBAL_GATEWAY=https://custom.global.example/global/graphql \
make test-all
Alpha Cloudflare Access
When targeting alpha, provide service-token headers to pass Cloudflare Access:
WORKSPACES_TARGET=alpha \
CF_ACCESS_CLIENT_ID=<id> \
CF_ACCESS_CLIENT_SECRET=<secret> \
AUTH_TOKEN=<token> \
WORKSPACE_TOKEN=<token> \
WORKSPACE_ID=<id> \
USER_ID=<id> \
make test-all
Credentials
For local runs, the shared E2E env file is sourced automatically:
make test-all WORKSPACES_TARGET=local
For alpha/prod runs, credentials must come from the environment. These variables may be overridden:
AUTH_TOKEN(orE2E_AUTH_TOKEN)WORKSPACE_TOKEN(orE2E_WORKSPACE_TOKEN)WORKSPACE_ID(orE2E_WORKSPACE_ID)USER_ID(orE2E_USER_ID)ORG_ID(orE2E_ORG_ID)TENANT_ID(orE2E_TENANT_ID)
How to run tests
Probe gateway health
make test-health
Run everything
make test-all
Run against local services
make test-all WORKSPACES_TARGET=local
Run against alpha
WORKSPACES_TARGET=alpha \
CF_ACCESS_CLIENT_ID=<id> \
CF_ACCESS_CLIENT_SECRET=<secret> \
AUTH_TOKEN=<token> \
WORKSPACE_TOKEN=<token> \
WORKSPACE_ID=<id> \
USER_ID=<id> \
make test-all
Run against prod
WORKSPACES_TARGET=prod \
AUTH_TOKEN=<token> \
WORKSPACE_TOKEN=<token> \
WORKSPACE_ID=<id> \
USER_ID=<id> \
make test-all
Run a specific module suite
make test-wspace-workspace # workspace service suite
make test-wspace-rbac # RBAC suite
make test-wspace-tags # tags suite
make test-wspace-groups # groups suite
make test-wspace-files # files suite
make test-wspace-conversations # conversations suite
make test-global-auth # auth suite
make test-global-users # users suite
make test-global-billing # billing suite
Run load tests
make load-all # all k6 scenarios
make load-auth-signin # auth sign-in scenario
make load-wspace # workspace scenarios
make load-tags # tags CRUD lifecycle
Clean logs and temp artifacts
make logs-clean
make cleanup # full state cleanup (local only)
Notes
- The suite sources
core/scripts/common.shfrom this repo. DOCTOR_ROOTresolves to this repo (~/products/workspaces/workspaces-doctor).- Load tests require k6 installed locally.
Source
- Repository:
github.com/algoshred/workspaces-doctor - Related shared core:
~/products/dev/e2e/core/