summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlex Shatov <alexs@att.com>2017-09-28 09:20:14 -0400
committerAlex Shatov <alexs@att.com>2017-09-28 09:20:14 -0400
commit944b946e05a0e0acbcfc29b15e53dc76e7b05581 (patch)
treeb96c5e003b21957411454b37d208bc8b60341e8b /tests
parenta2ffa33f55ae178e91df119aa19d2bede35d083f (diff)
4.2.2. fixed starting up of deployment-handler
* start of dh was broken by coding for unit-test * Coverage summary Statements : 50.84% ( 514/1011 ) Branches : 26.11% ( 100/383 ) Functions : 30.11% ( 56/186 ) Lines : 51.35% ( 513/999 ) Change-Id: Ibb59f1ddd25a37a7bd58f4017837a622b04381e3 Issue-Id: DCAEGEN2-62 Signed-off-by: Alex Shatov <alexs@att.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_policy.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_policy.js b/tests/test_policy.js
index 3c1a5da..c0ad243 100644
--- a/tests/test_policy.js
+++ b/tests/test_policy.js
@@ -189,8 +189,11 @@ describe('test policy on deployment-handler', () => {
console.log("got configuration:", JSON.stringify(config));
log.debug(REQ_ID, "Configuration: " + JSON.stringify(config));
+
const main_app = require('./../deployment-handler');
- console.log("loaded main_app");
+ console.log("setting main_app...");
+ main_app.set_app();
+ console.log("set main_app");
const req_path = "/policy/components";
const test_txt = "GET " + req_path;
@@ -198,7 +201,7 @@ describe('test policy on deployment-handler', () => {
console.log(test_txt);
it('GET all the components with policy from cloudify', function() {
console.log("chai", test_txt);
- return chai.request(main_app).get(req_path)
+ return chai.request(main_app.app).get(req_path)
.then(function(res) {
console.log("res for", test_txt, JSON.stringify(res.body));
log.debug(REQ_ID, "received " + JSON.stringify(res.body));