Docker-based integration tests #6712
Labels
C: tests
Testing and related things
state: needs discussion
This needs some more discussion
type: maintenance
Related to Development and Maintenance Processes
What's the problem this feature will solve?
When writing automated tests for issues that depend on system setup or environment, stubbing out or mocking the related interfaces can be difficult or less robust than full integration tests:
os.*
orssl.*
) creates a maintenance overhead if we change the implementation laterDescribe the solution you'd like
Use Docker to execute integration tests that can be invoked locally (opt-in) and in CI.
This should not impact existing functional and unit tests, but enable new test strategies for scenarios that require more isolation or prerequisites that depend on global state in the OS, filesystem, or network.
Examples that could benefit:
The specific tasks required to close this issue would probably be:
tests.lib.PipTestEnvironment
.pip.conf
Alternative Solutions
autouse=True
). This would also need some higher-level orchestration or commands to actually execute and accumulate the test output.Additional context
Azure pipelines support Docker for Linux (via
ubuntu-16.04
) and Windows (viawin1803
) per this page.There is not a clear winner with regards to pytest plugins, but having a simple helper that executes commands in a container spawned from a pre-defined image (or one of a set created for the test) should not be too much.
The text was updated successfully, but these errors were encountered: