This docker image is useful for integration tests. However, the first thing every test must do is create the necessary tables and column families. It would be very convenient to be able to specify which tables and column families are necessary at startup, so no special build or test logic is required.
Solution
Add an optional -cf flag allowing to specify which tables and column families to be created at startup.
Result
The user can just specify what needs to be created at startup:
docker run -d -p 8080:8080 spotify/bigtable-emulator -cf dev.records.data,dev.records.meta
This would create data and meta column families in the records new table in the dev instance.
This PR is also adding small improvements:
the log line bttest.Server running on [::]:8080 appear at startup so users can wait for this line to appear in docker logs instead of waiting an arbitrary number of seconds after launching the server.
the makefile is removing the test container after the test in order to not pollute Docker.
when an error occur, the details are printed in the standard error stream.
Problem
This docker image is useful for integration tests. However, the first thing every test must do is create the necessary tables and column families. It would be very convenient to be able to specify which tables and column families are necessary at startup, so no special build or test logic is required.
Solution
Add an optional
-cf
flag allowing to specify which tables and column families to be created at startup.Result
The user can just specify what needs to be created at startup:
This would create
data
andmeta
column families in therecords
new table in thedev
instance.This PR is also adding small improvements:
bttest.Server running on [::]:8080
appear at startup so users can wait for this line to appear indocker logs
instead of waiting an arbitrary number of seconds after launching the server.@rgruener