UNPKG

1.59 kBJavaScriptView Raw
1"use strict";
2
3var _child_process = require("child_process");
4
5var _path = _interopRequireDefault(require("path"));
6
7var _shelljs = require("shelljs");
8
9var _clusterConfigSettingsUtils = require("./clusterConfigSettingsUtils");
10
11var _consoleApplication = require("./Commons/consoleApplication");
12
13var _pathUtils = require("./Commons/pathUtils");
14
15function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
17(0, _consoleApplication.runConsoleApplication)(async () => {
18 const pathToCandyApiExecutableDir = await (0, _pathUtils.findPathToCandyApi)(__dirname);
19 const pathToCandyApiSources = await (0, _pathUtils.findPathToCandyApiSources)(__dirname);
20 (0, _shelljs.cp)("-R", _path.default.join(pathToCandyApiSources, "settings/Candy.defaultLocal/*"), pathToCandyApiExecutableDir);
21
22 const candyApiConfigPath = _path.default.join(pathToCandyApiExecutableDir, "settings", "candy.api", "config");
23
24 await (0, _clusterConfigSettingsUtils.updateClusterConfigConfigurationFile)(candyApiConfigPath, {
25 ResourcesPath: _path.default.join(__dirname, "..", "Tests", "TestForms", "TestResources"),
26 ResourcesDefaultPath: _path.default.join(__dirname, "..", "Tests", "TestForms", "TestResources"),
27 ResourcesBuildServerUri: "http://localhost:9000",
28 UseTestClassification: "true",
29 KonturDomains: "*|*:*"
30 });
31 (0, _child_process.spawn)(_path.default.join(pathToCandyApiExecutableDir, "Candy.Api.exe"), [], {
32 cwd: pathToCandyApiExecutableDir,
33 shell: true,
34 detached: true
35 });
36});
37//# sourceMappingURL=startApiForTestFarmTests.js.map
\No newline at end of file