Skip to content

Commit

Permalink
fix(travis): Fix mysql database connection in e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunnerLivio committed Nov 6, 2018
1 parent eb68e45 commit 0420caa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ before_install:
install:
- npm install
script:
- docker-compose build && docker-compose up
- sudo service mysql stop
- docker-compose build && docker-compose run lib
deploy:
- provider: script
# Have to use `&&` because of issue https://github.com/travis-ci/dpl/issues/673
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ services:
- mysql
networks:
- overlay
environment:
WAIT_HOSTS: mysql:3306

networks:
overlay:
driver: bridge
2 changes: 1 addition & 1 deletion e2e/health-checks/database.health.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('Database Health', () => {
imports: [
TypeOrmModule.forRoot({
type: 'mysql',
host: '0.0.0.0',
host: 'mysql',
port: 3306,
username: 'root',
password: 'root',
Expand Down

0 comments on commit 0420caa

Please sign in to comment.