report args from yaml suite runner

This commit is contained in:
Spencer Alger
2015-01-10 14:21:05 -07:00
parent ce7ed0e395
commit 176febb3b9
3 changed files with 12 additions and 38 deletions

View File

@ -1,28 +0,0 @@
var path = require('path');
var _ = require('../../../src/lib/utils');
var defaults = {
executable: process.env.ES_HOME ? path.join(process.env.ES_HOME, './bin/elasticsearch') : null,
clusterName: 'yaml-test-runner',
dataPath: '/tmp/yaml-test-runner',
host: 'localhost',
port: process.env.ES_PORT || '9400'
};
if (process.browser) {
/* jshint browser:true */
if (window.ES_HOST) {
defaults.host = window.ES_HOST;
}
if (window.ES_PORT) {
defaults.port = window.ES_PORT;
}
module.exports = defaults;
} else {
module.exports = require('optimist')
.default(defaults)
.boolean('createServer')
.argv;
}

View File

@ -10,7 +10,6 @@ if (BROWSER) {
}
var _ = require('../../../src/lib/utils');
var argv = require('./argv');
var path = require('path');
var fs = require('fs');
var async = require('async');
@ -23,7 +22,7 @@ var client = null;
var externalExists;
module.exports = {
create: function create(apiVersion, cb) {
create: function create(apiVersion, port, cb) {
// create a client and ping the server for up to 15 seconds
doCreateClient({
logConfig: null
@ -40,8 +39,8 @@ module.exports = {
setTimeout(ping, timeout);
} else if (err) {
cb(new Error('unable to establish contact with ES at ' + JSON.stringify({
host: argv.host,
port: argv.port,
host: 'localhost',
port: port,
err: err
})));
} else if (!JENKINS && resp.name !== 'elasticsearch_js_test_runner') {
@ -92,8 +91,8 @@ module.exports = {
apiVersion: apiVersion,
hosts: [
{
host: argv.host,
port: argv.port
host: 'localhost',
port: port
}
],
log: logConfig

View File

@ -8,14 +8,12 @@ module.exports = function (branch) {
var utils = rootReq('grunt/utils');
var es = rootReq('src/elasticsearch');
var clientManager = require('./client_manager');
var argv = require('./argv');
describe('integration', function () {
this.timeout(30000);
// before running any tests...
before(function (done) {
// start our personal ES Server
this.timeout(5 * 60 * 1000);
var apiVersion = branch;
@ -24,8 +22,13 @@ module.exports = function (branch) {
apiVersion = match[1];
}
console.log('testing branch', branch, 'against api version', apiVersion);
clientManager.create(apiVersion, done);
var port = parseInt(process.env.ES_PORT || 9200, 10);
console.log('branch:', branch);
console.log('port:', port);
console.log('api version:', apiVersion);
clientManager.create(apiVersion, port, done);
});
before(function (done) {