Comments (4)
I see no problem on the behavior of the library. The library already work as I need.
My only concern is the documentation.
from pytest-docker.
Hum... I'm not sure how it works on the docker-compose side. But pytest-docker
already supports multiple files. It is just not documented.
The bellow example would work only with pytest-docker
installed:
# test.py
import pytest
@pytest.fixture(scope="session")
def docker_compose_file(pytestconfig):
return ("docker-compose-1.yml", "docker-compose-2.yml") # here we define all compose files needed
@pytest.fixture(scope="module")
def containers(docker_services):
docker_services.wait_until_responsive(
timeout=30.0,
pause=0.5,
check=lambda: True,
)
def test_dumb(containers):
assert 1 == 1
# docker-compose-1.yml
version: "3"
services:
container_1:
image: python:3.9
container_name: container_1
command: ["python", "--version"]
# docker-compose-2.yml
services:
container_2:
image: python:3.9
container_name: container_2
command: ["python", "--version"]
Just run pytest test.py
and for a while you will be able to see both containers running, started by pytest-docker
.
I was using it in a bigger project with multiple files for integration and migration tests and it was working fine.
from pytest-docker.
Hello. pytest-docker
currently uses docker-compose v1
. The feature you linked is available in docker-compose v2
. This new version is not written in Python and so it's not possible to install it together with this library.
Support for a docker-compose v2
would require a major change to this library ― requiring users to provide their own installation of docker-compose
or maybe allowing both.
I will try looking into this but please understand that it might take some time.
from pytest-docker.
This new version is not written in Python and so it's not possible to install it together with this library.
Support for a
docker-compose v2
would require a major change to this library ― requiring users to provide their own installation ofdocker-compose
or maybe allowing both.
@Luminaar AFAIU, as long as the shell environment is configured in a way that the subprocess.check_output('docker-compose ...')
finds the v2 installation, wouldn't everything work out of the box?
Obviously docker-compose v2 can't be installed as a python dependency anymore, but maybe this is what @edinhodiluviano is observing?
from pytest-docker.
Related Issues (20)
- Support for Pytest 8 HOT 1
- Swarm support HOT 1
- Support for other forms of `$DOCKER_HOST` passing
- How to add parametrize to our test case with pytest-docker? HOT 1
- Version Conflict with PyYAML 6.0 HOT 4
- Support for docker-compose V2 HOT 4
- Support for pytest v7
- Endpoint empty error HOT 5
- Project maintenance and activity HOT 1
- Skipping the setup in Gitlab CI HOT 3
- Insufficient removal of control characters on windows with cmd.exe as shell HOT 2
- How to wait for container to become healthy? HOT 3
- Allow for overriding of pytest fixture scope HOT 5
- same set of tests, many docker-compose.yml? HOT 1
- Fixture `docker_ip` not found HOT 4
- Utility to run arbitrary commands on a container HOT 2
- Generated docker compose command fails HOT 2
- Docker in docker HOT 4
- Executing multiple commands for `docker_setup` and `docker_cleanup` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytest-docker.