Tags: cldmnky/dockertest
Tags
fix: parse volume mounts using the same function as docker cli (ory#274) volume mount paths should be of the form: `<src>:<dest>[:<options>]` Docs: https://docs.docker.com/storage/bind-mounts/#choose-the--v-or---mount-flag https://docs.docker.com/storage/volumes/#choose-the--v-or---mount-flag `src` can either be the name of a docker volume OR an absolute path on the host MountParser assumes that it's parsing a local absolute path for the `src` arg. However, as mentioned above, it's also legal to use a named docker volume. In addition, there can be the optional `options` section, with an additional colon. Rather than trying to capture all the edge cases coding it ourselves, we just import the same function that docker-cli uses to parse the volume.
feat: add basic network management (ory#188) Related ory#163 This PR adds three things (in order from smaller to bigger): * Getting a container descriptor inside container. This is useful when tests already running inside container with mounted docker socket for container management. * Execution commands inside running container. This is useful "in general". I.e. we have project with test case that simulates RabbitMQ restarts using `rabbitmqctl stop_app` and `rabbitmqctl start_app`. Also it's used in new tests. * Basic network management. Docker networks can be created and deleted using `Pool`, containers can be connected to network using `BuildAndRunWithOptions` and `RunWithOptions`, already running containers can be connected to network using `ConnectToNetwork`. Currrently it's working pretty good but requires too much boilerplate with `docker` package for network management and commands execution. Also it helps in cases metioned in ory#163 when you need to run some end-to-end or integration tests with multiple linked containers.
PreviousNext