forked from PlanQK/workflow-modeler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
quantme-config.spec.js
50 lines (46 loc) · 1.78 KB
/
quantme-config.spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { setPluginConfig } from "../../../modeler-component/editor/plugin/PluginConfigHandler";
import { expect } from "chai";
import * as quantmeConfig from "../../../modeler-component/extensions/quantme/framework-config/config-manager";
describe("Test QuantME ConfigManager", function () {
describe("Test QuantME endpoint", function () {
before("Reset QuantME configuration", function () {
quantmeConfig.resetConfig();
});
afterEach("Reset QuantME configuration", function () {
quantmeConfig.resetConfig();
});
it("Should configure QuantME endpoints", function () {
setPluginConfig([
{
name: "quantme",
config: {
nisqAnalyzerEndpoint: "http://test:8098/nisq-analyzer",
transformationFrameworkEndpoint: "http://test:8888",
qiskitRuntimeHandlerEndpoint: "http://test:8889",
awsRuntimeHandlerEndpoint: "http://test:8890",
scriptSplitterEndpoint: "http://test:8891",
scriptSplitterThreshold: 7,
hybridRuntimeProvenance: "true",
},
},
]);
expect(quantmeConfig.getNisqAnalyzerEndpoint()).to.equal(
"http://test:8098/nisq-analyzer"
);
expect(quantmeConfig.getTransformationFrameworkEndpoint()).to.equal(
"http://test:8888"
);
expect(quantmeConfig.getQiskitRuntimeHandlerEndpoint()).to.equal(
"http://test:8889"
);
expect(quantmeConfig.getAWSRuntimeHandlerEndpoint()).to.equal(
"http://test:8890"
);
expect(quantmeConfig.getScriptSplitterEndpoint()).to.equal(
"http://test:8891"
);
expect(quantmeConfig.getScriptSplitterThreshold()).to.equal(7);
expect(quantmeConfig.getHybridRuntimeProvenance()).to.equal("true");
});
});
});