updated other places that es is cleared to also clear templates

This commit is contained in:
Spencer Alger
2014-06-09 10:03:05 -07:00
parent b64afec7ee
commit 7a2571f11a
4 changed files with 15 additions and 18 deletions

View File

@ -1,6 +1,5 @@
module.exports = function (branch) {
var path = require('path');
var async = require('async');
var jsYaml = require('js-yaml');
var YamlFile = require('./yaml_file');
var root = require('find-root')(__dirname);
@ -23,15 +22,7 @@ module.exports = function (branch) {
before(function (done) {
// make sure ES is empty
var client = clientManager.get();
async.parallel([
function (done) {
client.indices.delete({ index: '*', ignore: 404 }, done);
},
function (done) {
client.indices.deleteTemplate({ name: '*', ignore: 404 }, done);
}
], done);
clientManager.get().clearEs(done);
});
var files = _.map(require('./yaml_tests_' + _.snakeCase(branch) + '.json'), function (docs, filename) {