[pack installer] modified tests to make paths platform agnostic
This commit is contained in:
parent
659a437195
commit
c86b13edc2
|
@ -21,7 +21,7 @@ program
|
|||
.description('Get the help for a specific command')
|
||||
.action(function (cmdName) {
|
||||
var cmd = _.find(program.commands, { _name: cmdName });
|
||||
if (!cmd) return this.error(`unknown command ${cmdName}`);
|
||||
if (!cmd) return program.error(`unknown command ${cmdName}`);
|
||||
cmd.help();
|
||||
});
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ program
|
|||
.description('Get the help for a specific command')
|
||||
.action(function (cmdName) {
|
||||
var cmd = _.find(program.commands, { _name: cmdName });
|
||||
if (!cmd) return this.error(`unknown command ${cmdName}`);
|
||||
if (!cmd) return program.error(`unknown command ${cmdName}`);
|
||||
cmd.help();
|
||||
});
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import { join } from 'path';
|
|||
|
||||
describe('kibana cli', function () {
|
||||
|
||||
describe('plugin extractor', function () {
|
||||
describe('pack', function () {
|
||||
|
||||
const testWorkingPath = join(__dirname, '.test.data');
|
||||
const tempArchiveFilePath = join(testWorkingPath, 'archive.part');
|
||||
|
|
|
@ -10,7 +10,7 @@ import { listFiles, extractFiles } from '../zip';
|
|||
|
||||
describe('kibana cli', function () {
|
||||
|
||||
describe('plugin extractor', function () {
|
||||
describe('zip', function () {
|
||||
|
||||
const testWorkingPath = join(__dirname, '.test.data');
|
||||
const tempArchiveFilePath = join(testWorkingPath, 'archive.part');
|
||||
|
@ -59,17 +59,17 @@ describe('kibana cli', function () {
|
|||
})
|
||||
.then((actual) => {
|
||||
const expected = [
|
||||
'elasticsearch\\',
|
||||
'kibana\\',
|
||||
'kibana\\test-plugin\\',
|
||||
'kibana\\test-plugin\\.gitignore',
|
||||
'kibana\\test-plugin\\extra file only in zip.txt',
|
||||
'kibana\\test-plugin\\index.js',
|
||||
'kibana\\test-plugin\\package.json',
|
||||
'kibana\\test-plugin\\public\\',
|
||||
'kibana\\test-plugin\\public\\app.js',
|
||||
'kibana\\test-plugin\\README.md',
|
||||
'logstash\\'
|
||||
'elasticsearch/',
|
||||
'kibana/',
|
||||
'kibana/test-plugin/',
|
||||
'kibana/test-plugin/.gitignore',
|
||||
'kibana/test-plugin/extra file only in zip.txt',
|
||||
'kibana/test-plugin/index.js',
|
||||
'kibana/test-plugin/package.json',
|
||||
'kibana/test-plugin/public/',
|
||||
'kibana/test-plugin/public/app.js',
|
||||
'kibana/test-plugin/README.md',
|
||||
'logstash/'
|
||||
];
|
||||
|
||||
expect(actual).to.eql(expected);
|
||||
|
|
|
@ -63,6 +63,7 @@ export async function listFiles(zipPath) {
|
|||
unzipper.on('error', reject);
|
||||
|
||||
unzipper.on('list', (files) => {
|
||||
files = files.map((file) => file.replace(/\\/g, '/'));
|
||||
resolve(files);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue