[YamlDoc] add section description logging
This commit is contained in:
@ -2,25 +2,22 @@ var BROWSER = process.env.browser;
|
||||
var VERBOSE = process.env.VERBOSE;
|
||||
var JENKINS = !!process.env.JENKINS_HOME;
|
||||
|
||||
var es;
|
||||
if (BROWSER) {
|
||||
var es = window.elasticsearch;
|
||||
es = window.elasticsearch;
|
||||
} else {
|
||||
var es = require('../../../src/elasticsearch');
|
||||
es = require('../../../src/elasticsearch');
|
||||
}
|
||||
|
||||
var _ = require('../../../src/lib/utils');
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
var async = require('async');
|
||||
var fromRoot = _.bindKey(path, 'join', require('find-root')(__dirname));
|
||||
var Bluebird = require('bluebird');
|
||||
|
||||
// current client
|
||||
var client = null;
|
||||
|
||||
// when set to a boolean, hold the test of a ping
|
||||
var externalExists;
|
||||
|
||||
module.exports = {
|
||||
create: function create(apiVersion, port, host, cb) {
|
||||
// create a client and ping the server for up to 15 seconds
|
||||
|
||||
@ -158,6 +158,19 @@ function YamlDoc(doc, file) {
|
||||
|
||||
return action;
|
||||
});
|
||||
|
||||
self.getActionsRunners = function () {
|
||||
return self._actions.map(function (action) {
|
||||
return function (cb) {
|
||||
if (!!process.env.JENKINS_HOME) {
|
||||
console.log('===========================');
|
||||
console.log(action.name);
|
||||
console.log('===========================');
|
||||
}
|
||||
return action.testable(cb);
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
YamlDoc.compareRangeToVersion = function (range, version) {
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* eslint-env mocha */
|
||||
/* eslint-disable no-console */
|
||||
/**
|
||||
* Class representing a YAML file
|
||||
* @type {[type]}
|
||||
@ -20,16 +22,21 @@ function YamlFile(filename, docs) {
|
||||
doc = new YamlDoc(doc, file);
|
||||
if (doc.description === 'setup') {
|
||||
beforeEach(/* doc */function (done) {
|
||||
async.series(_.pluck(doc._actions, 'testable'), done);
|
||||
async.series(doc.getActionsRunners(), done);
|
||||
});
|
||||
} else {
|
||||
it(doc.description, function (done) {
|
||||
async.series(_.pluck(doc._actions, 'testable'), done);
|
||||
async.series(doc.getActionsRunners(), done);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
afterEach(/* doc */function () {
|
||||
if (!!process.env.JENKINS_HOME) {
|
||||
console.log('===========================');
|
||||
console.log('Cleanup');
|
||||
console.log('===========================');
|
||||
}
|
||||
return clientManager.get().clearEs();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user