Summary of Changes:
- moved es install/start/stop logic into a seperate script - `grunt test` now runs the integration tests once for each version of ES we support - grunt can now install and run elasticearch (using grunt-run, pure js solution coming later) - included seperate es.sh script specifically for starting or stopping elasticsearch - url aliases, api, yaml_suite/index.js, and yaml_tests.json, are all now duplicated for 0_90 support - the client now accepts an apiVersion argument (undocumented) which defaults to 'master' but can be '0.90' - The yaml test runner will now check the name of the ES instance it is connecting to, preventing accidental wiping of ES
This commit is contained in:
35
test/integration/yaml_suite/run.js
Normal file
35
test/integration/yaml_suite/run.js
Normal file
@ -0,0 +1,35 @@
|
||||
module.exports = function (branch) {
|
||||
var path = require('path');
|
||||
var async = require('async');
|
||||
var jsYaml = require('js-yaml');
|
||||
var YamlFile = require('./yaml_file');
|
||||
var _ = require('../../../src/lib/utils');
|
||||
var es = require('../../../src/elasticsearch');
|
||||
var clientManager = require('./client_manager');
|
||||
var argv = require('./argv');
|
||||
var branchSuffix = branch === 'master' ? '' : '_' + _.snakeCase(branch);
|
||||
|
||||
describe('integration', function () {
|
||||
this.timeout(30000);
|
||||
|
||||
// before running any tests...
|
||||
before(function (done) {
|
||||
// start our personal ES Server
|
||||
this.timeout(null);
|
||||
clientManager.create(branch, done);
|
||||
});
|
||||
|
||||
before(function (done) {
|
||||
// make sure ES is empty
|
||||
clientManager.get().indices.delete({
|
||||
index: '*',
|
||||
ignore: 404
|
||||
}, done);
|
||||
});
|
||||
|
||||
var files = _.map(require('./yaml_tests' + branchSuffix + '.json'), function (docs, filename) {
|
||||
return new YamlFile(filename, docs);
|
||||
});
|
||||
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user