mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
fixed reference to renamed file, set default ENV variable for npm
This commit is contained in:
parent
a9b729655d
commit
ca224a4b3b
4 changed files with 17 additions and 11 deletions
|
@ -48,6 +48,7 @@
|
|||
"cookie-parser": "^1.3.3",
|
||||
"debug": "^2.1.1",
|
||||
"elasticsearch": "^5.0.0",
|
||||
"expiry-js": "^0.1.7",
|
||||
"express": "^4.10.6",
|
||||
"glob": "^4.3.2",
|
||||
"good": "^5.1.2",
|
||||
|
|
|
@ -9,7 +9,7 @@ set NODE=%DIR%\node\node.exe
|
|||
set SERVER=%DIR%\src\bin\kibana.js
|
||||
set NODE_ENV="production"
|
||||
set CONFIG_PATH=%DIR%\config\kibana.yml
|
||||
REM set NPM (TODO: Need to define the env variable to the install of npm. TALK TO CHRIS/JOE)
|
||||
set NPM=npm
|
||||
|
||||
TITLE Kibana Server @@version
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
var program = require('commander');
|
||||
require('../lib/commanderExtensions.js')(program);
|
||||
var path = require('path');
|
||||
var startupOptions = require('./startup/startup_options.js');
|
||||
var startupOptions = require('./startup/startupOptions.js');
|
||||
var startup = require('./startup/startup.js');
|
||||
var pluginProgram = require('./plugin/plugin');
|
||||
|
||||
|
|
|
@ -50,13 +50,14 @@ describe('kibana cli', function () {
|
|||
});
|
||||
});
|
||||
|
||||
it('download and extract a valid plugin', function () {
|
||||
it('should download and extract a valid plugin', function () {
|
||||
var filename = join(__dirname, 'replies/test-plugin-master.tar.gz');
|
||||
var couchdb = nock('http://www.files.com')
|
||||
.defaultReplyHeaders({
|
||||
'content-length': '10'
|
||||
})
|
||||
.get('/plugin.tar.gz')
|
||||
.replyWithFile(200, __dirname + '/replies/test-plugin-master.tar.gz');
|
||||
.replyWithFile(200, filename);
|
||||
|
||||
var source = 'http://www.files.com/plugin.tar.gz';
|
||||
|
||||
|
@ -74,9 +75,10 @@ describe('kibana cli', function () {
|
|||
});
|
||||
|
||||
it('should abort the download and extraction for a corrupt archive.', function () {
|
||||
var filename = join(__dirname, 'replies/corrupt.tar.gz');
|
||||
var couchdb = nock('http://www.files.com')
|
||||
.get('/plugin.tar.gz')
|
||||
.replyWithFile(200, __dirname + '/replies/corrupt.tar.gz');
|
||||
.replyWithFile(200, filename);
|
||||
|
||||
var source = 'http://www.files.com/plugin.tar.gz';
|
||||
|
||||
|
@ -94,6 +96,7 @@ describe('kibana cli', function () {
|
|||
});
|
||||
|
||||
describe('download', function () {
|
||||
|
||||
beforeEach(function () {
|
||||
logger = pluginLogger(false);
|
||||
sinon.stub(logger, 'log');
|
||||
|
@ -108,7 +111,8 @@ describe('kibana cli', function () {
|
|||
rimraf.sync(testWorkingPath);
|
||||
});
|
||||
|
||||
it('loop through bad urls until it finds a good one.', function () {
|
||||
it('should loop through bad urls until it finds a good one.', function () {
|
||||
var filename = join(__dirname, 'replies/test-plugin-master.tar.gz');
|
||||
var settings = {
|
||||
urls: [
|
||||
'http://www.files.com/badfile1.tar.gz',
|
||||
|
@ -128,7 +132,7 @@ describe('kibana cli', function () {
|
|||
.get('/badfile2.tar.gz')
|
||||
.reply(404)
|
||||
.get('/goodfile.tar.gz')
|
||||
.replyWithFile(200, __dirname + '/replies/test-plugin-master.tar.gz');
|
||||
.replyWithFile(200, filename);
|
||||
|
||||
var errorStub = sinon.stub();
|
||||
return downloader.download(settings, logger)
|
||||
|
@ -152,7 +156,8 @@ describe('kibana cli', function () {
|
|||
});
|
||||
});
|
||||
|
||||
it('stop looping through urls when it finds a good one.', function () {
|
||||
it('should stop looping through urls when it finds a good one.', function () {
|
||||
var filename = join(__dirname, 'replies/test-plugin-master.tar.gz');
|
||||
var settings = {
|
||||
urls: [
|
||||
'http://www.files.com/badfile1.tar.gz',
|
||||
|
@ -173,7 +178,7 @@ describe('kibana cli', function () {
|
|||
.get('/badfile2.tar.gz')
|
||||
.reply(404)
|
||||
.get('/goodfile.tar.gz')
|
||||
.replyWithFile(200, __dirname + '/replies/test-plugin-master.tar.gz')
|
||||
.replyWithFile(200, filename)
|
||||
.get('/badfile3.tar.gz')
|
||||
.reply(404);
|
||||
|
||||
|
@ -198,7 +203,7 @@ describe('kibana cli', function () {
|
|||
});
|
||||
});
|
||||
|
||||
it('Throw an error when it doesn\'t find a good url.', function () {
|
||||
it('should throw an error when it doesn\'t find a good url.', function () {
|
||||
var settings = {
|
||||
urls: [
|
||||
'http://www.files.com/badfile1.tar.gz',
|
||||
|
@ -232,7 +237,7 @@ describe('kibana cli', function () {
|
|||
});
|
||||
});
|
||||
|
||||
it('Throw an error when it tries to use an invalid url.', function () {
|
||||
it('should throw an error when it tries to use an invalid url.', function () {
|
||||
var settings = {
|
||||
urls: [
|
||||
'http://www.files.com/badfile1.tar.gz',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue