-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sanity test based on injected data. #78
Conversation
* Remove unnecessry imports * Correct heartbeat path * Add dummy test data for Keyrock * Add test stub and move sanity test to avoid coverage * Alter default lint to allow camel case (since code currently violates this rule) * Add default config so test can run. * Update travis with best guess for starting relevant resources * Add dev dependencies (e.g. Husky, Coveralls, Chai etc.)
Tests can be run locally with the following preparatory steps: docker network create --driver=bridge my-network
docker run -d -h mysql -p 3306:3306 --net=my-network --name mysql -v $(pwd)/test/mysql-data:/docker-entrypoint-initdb.d/:ro -e MYSQL_ROOT_PASSWORD=test mysql:5.7
docker pull fiware/idm:latest
docker run -d --net=my-network --name keyrock -p 3000:3000 -e IDM_DB_USER=root -e IDM_DB_PASS=test -e DATABASE_HOST=mysql -e IDM_DB_PORT=3306 fiware/idm:7.5.1
The sanity test has been altered to use a local Keyrock instance rather than relying on an existing Keystone on the net. Also incorporates parts of PR #73 which also ran the linter. The same The repo needs to be exposed on coveralls as well (obviously) - see https://coveralls.io/repos/new - this is the reason for the error message in the log: {"message":"Couldn't find a repository matching this job.","error":true} and the coverage:unknown badge |
`IDM_HOST` should be unnecessary once ging/fiware-idm#73 is processed
* Merge branch 'master' into feature/test-stub
Merged! Thanks! We will work now on travis CI and code coverage. |
This PR is similar to ging/fiware-idm#69
npm run lint
)(the
after_script
in travis)(no body to the tests)