summaryrefslogtreecommitdiffstats
path: root/tests/test_info.js
diff options
context:
space:
mode:
authorAlex Shatov <alexs@att.com>2018-04-06 12:41:29 -0400
committerAlex Shatov <alexs@att.com>2018-04-06 12:41:29 -0400
commitf8cab3eebdcee288332e16bda5bd6b2fa17e02ac (patch)
treefd7d6064ad9f712a982f413d36a30c6f779460af /tests/test_info.js
parent1c2fb197d1b406a6764dde9dddd14caa8c50713a (diff)
4.4.1 deployment-handler -unit tests 84% coverage
- more logging on metrics - log both req and res - unit tests of policy-update API - log timing and messaging in unit tests - code coverage 84.28% Statements 938/1113 65.51% Branches 321/490 81.58% Functions 155/190 84.34% Lines 926/1098 Change-Id: I3587135ceac76b291f83753441421a917a8b8bdf Signed-off-by: Alex Shatov <alexs@att.com> Issue-ID: DCAEGEN2-258
Diffstat (limited to 'tests/test_info.js')
-rw-r--r--tests/test_info.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test_info.js b/tests/test_info.js
index b2f8a91..1156d59 100644
--- a/tests/test_info.js
+++ b/tests/test_info.js
@@ -28,16 +28,18 @@ const chai = require('chai')
chai.use(chaiHttp);
const dh = require('./mock_deployment_handler');
+const utils = require('./mock_utils');
function test_get_info(dh_server) {
const req_path = "/";
const test_txt = "GET " + req_path;
describe(test_txt, () => {
- console.log(test_txt);
it('GET info', function() {
+ const action_timer = new utils.ActionTimer();
+ console.log(action_timer.step, test_txt);
return chai.request(dh_server.app).get(req_path)
.then(function(res) {
- console.log("res for", test_txt, res.text);
+ console.log(action_timer.step, "res for", test_txt, res.text);
expect(res).to.have.status(200);
expect(res).to.be.json;
@@ -47,7 +49,7 @@ function test_get_info(dh_server) {
assert.deepEqual(config.apiLinks, info.links);
})
.catch(function(err) {
- console.error("err for", test_txt, err);
+ console.error(action_timer.step, "err for", test_txt, err);
throw err;
});
});