Fixed the integration tests, set the default method for indices.putTemplate and indices.putMapping to PUT

This commit is contained in:
Spencer Alger
2013-11-25 14:14:00 -07:00
parent 8baa3d6601
commit 477f1aff84
13 changed files with 70 additions and 29 deletions

View File

@ -1,3 +1,4 @@
{
"node": true,
"white": true,

View File

@ -6,8 +6,8 @@ if (process.browser) {
}
var argv = require('./argv');
var server = require('./server');
var path = require('path');
var fs = require('fs');
// var path = require('path');
// var fs = require('fs');
var _ = require('../../../src/lib/utils');
// current client
@ -38,7 +38,7 @@ module.exports = {
doCreateClient(function () {
client.ping(function (err) {
if (err instanceof es.errors.ConnectionFault) {
externalExists = !err;
externalExists = false;
create(done);
} else {
done(err);

View File

@ -112,7 +112,7 @@ function EsjsReporter(runner) {
runner.on('end', function () {
restoreStdio();
var outputFilename = path.join(__dirname, '../../test-output-node-yaml.xml');
var outputFilename = path.join(__dirname, '../../../test-output-node-yaml.xml');
var xml = makeJUnitXml('node ' + process.version + ' yaml tests', {
stats: stats,
suites: _.map(rootSuite.suites, function removeElements(suite) {

View File

@ -20,19 +20,19 @@ function YamlFile(filename, docs) {
doc = new YamlDoc(doc, file);
if (doc.description === 'setup') {
beforeEach(/* doc */function (done) {
// console.log('setting up:', filename);
console.log('setting up:', filename);
async.series(_.pluck(doc._actions, 'testable'), done);
});
} else {
it(doc.description, function (done) {
// console.log('test doc');
console.log('test doc');
async.series(_.pluck(doc._actions, 'testable'), done);
});
}
});
afterEach(/* doc */function (done) {
// console.log('clearing indices');
console.log('clearing indices');
clientManager.get().indices.delete({
index: '*',
ignore: 404