increase portability of tests #35
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was working on a side project last weekend that had me running
make test
on my personal laptop. It failed.The reason was that
docker-compose
on that laptop prefixes messages like "Creating container [...] ..." with a space, so it's " Creating container [...] ...".orchestration.py
was thus failing to recognize such lines and indicating that a container was created, and so the test driver was spinning forever waiting for things to come up.This revision fixes that by adding the prefix
\s*
to all relevant regex patterns.Another issue was how
docker-compose ps
works. The tests were written to expect that whendocker-compose ps <service>
has nothing to say, then the command will exit with a nonzero status. On my personal laptop, this is not true. So, now we wait for the condition "nonzero exit status and nonempty output." Five retries is no longer enough, so I increased it to 100.Finally, I changed all mentions of
docker-compose
to be insteaddocker compose
. They are different, though on CircleCI I think thatdocker-compose
was just a wrapper that forwarded todocker compose
. The original Pythondocker-compose
is completely replaced by Docker's "compose" plugin (docker compose
, written in Go).The tests now pass on my personal laptop. Let's see what CircleCI thinks of these changes.