You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error seems to simply come from how the project name is defined (-p pytest/tmp/foo) as the slashes should be trimmed. The actual name of the created container is pytesttmpfoo-elasticsearch-1 so the project name should be pytesttmpfoo. The following commands exits normally:
$ docker-compose --project-directory /tmp/foo/tests -f /tmp/foo/tests/docker-compose.yml -p "pytest/tmp/foo" port elasticsearch 9200
no container found for elasticsearch_1
Hello !
I've run into an issue, which I think may be caused by my very recent version of docker-compose (2.2.0).
Minimal reproduction
I created a project in /tmp/foo with following files:
tests/docker-compose.yml
tests/conftest.py
tests/test_foo.py
Result
pytest
fails with the following message:The error seems to simply come from how the project name is defined (
-p pytest/tmp/foo
) as the slashes should be trimmed. The actual name of the created container ispytesttmpfoo-elasticsearch-1
so the project name should bepytesttmpfoo
. The following commands exits normally:I'm not sure whether this unexpected behavior comes from docker-compose or this project, so I stick with reporting it in an issue even though it seems easy to fix here: https://github.com/lovelysystems/lovely-pytest-docker/blob/master/src/lovely/pytest/docker/compose.py#L210.
The text was updated successfully, but these errors were encountered: