[testing] remove saucelabs runner and utils

This commit is contained in:
Spencer Alger 2015-06-04 16:19:11 -07:00
parent 971ef95889
commit ec9ddb7232
3 changed files with 13 additions and 87 deletions

View file

@ -1,39 +0,0 @@
var config = require('../utils/server-config');
var unitTestUrl = require('util').format('http://localhost:%d/test/unit/?saucelabs=true', config.kibana.port);
var buildId = 'test build';
if (process.env.TRAVIS_BUILD_ID) {
buildId = 'travis build #' + process.env.TRAVIS_BUILD_ID;
}
module.exports = {
unit: {
options: {
username: 'kibana',
key: process.env.SAUCE_ACCESS_KEY,
urls: [ unitTestUrl ],
testname: 'Kibana Browser Tests',
build: buildId,
concurrency: 10,
'max-duration': 60,
maxRetries: 2,
browsers: [
{
browserName: 'chrome',
platform: 'Windows 7'
},
{
browserName: 'safari',
platform: 'OS X 10.9',
},
{
browserName: 'firefox',
platform: 'Windows 7',
},
{
browserName: 'internet explorer',
platform: 'Windows 8'
}
]
}
}
};

View file

@ -1,23 +1,5 @@
var _ = require('lodash');
module.exports = function (grunt) {
function addTestTask(tasks) {
var testTask = 'mocha:unit';
if (grunt.option('use-sauce') || process.env.TRAVIS) {
if (!process.env.SAUCE_ACCESS_KEY) {
grunt.log.writeln(grunt.log.wordlist([
'>> SAUCE_ACCESS_KEY not set in env, running with Phantom'
], {color: 'yellow'}));
} else {
testTask = 'saucelabs-mocha:unit';
}
}
tasks.push('simplemocha:all', testTask);
return testTask;
}
grunt.registerTask('test', function () {
if (grunt.option('quick')) {
grunt.task.run('quick-test');
@ -29,19 +11,22 @@ module.exports = function (grunt) {
'jscs:source',
'maybe_start_kibana',
'jade',
'less:build'
'less:build',
'simplemocha:all',
'mocha:unit'
];
addTestTask(tasks);
if (process.env.TRAVIS) tasks.unshift('esvm:dev');
grunt.task.run(tasks);
});
grunt.registerTask('quick-test', function () {
var tasks = [
'maybe_start_kibana'
];
addTestTask(tasks);
grunt.task.run(tasks);
grunt.task.run([
'maybe_start_kibana',
'simplemocha:all',
'mocha:unit'
]);
});
grunt.registerTask('coverage', [

View file

@ -12,7 +12,6 @@
/* globals mocha */
var COVERAGE = window.COVERAGE = !!(/coverage/i.test(window.location.search));
var SAUCELABS = window.SAUCELABS = !!(/saucelabs/i.test(window.location.search));
var DISABLE_RESIZE_CHECKER = window.DISABLE_RESIZE_CHECKER = true;
function wrap(obj, method, fn) {
@ -54,9 +53,7 @@
sinon: '../../test/utils/sinon',
bluebird: 'bower_components/bluebird/js/browser/bluebird',
angular: 'bower_components/angular-mocks/angular-mocks',
angular_src: 'bower_components/angular/angular',
screencast_reporter_css: '../../node_modules/mocha-screencast-reporter/screencast-reporter',
ScreencastReporter: '../../node_modules/mocha-screencast-reporter/screencast-reporter'
angular_src: 'bower_components/angular/angular'
},
shim: {
angular_src: {
@ -94,16 +91,6 @@
});
}
function setupSaucelabsReporter(done) {
require([
'ScreencastReporter',
'css!screencast_reporter_css'
], function (ScreencastReporter) {
mocha.reporter(ScreencastReporter);
done();
});
}
function runTests() {
require([
'text!specList',
@ -169,15 +156,8 @@
}
if (COVERAGE) {
setupCoverage(runTests);
}
else if (SAUCELABS) {
setupSaucelabsReporter(runTests);
}
else {
runTests();
}
if (COVERAGE) setupCoverage(runTests);
else runTests();
})();</script>
</head>