OpenSOC / opensoc-ui

User interface for OpenSOC
Apache License 2.0
100 stars 55 forks source link

make test #10

Closed aishikaw closed 10 years ago

aishikaw commented 10 years ago

I tried to make test but I got the following error. Please let me know how resolve this error.

aishikaw-mac{~/opensoc-ui}21: sudo make test dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid PORT=4000 NODE_ENV=test ./node_modules/istanbul/lib/cli.js cover \ ./node_modules/mocha/bin/_mocha -- --check-leaks -R spec

auth POST /login 302 9ms - 35b ✓ logs in GET /logout 302 5ms - 40b ✓ logs out

kafka topics ✓ reads from topic

index GET / 200 7ms - 2.42kb ✓ responds with success

query parser 1) should parse query

4 passing (113ms) 1 failing

1) query parser should parse query: Uncaught Error: write EPIPE at errnoException (net.js:904:11) at Object.afterWrite (net.js:720:19)

Writing coverage object [/Users/aishikaw/opensoc-ui/coverage/coverage.json]

Writing coverage reports at [/Users/aishikaw/opensoc-ui/coverage]

=============================== Coverage summary =============================== Statements : 80.28% ( 57/71 ) Branches : 50% ( 5/10 ) Functions : 50% ( 10/20 )

Lines : 80.28% ( 57/71 )

make: *\ [test-all] Error 1

jamilbk commented 10 years ago

Hey Aki,

Thanks for the detailed issue report. You just need to run bundle install from the root of the app directory before trying to run. This will install the parser gem, which the query parser test is unable to find ;-). I've updated the README to include this.

Also, no need to prefix your commands with sudo -- a standard make test should be fine.

aishikaw commented 10 years ago

Hi Jamil,

I was able to make test this time. And also there wasn't "bundle" command in my mac, so I installed it by gem.

aishikaw-mac{~/opensoc-ui}96: sudo gem install bundler

Thanks!