MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / upstreamSpec

Function upstreamSpec

e2e/cloud/telemetry-contract.test.ts:33–56  ·  view source on GitHub ↗
(baseUrl: string)

Source from the content-addressed store, hash-verified

31/** Two operations: /ok answers 200, /fail answers 502 — the success and
32 * expected-upstream-failure outcome classes the telemetry must separate. */
33const upstreamSpec = (baseUrl: string): string =>
34 JSON.stringify({
35 openapi: "3.0.3",
36 info: { title: "Telemetry Upstream", version: "1.0.0" },
37 servers: [{ url: baseUrl }],
38 paths: {
39 "/ok": {
40 get: {
41 operationId: "ok",
42 summary: "Succeeds",
43 tags: ["probe"],
44 responses: { "200": { description: "" } },
45 },
46 },
47 "/fail": {
48 get: {
49 operationId: "fail",
50 summary: "Always 502",
51 tags: ["probe"],
52 responses: { "200": { description: "" } },
53 },
54 },
55 },
56 });
57
58/** A real upstream on 127.0.0.1: /ok → 200 JSON, anything else → 502 JSON. */
59const serveUpstream = Effect.acquireRelease(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected