set the 1.2 API to actually be used as the default
This commit is contained in:
@ -56,6 +56,7 @@ utils.branches.forEach(function (branch) {
|
|||||||
args.push('-f');
|
args.push('-f');
|
||||||
break;
|
break;
|
||||||
case 'master':
|
case 'master':
|
||||||
|
case '1.2':
|
||||||
case '1.x':
|
case '1.x':
|
||||||
args.push('-Des.node.bench=true', '-Des.script.disable_dynamic=false');
|
args.push('-Des.node.bench=true', '-Des.script.disable_dynamic=false');
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -71,12 +71,11 @@ function manage_es {
|
|||||||
local ES_URL="https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-${ES_RELEASE}.zip"
|
local ES_URL="https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-${ES_RELEASE}.zip"
|
||||||
local ES_DIR="${SNAPSHOTS}/${ES_VERSION}"
|
local ES_DIR="${SNAPSHOTS}/${ES_VERSION}"
|
||||||
else
|
else
|
||||||
if [[ $ES_BRANCH == "master" ]]; then
|
# TODO: TRASH THIS
|
||||||
local JDK='JDK7'
|
if [[ $ES_BRANCH == "master" ]]; then local JDK='JDK7'
|
||||||
elif [[ $ES_BRANCH == "1.x" ]]; then
|
elif [[ $ES_BRANCH == "1.x" ]]; then local JDK='JDK7'
|
||||||
local JDK='JDK7'
|
elif [[ $ES_BRANCH == "1.2" ]]; then local JDK='JDK7'
|
||||||
else
|
else local JDK='JDK6'
|
||||||
local JDK='JDK6'
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local ES_VERSION="${ES_BRANCH}_nightly"
|
local ES_VERSION="${ES_BRANCH}_nightly"
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
'master': require('./master'),
|
'master': require('./master'),
|
||||||
'1.x': require('./1_x'),
|
'1.x': require('./1_x'),
|
||||||
'1.2': require('./1_1'),
|
'1.2': require('./1_2'),
|
||||||
'1.1': require('./1_1'),
|
'1.1': require('./1_1'),
|
||||||
'1.0': require('./1_0'),
|
'1.0': require('./1_0'),
|
||||||
'0.90': require('./0_90')
|
'0.90': require('./0_90')
|
||||||
|
|||||||
@ -63,7 +63,7 @@ function Client(config) {
|
|||||||
delete this._namespaces;
|
delete this._namespaces;
|
||||||
}
|
}
|
||||||
|
|
||||||
EsApiClient.prototype = _.funcEnum(config, 'apiVersion', Client.apis, '1.1');
|
EsApiClient.prototype = _.funcEnum(config, 'apiVersion', Client.apis, '1.2');
|
||||||
if (!config.sniffEndpoint && EsApiClient.prototype === Client.apis['0.90']) {
|
if (!config.sniffEndpoint && EsApiClient.prototype === Client.apis['0.90']) {
|
||||||
config.sniffEndpoint = '/_cluster/nodes';
|
config.sniffEndpoint = '/_cluster/nodes';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,17 +23,17 @@ describe('Client instances creation', function () {
|
|||||||
|
|
||||||
var def = require('../../../package.json').config.default_api_branch;
|
var def = require('../../../package.json').config.default_api_branch;
|
||||||
it('inherits the ' + def + ' API by default', function () {
|
it('inherits the ' + def + ' API by default', function () {
|
||||||
expect(client.bulk).to.eql(apis[def].bulk);
|
expect(client.bulk).to.be(apis[def].bulk);
|
||||||
expect(client.nodes.stats).to.eql(apis[def].nodes.prototype.stats);
|
expect(client.nodes.stats).to.be(apis[def].nodes.prototype.stats);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('inherits the 0.90 API when specified', function () {
|
it('inherits the 1.0 API when specified', function () {
|
||||||
client.close();
|
client.close();
|
||||||
client = es.Client({
|
client = es.Client({
|
||||||
apiVersion: '0.90'
|
apiVersion: '1.0'
|
||||||
});
|
});
|
||||||
expect(client.bulk).to.eql(apis['0.90'].bulk);
|
expect(client.bulk).to.be(apis['1.0'].bulk);
|
||||||
expect(client.cluster.nodeStats).to.eql(apis['0.90'].cluster.prototype.nodeStats);
|
expect(client.cluster.nodeStats).to.be(apis['1.0'].cluster.prototype.nodeStats);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('closing the client causes it\'s transport to be closed', function () {
|
it('closing the client causes it\'s transport to be closed', function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user