Doctor E2E
The kadaikodi-doctor repository contains backend end-to-end tests that exercise the Kadaikodi workspace microservice (wspace-kadaikodi-svc) through the public workspaces GraphQL gateway.
Purpose
- Smoke / health probes
- Per-domain CRUD tests (providers, offerings, orders, workers, investments, reviews)
- End-to-end marketplace story tests
- IDOR regression checks via the internal gateway (local only)
Repository
github.com/algoshred/kadaikodi-doctor
Target environments
The suite defaults to production GraphQL gateway. Select a different target with the KADAIKODI_TARGET environment variable.
| Target | Public gateway default |
|---|---|
local | http://localhost:4003/workspaces/graphql |
alpha | https://alphagraphqlworkspaces.burdenoff.com/workspaces/graphql |
prod | https://graphqlworkspaces.burdenoff.com/workspaces/graphql |
Resolution precedence:
KADAIKODI_ENDPOINTE2E_WSPACE_PUBLIC_GATEWAYKADAIKODI_TARGETcanonical default
The internal/M2M gateway can be overridden with KADAIKODI_INTERNAL_ENDPOINT or WSPACE_INT_GATEWAY_URL. Internal-gateway IDOR checks run only against the local M2M gateway; they are skipped on alpha/prod because the internal gateway is not externally reachable.
Running locally
For KADAIKODI_TARGET=local, the suite sources the shared E2E environment from workspaces-doctor:
source /home/ubuntu/products/workspaces/workspaces-doctor/core/env/e2e-env.sh
make test-all
The local Burdenoff stack must be running so that:
- The workspaces public gateway is reachable at
http://localhost:4003/workspaces/graphql - The internal workspace gateway is reachable at
http://localhost:4001/workspaces/graphql - The
wspace-kadaikodi-svcservice is healthy athttp://localhost:3738/health
Running against alpha
Alpha endpoints are gated by Cloudflare Access. Provide a service token plus the alpha test user's workspace credentials:
export KADAIKODI_TARGET=alpha
export AUTH_TOKEN="<alpha-user-jwt>"
export WORKSPACE_TOKEN="<alpha-workspace-jwt>"
export WORKSPACE_ID="<alpha-workspace-id>"
export USER_ID="<alpha-user-id>"
export ORG_ID="<alpha-org-id>"
export CF_ACCESS_CLIENT_ID="<cf-access-client-id>"
export CF_ACCESS_CLIENT_SECRET="<cf-access-client-secret>"
make test-all
Running against production
export KADAIKODI_TARGET=prod
export AUTH_TOKEN="<prod-user-jwt>"
export WORKSPACE_TOKEN="<prod-workspace-jwt>"
export WORKSPACE_ID="<prod-workspace-id>"
export USER_ID="<prod-user-id>"
export ORG_ID="<prod-org-id>"
make test-all
Available targets
make help # Show all targets
make test-all # Run all module tests + story
make test-health # Smoke/health probe only
make test-core
make test-providers
make test-offerings
make test-orders
make test-workers
make test-investments
make test-reviews
make test-search
make test-self-service
make test-story
What is covered
test-kadaikodi.sh
- Core:
kadaikodiHealth - Providers: create, verify, get, list, worker list
- Offerings: create, list, update, delete
- Orders: place, status transitions, get, list
- Workers: register worker, create/update/complete task, clock in/out, schedules, stats
- Investments: create opportunity, invest, list investments/opportunities
- Reviews: create, list, respond
- Search:
globalSearchindexing round-trip for providers/offerings - Self-service: saved addresses, saved payment methods, favorites — each with an IDOR regression check via the internal gateway when running locally
- Analytics: dashboard stats and admin analytics
test-kadaikodi-story.sh
A single story-level flow covering the Kadaikodi marketplace lifecycle.
Notes
- This repo intentionally does not copy the
core/envbootstrap machinery fromworkspaces-doctor; it sources the shared environment file at runtime for local runs - Tests are written in bash/jq/curl to match the conventions of
workspaces-doctor - No global module tests are included because Kadaikodi's backend functionality is implemented as a workspace module (
wspace-kadaikodi-svc)