mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Give API tests their own intern config
Adding a 'suites' property to the existing intern configuration caused an error to be thrown at the beginning of the functional test run. Even if the value of 'suites' was just an empty array. The existence of the property seemed to enabled execution of the config file in the selenium browser because it complained about not having the node require function. To fix this, I created a separate api test config file without the node require and removed the 'suites' property from intern.js.
This commit is contained in:
parent
d46c8a437e
commit
c5565d72c6
4 changed files with 19 additions and 5 deletions
|
@ -11,7 +11,8 @@ module.exports = function (grunt) {
|
|||
dev: {},
|
||||
api: {
|
||||
options: {
|
||||
runType: 'client'
|
||||
runType: 'client',
|
||||
config: 'test/apiIntern'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -7,7 +7,8 @@ module.exports = function (grunt) {
|
|||
grunt.registerTask('test:quick', [
|
||||
'test:server',
|
||||
'test:ui',
|
||||
'test:browser'
|
||||
'test:browser',
|
||||
'test:api'
|
||||
]);
|
||||
|
||||
grunt.registerTask('test:dev', [
|
||||
|
|
12
test/apiIntern.js
Normal file
12
test/apiIntern.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
define({
|
||||
suites: [
|
||||
'test/unit/api/index_patterns/index'
|
||||
],
|
||||
excludeInstrumentation: /(fixtures|node_modules)\//,
|
||||
loaderOptions: {
|
||||
paths: {
|
||||
'bluebird': './node_modules/bluebird/js/browser/bluebird.js',
|
||||
'moment': './node_modules/moment/moment.js'
|
||||
}
|
||||
}
|
||||
});
|
|
@ -1,6 +1,6 @@
|
|||
define(function (require) {
|
||||
var bdd = require('intern!bdd');
|
||||
var config = require('intern').config;
|
||||
var serverConfig = require('intern/dojo/node!../../../serverConfig');
|
||||
var ScenarioManager = require('intern/dojo/node!../../../fixtures/scenarioManager');
|
||||
var request = require('intern/dojo/node!supertest-as-promised');
|
||||
var url = require('intern/dojo/node!url');
|
||||
|
@ -12,8 +12,8 @@ define(function (require) {
|
|||
var del = require('./_del');
|
||||
|
||||
bdd.describe('index_patterns API', function () {
|
||||
var scenarioManager = new ScenarioManager(url.format(config.servers.elasticsearch));
|
||||
request = request(url.format(config.servers.kibana) + '/api');
|
||||
var scenarioManager = new ScenarioManager(url.format(serverConfig.servers.elasticsearch));
|
||||
request = request(url.format(serverConfig.servers.kibana) + '/api');
|
||||
|
||||
bdd.before(function () {
|
||||
return scenarioManager.load('emptyKibana');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue