elastic / template-kibana-plugin

sao.js template for kibana plugins
Apache License 2.0
64 stars 34 forks source link

can't seem to get `npm run test:server` to pass #5

Closed blacktop closed 7 years ago

blacktop commented 7 years ago
npm info ok
npm info it worked if it ends with ok
npm info using npm@3.10.10
npm info using node@v6.10.2
npm WARN using --force I sure hope you know what you are doing.
npm info lifecycle malice@5.5.0~pretest:server: malice@5.5.0
npm info lifecycle malice@5.5.0~test:server: malice@5.5.0

> malice@5.5.0 test:server /plugin/malice
> plugin-helpers test:server

  suite
    1) is a test test

  0 passing (170ms)
  1 failing

  1) suite is a test test:
     Error: expected true to equal false
      at Assertion.assert (node_modules/expect.js/index.js:96:13)
      at Assertion.be.Assertion.equal (node_modules/expect.js/index.js:216:10)
      at Context.it (server/__tests__/index.js:5:21)

child_process.js:504
    throw err;
    ^

Error: Command failed: /plugin/kibana/node_modules/.bin/mocha --require /plugin/kibana/test/mocha_setup.js server/**/__tests__/**/*.js
    at checkExecSyncError (child_process.js:481:13)
    at execFileSync (child_process.js:501:13)
    at module.exports (/plugin/malice/node_modules/@elastic/plugin-helpers/tasks/test/server/test_server_action.js:22:3)
    at run (/plugin/malice/node_modules/@elastic/plugin-helpers/lib/run.js:9:10)
    at /plugin/malice/node_modules/@elastic/plugin-helpers/cli.js:75:5
    at Command.actionWrapper (/plugin/malice/node_modules/@elastic/plugin-helpers/cli.js:12:8)
    at Command.listener (/plugin/malice/node_modules/commander/index.js:300:8)
    at emitTwo (events.js:106:13)
    at Command.emit (events.js:191:7)
    at Command.parseArgs (/plugin/malice/node_modules/commander/index.js:635:12)
npm info lifecycle malice@5.5.0~test:server: Failed to exec test:server script
npm info lifecycle Error: malice@5.5.0 test:server: `plugin-helpers test:server`
npm info lifecycle Exit status 1
npm info lifecycle     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
npm info lifecycle     at emitTwo (events.js:106:13)
npm info lifecycle     at EventEmitter.emit (events.js:191:7)
npm info lifecycle     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
npm info lifecycle     at emitTwo (events.js:106:13)
npm info lifecycle     at ChildProcess.emit (events.js:191:7)
npm info lifecycle     at maybeClose (internal/child_process.js:886:16)
npm info lifecycle     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
npm info lifecycle  malice@5.5.0~test:server: forced, continuing { Error: malice@5.5.0 test:server: `plugin-helpers test:server`
npm info lifecycle Exit status 1
npm info lifecycle     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
npm info lifecycle     at emitTwo (events.js:106:13)
npm info lifecycle     at EventEmitter.emit (events.js:191:7)
npm info lifecycle     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
npm info lifecycle     at emitTwo (events.js:106:13)
npm info lifecycle     at ChildProcess.emit (events.js:191:7)
npm info lifecycle     at maybeClose (internal/child_process.js:886:16)
npm info lifecycle     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
npm info lifecycle   code: 'ELIFECYCLE',
npm info lifecycle   pkgid: 'malice@5.5.0',
npm info lifecycle   stage: 'test:server',
npm info lifecycle   script: 'plugin-helpers test:server',
npm info lifecycle   pkgname: 'malice' }
npm info lifecycle malice@5.5.0~posttest:server: malice@5.5.0
npm info ok
blacktop commented 7 years ago

I have included the --force flag to get it to pass CI.

blacktop commented 7 years ago

This is just the base plugin generated with your template

w33ble commented 7 years ago

Yeah, the default test is a failing test. I'm not sure why though, it's a holdover from the old generator.

I'll update the test to at least pass by default.

w33ble commented 7 years ago

Published v6.2.3 and v7.2.1, both now have passing tests.

blacktop commented 7 years ago

thank you!