Example showing running tests against docker datastore
docker-compose.yml defines a container configuration to start a datastore container called mydatastore. We can start it with
docker-compose up mydatastoreand optionally add a -d argument to background the container.
docker-compose.yml also defines a container configuration called mytest to test that datastore is working properly. It will automatically start mydatastore if it is not already running, and can be run with
docker-compose run mytestIf the test fails, it may be because mydatastore was just started and google datastore needs time to startup. Try running it again.
You can mitigate this by explicitly running the docker-compose up mydatastore before running docker-compose mytest.
docker-compose down --remove-orphans