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

Function insertIntegration

packages/core/sdk/src/platform-view.test.ts:139–160  ·  view source on GitHub ↗
(db: SqliteTestFumaDb, slug: string)

Source from the content-addressed store, hash-verified

137 * the call returns success having touched no storage, which would make a
138 * read-only assertion vacuous. */
139const insertIntegration = (db: SqliteTestFumaDb, slug: string): Effect.Effect<void> =>
140 Effect.promise(async () => {
141 await db.client.execute({
142 sql: `INSERT INTO integration (
143 row_id, tenant, slug, plugin_id, name, description, config, can_remove,
144 can_refresh, created_at, updated_at
145 ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,
146 args: [
147 `i-${slug}`,
148 TENANT,
149 slug,
150 "demo",
151 slug,
152 null,
153 JSON.stringify({}),
154 1,
155 0,
156 Date.now(),
157 Date.now(),
158 ],
159 });
160 });
161
162/** Seed two users and an org connection under `t1`, plus an untouchable other
163 * tenant. Subjects go in through `touchSubject` (the only legitimate writer);

Callers 1

Calls 1

executeMethod · 0.65

Tested by

no test coverage detected