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

Function registerIntegration

e2e/selfhost/admin-users-console.test.ts:49–67  ·  view source on GitHub ↗
(client: Client, label = "admin-ui-sh")

Source from the content-addressed store, hash-verified

47});
48
49const registerIntegration = (client: Client, label = "admin-ui-sh") =>
50 Effect.gen(function* () {
51 const slug = IntegrationSlug.make(`${label}-${randomBytes(4).toString("hex")}`);
52 yield* client.openapi.addSpec({
53 payload: {
54 spec: { kind: "blob", value: pingSpec },
55 slug,
56 baseUrl: "http://127.0.0.1:59999", // never contacted during registration
57 authenticationTemplate: [
58 {
59 slug: "apiKey",
60 type: "apiKey",
61 headers: { authorization: ["Bearer ", { type: "variable", name: "token" }] },
62 },
63 ],
64 },
65 });
66 return slug;
67 });
68
69scenario(
70 "Admin · a self-hosted owner sees the workspace's users; an invited member is refused",

Callers 1

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected