diff --git a/test/integration/yaml_suite/argv.js b/test/integration/yaml_suite/argv.js deleted file mode 100644 index d6d972ff5..000000000 --- a/test/integration/yaml_suite/argv.js +++ /dev/null @@ -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; -} diff --git a/test/integration/yaml_suite/client_manager.js b/test/integration/yaml_suite/client_manager.js index 3280e17e7..9f5369d10 100644 --- a/test/integration/yaml_suite/client_manager.js +++ b/test/integration/yaml_suite/client_manager.js @@ -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 diff --git a/test/integration/yaml_suite/run.js b/test/integration/yaml_suite/run.js index d478237df..0387bafd2 100644 --- a/test/integration/yaml_suite/run.js +++ b/test/integration/yaml_suite/run.js @@ -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) {