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

Function registerIntegration

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

Source from the content-addressed store, hash-verified

46});
47
48const registerIntegration = (client: Client, label = "admin-ui-sh") =>
49 Effect.gen(function* () {
50 const slug = IntegrationSlug.make(`${label}-${randomBytes(4).toString("hex")}`);
51 yield* client.openapi.addSpec({
52 payload: {
53 spec: { kind: "blob", value: pingSpec },
54 slug,
55 baseUrl: "http://127.0.0.1:59999", // never contacted during registration
56 authenticationTemplate: [
57 {
58 slug: "apiKey",
59 type: "apiKey",
60 headers: { authorization: ["Bearer ", { type: "variable", name: "token" }] },
61 },
62 ],
63 },
64 });
65 return slug;
66 });
67
68scenario(
69 "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