MCPcopy Index your code
hub / github.com/apache/devlake / test

Function test

config-ui/src/api/connection/index.ts:39–59  ·  view source on GitHub ↗
(
  plugin: string,
  connectionId: ID,
  payload?: Partial<
    Pick<
      IConnectionAPI,
      | 'endpoint'
      | 'authMethod'
      | 'username'
      | 'password'
      | 'token'
      | 'appId'
      | 'secretKey'
      | 'proxy'
      | 'dbUrl'
      | 'companyId'
      | 'organization'
    >
  >,
)

Source from the content-addressed store, hash-verified

37 });
38
39export const test = (
40 plugin: string,
41 connectionId: ID,
42 payload?: Partial<
43 Pick<
44 IConnectionAPI,
45 | 'endpoint'
46 | 'authMethod'
47 | 'username'
48 | 'password'
49 | 'token'
50 | 'appId'
51 | 'secretKey'
52 | 'proxy'
53 | 'dbUrl'
54 | 'companyId'
55 | 'organization'
56 >
57 >,
58): Promise<IConnectionTestResult> =>
59 request(`/plugins/${plugin}/connections/${connectionId}/test`, { method: 'post', data: payload });
60
61export const testOld = (
62 plugin: string,

Callers 1

Calls 1

requestFunction · 0.90

Tested by

no test coverage detected