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

Support testing with docker #1198

Merged
merged 3 commits into from Feb 8, 2019

Conversation

Projects
None yet
3 participants
@gdbelvin
Copy link
Collaborator

gdbelvin commented Feb 8, 2019

Rather than setting up a full mysql instance, which can be a hassle, support testing against the local database, run by docker with docker-compose up -d db.

The tests require the mysql database to have an empty root password, which is not suitable for production, so this PR splits out the docker-compose file into a separate dev and prod configurations:

  • dev: docker-compose up
  • prod: docker-compose up -f docker-compose.yml docker-compose.prod.yml

This feature depends on google/trillian#1425
Fixes #1184

@gdbelvin gdbelvin force-pushed the gdbelvin:mysql branch from 50c82d9 to 1bdff54 Feb 8, 2019

@gdbelvin

This comment has been minimized.

Copy link
Collaborator Author

gdbelvin commented Feb 8, 2019

@Zyqsempai - see if this change, along with google/trillian#1425 makes testing with docker possible.

@codecov

This comment has been minimized.

Copy link

codecov bot commented Feb 8, 2019

Codecov Report

Merging #1198 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1198   +/-   ##
=======================================
  Coverage   64.86%   64.86%           
=======================================
  Files          46       46           
  Lines        3336     3336           
=======================================
  Hits         2164     2164           
  Misses        813      813           
  Partials      359      359

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5ac39fe...798d185. Read the comment docs.

Merge branch 'master' into mysql
* master:
  Don't timeout users entering OAuth info (#1195)
  Linter fixups (#1197)

@gdbelvin gdbelvin merged commit 06aca66 into google:master Feb 8, 2019

5 checks passed

GolangCI No issues found!
Details
cla/google All necessary CLAs are signed
codecov/patch Coverage not affected when comparing 5ac39fe...798d185
Details
codecov/project 64.86% remains the same compared to 5ac39fe
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@gdbelvin gdbelvin deleted the gdbelvin:mysql branch Feb 8, 2019

@DazWilkin

This comment has been minimized.

Copy link
Collaborator

DazWilkin commented Feb 8, 2019

The revised docker-compose command doesn't work for me and I'm unclear what's intended:

docker-compose up -f docker-compose.yml docker-compose.prod.yml

gdbelvin added a commit to gdbelvin/keytransparency that referenced this pull request Feb 11, 2019

Merge branch 'master' into test
* master:
  Fix hang: run mastership tracker (google#1199)
  Support testing with docker (google#1198)
@gdbelvin

This comment has been minimized.

Copy link
Collaborator Author

gdbelvin commented Feb 11, 2019

The command was in error. It should be:

docker-compose -f docker-compose.yml -f docker-compose.prod.yml up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment