Doctor E2E
Backend end-to-end tests for the SemanticFed product. This repository exercises the product's federated GraphQL surface through the workspaces public gateway.
- Repository: github.com/algoshred/semanticfed-doctor
What is tested
-
Story / smoke test (
story-semantic-model.sh) — a full lifecycle walkthrough: register a connector, bind a data source, author a semantic model with entities/dimensions/metrics, define a relationship, author/publish/run a saved federated query, attach an access policy, and clean up. -
CRUDL backend suite (
test-semanticfed.sh) — per-module GraphQL tests covering:health—semHealthliveness probeconnector— connectors (create, list, read, update, archive)datasource— data sources (create, list, read, update, transition, connection probes, archive)model— semantic models (create, list, read, update, publish, archive)entity— entities, dimensions, metrics, relationshipsquery— saved federated queries (create, list, read, update, publish, run, archive)policy— access policies (create, list, toggle active)
Target environments
The suite defaults to production. Use SEMANTICFED_TARGET to switch:
| Target | Resolved workspaces public gateway |
|---|---|
local | http://localhost:4003/workspaces/graphql |
alpha | https://alphagraphqlworkspaces.burdenoff.com/workspaces/graphql |
prod | https://graphqlworkspaces.burdenoff.com/workspaces/graphql (default) |
Endpoint resolution order:
SEMANTICFED_ENDPOINTE2E_WSPACE_PUBLIC_GATEWAY- Canonical default for the selected
SEMANTICFED_TARGET
Running against local backends
Local runs automatically source /home/ubuntu/products/workspaces/workspaces-doctor/core/env/e2e-env.sh for tokens.
make test-all SEMANTICFED_TARGET=local
Running against alpha
Alpha endpoints are gated by Cloudflare Access. Provide a service token:
export CF_ACCESS_CLIENT_ID=<alpha-access-client-id>
export CF_ACCESS_CLIENT_SECRET=<alpha-access-client-secret>
export AUTH_TOKEN=<platform-jwt>
export WORKSPACE_TOKEN=<workspace-jwt>
export WORKSPACE_ID=<workspace-uuid>
export USER_ID=<user-uuid>
make test-all SEMANTICFED_TARGET=alpha
Running against production
export AUTH_TOKEN=<platform-jwt>
export WORKSPACE_TOKEN=<workspace-jwt>
export WORKSPACE_ID=<workspace-uuid>
export USER_ID=<user-uuid>
make test-all
# or explicitly
make test-all SEMANTICFED_TARGET=prod
Running tests
Story / smoke test
make test
# or
make test-story
Full CRUDL backend suite
make test-all
Individual sub-modules
make test-health
make test-connector
make test-datasource
make test-model
make test-entity
make test-query
make test-policy
Or invoke the script directly:
./wspace/modules/semanticfed/scripts/test-semanticfed.sh all
./wspace/modules/semanticfed/scripts/test-semanticfed.sh model
Environment variables
| Variable | Default | Purpose |
|---|---|---|
SEMANTICFED_TARGET | prod | Target environment (local, alpha, prod) |
SEMANTICFED_ENDPOINT | resolved from target | Workspaces public gateway URL |
E2E_WSPACE_PUBLIC_GATEWAY | — | Alternate endpoint override |
AUTH_TOKEN | $E2E_AUTH_TOKEN | Platform identity JWT |
WORKSPACE_TOKEN | $E2E_WORKSPACE_TOKEN | Workspace access JWT |
WORKSPACE_ID | $E2E_WORKSPACE_ID | Active workspace |
USER_ID | $E2E_USER_ID | Acting user |
CF_ACCESS_CLIENT_ID | — | Cloudflare Access client ID for alpha |
CF_ACCESS_CLIENT_SECRET | — | Cloudflare Access client secret for alpha |
Notes
- This repo sources
/home/ubuntu/products/workspaces/workspaces-doctor/core/env/e2e-env.shautomatically for local runs. - For alpha/prod runs, tokens must be exported explicitly or inherited from the parent environment.
- Permission/RBAC errors are reported as SKIP (not FAIL) so the suite can run with a workspace identity that lacks every governance grant.
- Created records are cleaned up via archive/delete mutations within each flow.
License
Proprietary — Burdenoff Consultancy Services Pvt. Ltd.