MCPcopy
hub / github.com/subquery/subql / deployTestProject

Function deployTestProject

packages/cli/src/controller/deploy-controller.test.ts:31–74  ·  view source on GitHub ↗
(
  validator: ValidateDataType,
  ipfs: string,
  org: string,
  project_name: string,
  testAuth: string,
  url: string
)

Source from the content-addressed store, hash-verified

29};
30
31async function deployTestProject(
32 validator: ValidateDataType,
33 ipfs: string,
34 org: string,
35 project_name: string,
36 testAuth: string,
37 url: string
38): Promise<DeploymentDataType> {
39 const indexerV = await imageVersions(
40 validator.manifestRunner!.node.name,
41 validator.manifestRunner!.node.version,
42 testAuth,
43 url
44 );
45 const queryV = await imageVersions(
46 validator.manifestRunner!.query.name,
47 validator.manifestRunner!.query.version,
48 testAuth,
49 url
50 );
51
52 const endpoint = 'wss://polkadot.api.onfinality.io/public-ws';
53
54 const project: V3DeploymentIndexerType = {
55 cid: ipfs,
56 endpoint,
57 indexerImageVersion: indexerV[0],
58 indexerAdvancedSettings: {
59 indexer: {},
60 },
61 };
62
63 return createDeployment(
64 org,
65 project_name,
66 testAuth,
67 ipfs,
68 queryV[0],
69 projectSpec.type as DeploymentType,
70 {},
71 [project],
72 url
73 );
74}
75
76// Replace/Update your access token when test locally
77const testAuth = process.env.SUBQL_ACCESS_TOKEN!;

Callers 1

Calls 2

imageVersionsFunction · 0.90
createDeploymentFunction · 0.90

Tested by

no test coverage detected