support running integration tests against a specific version
This commit is contained in:
@ -23,7 +23,7 @@ var client = null;
|
|||||||
var externalExists;
|
var externalExists;
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
create: function create(branch, cb) {
|
create: function create(apiVersion, cb) {
|
||||||
// create a client and ping the server for up to 15 seconds
|
// create a client and ping the server for up to 15 seconds
|
||||||
doCreateClient({
|
doCreateClient({
|
||||||
logConfig: null
|
logConfig: null
|
||||||
@ -89,7 +89,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
client = new es.Client({
|
client = new es.Client({
|
||||||
apiVersion: branch,
|
apiVersion: apiVersion,
|
||||||
hosts: [
|
hosts: [
|
||||||
{
|
{
|
||||||
host: argv.host,
|
host: argv.host,
|
||||||
|
|||||||
@ -17,7 +17,15 @@ module.exports = function (branch) {
|
|||||||
before(function (done) {
|
before(function (done) {
|
||||||
// start our personal ES Server
|
// start our personal ES Server
|
||||||
this.timeout(5 * 60 * 1000);
|
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) {
|
before(function (done) {
|
||||||
|
|||||||
Reference in New Issue
Block a user