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