Occasionally a network error prevents Docker from starting boulder causing
Travis tests to fail like it did at
https://travis-ci.org/certbot/certbot/jobs/282923098. This works around the
problem by using travis_retry to try to start boulder again if it fails.
This also moves the logic of waiting for boulder to start into
tests/boulder-fetch.sh so people running integration tests locally can benefit.
This removes a lot of setup code we used to need in order to get Boulder to run,
and should reduce brittleness of tests based on Boulder changes.
This also unblocks Boulder from upgrading to MariaDB 10.1 in integration tests,
since changing to 10.1 syntax for user creation would break the current certbot
integration tests (which run 10.0).
This was recently introduced on the Boulder side.
Note: long-term we want to have the client tests run the same setup steps as
Boulder does, with the same script. This is a quick fix to unbreak the build.
This prevents the integration tests from getting run before the boulder
processes have finished booting in most cases. There's still some small
races with debug ports going up before RPC ports, but this flushes the
big ones (specifically, the WFE ports), and the boulder devs going to
fix the rest in integration-test.py over time.
This also makes boulder-start.sh a blocking operation. Now the TravisCI
integration tests no longer requires boulder-start.sh, we can let the
other priority of being easier for users to control (that is, basically,
make it easy to Ctrl-C) take over. That plus the idea that
self-daemonizing code is tricky to get right, especially over multiple
platforms led me to not trying to get start.py to make itself
asynchronous.
Most of this change is code movement in order to allow developers to run
boulder-start.sh once and boulder-integration.sh many times while also
not duplicating that code in order to run the tests in TravisCI.
I'm not a huge fan of both the letsencrypt's shell scripts and boulder's
integration-test.py having hard-coded file dependencies in the other's
repo.
This, however, seemed like the smallest path to code that would
spuriously break less. All the designs I was able to come up that were
maybe smaller changes either had the "starts tests before the servers
are up" problem or with a "each repo uses another repo's test code file"
problem. Those problem on top of the "it's a bigger change" problem led
me here.