Split out bootstrap tests for CircleCI#8768
Conversation
* report to tinybird * ensure that test results are reported with the job step
alexrashed
left a comment
There was a problem hiding this comment.
We will extend the bootstrap tests quite a lot in the future (we have plenty of use-cases for these lifecycle tests), so this is nice ground-work preparing the tests to come.
I only found a small thing about the creation of the host directories, afterwards we're good to go! 🚀
| 'LocalStack container named "%s" is already running' % self.container.name | ||
| ) | ||
|
|
||
| config.dirs.mkdirs() |
There was a problem hiding this comment.
I guess this line was added because some tests failed with the new bootstrap tests (because it seems that they were depending on the CLI tests). But imho this doesn't belong here, because the LocalstackContainer class does not define any volume mounts for the config dirs on its own.
The mkdirs creates the directories depending on where it's executed. If it's executed in Docker, it will create the directories for within the Docker container. If it's executed on the host, it will create the directories for the host system.
The creation of the directories at runtime - within the container - is invoked in start_infra:
localstack/localstack/services/infra.py
Line 373 in f48dbda
In our case here, since it's executed before the container is started, it will create the host directories.
Since these mounts are not configured by the LocalstackContainer class, but by a using component, it is also in the responsibility of this using compontent to create the directories.
For starting with the CLI, the directories are created in prepare_docker_start:
localstack/localstack/utils/bootstrap.py
Line 517 in 71cfcfe
This is a utility function used in combination with
bootstrap.configure_container, which configures the volumes.
TL/DR: Creating the dirs is in the responsibility of the users of this class. Please move this line to the caller(s).
There was a problem hiding this comment.
That makes sense, thanks.
alexrashed
left a comment
There was a problem hiding this comment.
Thanks for addressing the comment! Looking good! 🚀 ![]()
Move the bootstrap tests into their own location and run them in CircleCI