Skip to main content

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.

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 — semHealth liveness probe
    • connector — 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, relationships
    • query — 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:

TargetResolved workspaces public gateway
localhttp://localhost:4003/workspaces/graphql
alphahttps://alphagraphqlworkspaces.burdenoff.com/workspaces/graphql
prodhttps://graphqlworkspaces.burdenoff.com/workspaces/graphql (default)

Endpoint resolution order:

  1. SEMANTICFED_ENDPOINT
  2. E2E_WSPACE_PUBLIC_GATEWAY
  3. 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​

VariableDefaultPurpose
SEMANTICFED_TARGETprodTarget environment (local, alpha, prod)
SEMANTICFED_ENDPOINTresolved from targetWorkspaces public gateway URL
E2E_WSPACE_PUBLIC_GATEWAY—Alternate endpoint override
AUTH_TOKEN$E2E_AUTH_TOKENPlatform identity JWT
WORKSPACE_TOKEN$E2E_WORKSPACE_TOKENWorkspace access JWT
WORKSPACE_ID$E2E_WORKSPACE_IDActive workspace
USER_ID$E2E_USER_IDActing 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.sh automatically 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.