From b182141d072e7bf287db14025a45ba3089b3c2cd Mon Sep 17 00:00:00 2001 From: Spencer Alger Date: Sat, 10 Jan 2015 13:50:59 -0700 Subject: [PATCH] support running integration tests against a specific version --- test/integration/yaml_suite/client_manager.js | 4 ++-- test/integration/yaml_suite/run.js | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/test/integration/yaml_suite/client_manager.js b/test/integration/yaml_suite/client_manager.js index 09df005b9..3280e17e7 100644 --- a/test/integration/yaml_suite/client_manager.js +++ b/test/integration/yaml_suite/client_manager.js @@ -23,7 +23,7 @@ var client = null; var externalExists; module.exports = { - create: function create(branch, cb) { + create: function create(apiVersion, cb) { // create a client and ping the server for up to 15 seconds doCreateClient({ logConfig: null @@ -89,7 +89,7 @@ module.exports = { } client = new es.Client({ - apiVersion: branch, + apiVersion: apiVersion, hosts: [ { host: argv.host, diff --git a/test/integration/yaml_suite/run.js b/test/integration/yaml_suite/run.js index 42f66fce2..d478237df 100644 --- a/test/integration/yaml_suite/run.js +++ b/test/integration/yaml_suite/run.js @@ -17,7 +17,15 @@ module.exports = function (branch) { before(function (done) { // start our personal ES Server this.timeout(5 * 60 * 1000); - clientManager.create(branch, done); + + var apiVersion = branch; + var match; + if (match = apiVersion.match(/^v(\d+\.\d+)\.\d+$/)) { + apiVersion = match[1]; + } + + console.log('testing branch', branch, 'against api version', apiVersion); + clientManager.create(apiVersion, done); }); before(function (done) {