这是indexloc提供的服务,不要输入任何密码
Skip to content

Allow running test suite Docker in Docker #259

@m90

Description

@m90

The integration tests for this tool are quite extensive and very valuable, however they come with one big drawback: they are written with the assumption of a clean and otherwise unused Docker daemon in mind. If I have some random container running on my setup, tests will fail.

It would be interesting to investigate whether the test suite can be moved to run in a container that runs Docker (i.e. dind), so the tests will always have a clean slate. Ideally this would allow developers to run some script like ./test.sh that will then run all tests in a container that spins up other containers just like it would be run in CI. Also, when creating such a test.sh script, filtering the tests to be run by a given pattern (e.g. ./test.sh s3 would only run the s3 test) would be a very handy feature.

The one implementation detail I'm not sure about right now is what this means for building the image under test. Obviously, this would need to happen in the container, but I wonder if there is some way of making sure layers are cached on the host instead. Else, each test run would need to pull images and build from scratch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions