Skip to main content

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:

TargetVariableWorkspace gatewayGlobal gateway
localWORKSPACES_TARGET=localhttp://localhost:4003/workspaces/graphqlhttp://localhost:4000/global/graphql
alphaWORKSPACES_TARGET=alphahttps://alphagraphqlworkspaces.burdenoff.com/workspaces/graphqlhttps://alphagraphql.burdenoff.com/global/graphql
prodWORKSPACES_TARGET=prod (default)https://graphqlworkspaces.burdenoff.com/workspaces/graphqlhttps://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 (or E2E_AUTH_TOKEN)
  • WORKSPACE_TOKEN (or E2E_WORKSPACE_TOKEN)
  • WORKSPACE_ID (or E2E_WORKSPACE_ID)
  • USER_ID (or E2E_USER_ID)
  • ORG_ID (or E2E_ORG_ID)
  • TENANT_ID (or E2E_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.sh from this repo.
  • DOCTOR_ROOT resolves 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/

Next steps​