Merge pull request elastic/elasticsearch#672 from tsullivan/initial-server-tests

Initial server tests

Original commit: elastic/x-pack-elasticsearch@30f3a762f7
This commit is contained in:
Tim Sullivan 2015-12-04 16:50:53 -07:00
commit d022e8d276
2 changed files with 19 additions and 7 deletions

View File

@ -1,13 +1,13 @@
--- ---
parser: babel-eslint parser: babel-eslint
plugins: [ mocha ]
env: env:
es6: true es6: true
amd: true amd: true
node: true node: true
mocha: true mocha: true
browser: true
rules: rules:
block-scoped-var: 2 block-scoped-var: 2
@ -67,3 +67,5 @@ rules:
valid-typeof: 2 valid-typeof: 2
wrap-iife: [ 2, outside ] wrap-iife: [ 2, outside ]
yoda: 0 yoda: 0
mocha/no-exclusive-tests: 2
mocha/handle-done-callback: 2

View File

@ -13,9 +13,19 @@ git clone https://github.com/elastic/elasticsearch-marvel.git && cd elasticsearc
npm install npm install
``` ```
- Start it up - Start it up
- Start Elasticsearch, with esvm `esvm --branch 2.1` or with traditionally `bin/elasticsearch`. - Start Elasticsearch, with esvm `esvm --branch <target version>` or traditionally with `bin/elasticsearch`.
- Start up the mock Marvel agent with `gulp index` - Start up the mock Marvel agent with `gulp index`.
- Start up the filesystem watching of Marvel code and syncing to Kibana's plugin directory with `gulp dev` - Start up the filesystem watching of Marvel code and syncing to Kibana's plugin directory with `gulp dev`.
- Finally startup Kibana from that directory run `bin/kibana` - Finally, startup Kibana by running `bin/kibana --dev` from the root of the Kibana project.
- Check it out, navigate to your [Kibana App](http://localhost:5601) - Check it out, navigate to your [Kibana App](http://localhost:5601)
- Run tests
```
gulp test
```
- Debug tests
Add a `debugger` line to create a breakpoint, and then:
```
gulp sync && mocha debug --compilers js:babel/register /pathto/kibana/installedPlugins/marvel/pathto/__test__/testfile.js
```