-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traverse directories up to find docker-compose.yml file #63
Comments
Actually docker_project fixture is session scoped.
This would require to change the scope of this fixture. This fixture could be change to a factory function that generates a new project each time. |
Toilal
added a commit
to Toilal/pytest-docker-compose
that referenced
this issue
Sep 11, 2020
…ns inside test directory structure. docker-compose configuration is now loaded from 3 directories: - Directory containing the actual test - "docker-compose" directory at the same level of the directory containing the actual test - Current working directory. Effective directory is the first one in this list where docker-compose can run properly. Effective directory can be forced with --docker-compose-directory option. All docker_project objects are now registered in all_docker_projects registry, a simple dict that keeps all docker_project instances involved in the pytest session. At the same time, docker_project session scoped fixture has been dropped. This change makes possible to have different docker_project instances for the run session, while still allowing to reuse the docker_project instance when the same configuration is involved. ContainerGetter has been improved to wait for container to be in running state before returning. To retrieve a stopped service, user can use set wait_running argument to False. This changes makes tests more stable. (In my use case, network_info was often empty because it was retrieved when a container was still starting or restarting) Some broken tests were fixed too. I also tried to update CircleCI configuration to make it test with Python 3.7/3.8. Close pytest-docker-compose#43 Close pytest-docker-compose#63 BREAKING CHANGE: --docker-compose option doesn't support "," separator anymore and should now be used many times to include many configuration files. BREAKING CHANGE: docker_project fixture has been dropped, use all_docker_projects instead.
Toilal
added a commit
to Toilal/pytest-docker-compose
that referenced
this issue
Sep 11, 2020
…ns inside test directory structure. docker-compose configuration is now loaded from 3 directories: - Directory containing the actual test - "docker-compose" directory at the same level of the directory containing the actual test - Current working directory. Effective directory is the first one in this list where docker-compose can run properly. Effective directory can be forced with --docker-compose-directory option. All docker_project objects are now registered in all_docker_projects registry, a simple dict that keeps all docker_project instances involved in the pytest session. At the same time, docker_project session scoped fixture has been dropped. This change makes possible to have different docker_project instances for the run session, while still allowing to reuse the docker_project instance when the same configuration is involved. ContainerGetter has been improved to wait for container to be in running state before returning. To retrieve a stopped service, user can use set wait_running argument to False. This changes makes tests more stable. (In my use case, network_info was often empty because it was retrieved when a container was still starting or restarting) Some broken tests were fixed too. I also tried to update CircleCI configuration to make it test with Python 3.7/3.8. Close pytest-docker-compose#43 Close pytest-docker-compose#63 BREAKING CHANGE: --docker-compose option doesn't support "," separator anymore and should now be used many times to include many configuration files. BREAKING CHANGE: docker_project fixture has been dropped, use all_docker_projects instead.
Toilal
added a commit
to Toilal/pytest-docker-compose
that referenced
this issue
Sep 11, 2020
…ns inside test directory structure. docker-compose configuration is now loaded from 3 directories: - Directory containing the actual test - "docker-compose" directory at the same level of the directory containing the actual test - Current working directory. Effective directory is the first one in this list where docker-compose can run properly. Effective directory can be forced with --docker-compose-directory option. All docker_project objects are now registered in all_docker_projects registry, a simple dict available as a session scoped fixture that keeps all docker_project instances involved in the pytest session. At the same time, docker_project fixture has been dropped. This change makes possible to have different docker_project instances for the run session, while still allowing to reuse the docker_project instance when the same configuration is involved. ContainerGetter has been improved to wait for container to be in running state before returning. To retrieve a stopped service, user can use set wait_running argument to False. This changes makes tests more stable. (In my use case, network_info was often empty because it was retrieved when a container was still starting or restarting) Some broken tests were fixed too. I also tried to update CircleCI configuration to make it test with Python 3.7/3.8. Close pytest-docker-compose#43 Close pytest-docker-compose#63 BREAKING CHANGE: --docker-compose option doesn't support "," separator anymore and should now be used many times to include many configuration files. BREAKING CHANGE: docker_project fixture has been dropped, use all_docker_projects instead.
Toilal
added a commit
to Toilal/pytest-docker-compose
that referenced
this issue
Sep 11, 2020
…ns inside test directory structure. docker-compose configuration is now loaded from 3 directories: - Directory containing the actual test - "docker-compose" directory at the same level of the directory containing the actual test - Current working directory. Effective directory is the first one in this list where docker-compose can run properly. Effective directory can be forced with --docker-compose-directory option. All docker_project objects are now registered in all_docker_projects registry, a simple dict available as a session scoped fixture that keeps all docker_project instances involved in the pytest session. At the same time, docker_project fixture has been dropped. This change makes possible to have different docker_project instances for the run session, while still allowing to reuse the docker_project instance when the same configuration is involved. ContainerGetter has been improved to wait for container to be in running state before returning. To retrieve a stopped service, user can use set wait_running argument to False. This changes makes tests more stable. (In my use case, network_info was often empty because it was retrieved when a container was still starting or restarting) Some broken tests were fixed too. I also tried to update CircleCI configuration to make it test with Python 3.7/3.8. Close pytest-docker-compose#43 Close pytest-docker-compose#63 BREAKING CHANGE: --docker-compose option doesn't support "," separator anymore and should now be used many times to include many configuration files. BREAKING CHANGE: docker_project fixture has been dropped, use all_docker_projects instead.
Toilal
added a commit
to Toilal/pytest-docker-compose
that referenced
this issue
Feb 10, 2021
…ns inside test directory structure. docker-compose configuration is now loaded from 3 directories: - Directory containing the actual test - "docker-compose" directory at the same level of the directory containing the actual test - Current working directory. Effective directory is the first one in this list where docker-compose can run properly. Effective directory can be forced with --docker-compose-directory option. All docker_project objects are now registered in all_docker_projects registry, a simple dict available as a session scoped fixture that keeps all docker_project instances involved in the pytest session. At the same time, docker_project fixture has been dropped. This change makes possible to have different docker_project instances for the run session, while still allowing to reuse the docker_project instance when the same configuration is involved. ContainerGetter has been improved to wait for container to be in running state before returning. To retrieve a stopped service, user can use set wait_running argument to False. This changes makes tests more stable. (In my use case, network_info was often empty because it was retrieved when a container was still starting or restarting) Some broken tests were fixed too. I also tried to update CircleCI configuration to make it test with Python 3.7/3.8. Close pytest-docker-compose#43 Close pytest-docker-compose#63 BREAKING CHANGE: --docker-compose option doesn't support "," separator anymore and should now be used many times to include many configuration files. BREAKING CHANGE: docker_project fixture has been dropped, use all_docker_projects instead.
Toilal
added a commit
to Toilal/pytest-docker-compose
that referenced
this issue
Feb 10, 2021
…ns inside test directory structure. docker-compose configuration is now loaded from 3 directories: - Directory containing the actual test - "docker-compose" directory at the same level of the directory containing the actual test - Current working directory. Effective directory is the first one in this list where docker-compose can run properly. Effective directory can be forced with --docker-compose-directory option. All docker_project objects are now registered in all_docker_projects registry, a simple dict available as a session scoped fixture that keeps all docker_project instances involved in the pytest session. At the same time, docker_project fixture has been dropped. This change makes possible to have different docker_project instances for the run session, while still allowing to reuse the docker_project instance when the same configuration is involved. ContainerGetter has been improved to wait for container to be in running state before returning. To retrieve a stopped service, user can use set wait_running argument to False. This changes makes tests more stable. (In my use case, network_info was often empty because it was retrieved when a container was still starting or restarting) Some broken tests were fixed too. I also tried to update CircleCI configuration to make it test with Python 3.7/3.8. Close pytest-docker-compose#43 Close pytest-docker-compose#63 BREAKING CHANGE: --docker-compose option doesn't support "," separator anymore and should now be used many times to include many configuration files. BREAKING CHANGE: docker_project fixture has been dropped, use all_docker_projects instead.
Toilal
added a commit
to Toilal/pytest-docker-compose
that referenced
this issue
Feb 10, 2021
…ns inside test directory structure. docker-compose configuration is now loaded from 3 directories: - Directory containing the actual test - "docker-compose" directory at the same level of the directory containing the actual test - Current working directory. Effective directory is the first one in this list where docker-compose can run properly. Effective directory can be forced with --docker-compose-directory option. All docker_project objects are now registered in all_docker_projects registry, a simple dict available as a session scoped fixture that keeps all docker_project instances involved in the pytest session. At the same time, docker_project fixture has been dropped. This change makes possible to have different docker_project instances for the run session, while still allowing to reuse the docker_project instance when the same configuration is involved. ContainerGetter has been improved to wait for container to be in running state before returning. To retrieve a stopped service, user can use set wait_running argument to False. This changes makes tests more stable. (In my use case, network_info was often empty because it was retrieved when a container was still starting or restarting) Some broken tests were fixed too. I also tried to update CircleCI configuration to make it test with Python 3.7/3.8. Close pytest-docker-compose#43 Close pytest-docker-compose#63 BREAKING CHANGE: --docker-compose option doesn't support "," separator anymore and should now be used many times to include many configuration files. BREAKING CHANGE: docker_project fixture has been dropped, use all_docker_projects instead.
Toilal
added a commit
to Toilal/pytest-docker-compose
that referenced
this issue
Feb 10, 2021
…ns inside test directory structure. docker-compose configuration is now loaded from 3 directories: - Directory containing the actual test - "docker-compose" directory at the same level of the directory containing the actual test - Current working directory. Effective directory is the first one in this list where docker-compose can run properly. Effective directory can be forced with --docker-compose-directory option. All docker_project objects are now registered in all_docker_projects registry, a simple dict available as a session scoped fixture that keeps all docker_project instances involved in the pytest session. At the same time, docker_project fixture has been dropped. This change makes possible to have different docker_project instances for the run session, while still allowing to reuse the docker_project instance when the same configuration is involved. ContainerGetter has been improved to wait for container to be in running state before returning. To retrieve a stopped service, user can use set wait_running argument to False. This changes makes tests more stable. (In my use case, network_info was often empty because it was retrieved when a container was still starting or restarting) Some broken tests were fixed too. I also tried to update CircleCI configuration to make it test with Python 3.7/3.8. Close pytest-docker-compose#43 Close pytest-docker-compose#63 BREAKING CHANGE: --docker-compose option doesn't support "," separator anymore and should now be used many times to include many configuration files. BREAKING CHANGE: docker_project fixture has been dropped, use all_docker_projects instead.
Toilal
added a commit
to Toilal/pytest-docker-compose
that referenced
this issue
Feb 10, 2021
…ns inside test directory structure. docker-compose configuration is now loaded from 3 directories: - Directory containing the actual test - "docker-compose" directory at the same level of the directory containing the actual test - Current working directory. Effective directory is the first one in this list where docker-compose can run properly. Effective directory can be forced with --docker-compose-directory option. All docker_project objects are now registered in all_docker_projects registry, a simple dict available as a session scoped fixture that keeps all docker_project instances involved in the pytest session. At the same time, docker_project fixture has been dropped. This change makes possible to have different docker_project instances for the run session, while still allowing to reuse the docker_project instance when the same configuration is involved. ContainerGetter has been improved to wait for container to be in running state before returning. To retrieve a stopped service, user can use set wait_running argument to False. This changes makes tests more stable. (In my use case, network_info was often empty because it was retrieved when a container was still starting or restarting) Some broken tests were fixed too. I also tried to update CircleCI configuration to make it test with Python 3.7/3.8. Close pytest-docker-compose#43 Close pytest-docker-compose#63 BREAKING CHANGE: --docker-compose option doesn't support "," separator anymore and should now be used many times to include many configuration files. BREAKING CHANGE: docker_project fixture has been dropped, use all_docker_projects instead.
Toilal
added a commit
to Toilal/pytest-docker-compose
that referenced
this issue
Feb 10, 2021
…ns inside test directory structure. docker-compose configuration is now loaded from 3 directories: - Directory containing the actual test - "docker-compose" directory at the same level of the directory containing the actual test - Current working directory. Effective directory is the first one in this list where docker-compose can run properly. Effective directory can be forced with --docker-compose-directory option. All docker_project objects are now registered in all_docker_projects registry, a simple dict available as a session scoped fixture that keeps all docker_project instances involved in the pytest session. At the same time, docker_project fixture has been dropped. This change makes possible to have different docker_project instances for the run session, while still allowing to reuse the docker_project instance when the same configuration is involved. ContainerGetter has been improved to wait for container to be in running state before returning. To retrieve a stopped service, user can use set wait_running argument to False. This changes makes tests more stable. (In my use case, network_info was often empty because it was retrieved when a container was still starting or restarting) Some broken tests were fixed too. I also tried to update CircleCI configuration to make it test with Python 3.7/3.8. Close pytest-docker-compose#43 Close pytest-docker-compose#63 BREAKING CHANGE: --docker-compose option doesn't support "," separator anymore and should now be used many times to include many configuration files. BREAKING CHANGE: docker_project fixture has been dropped, use all_docker_projects instead.
Toilal
added a commit
to Toilal/pytest-docker-compose
that referenced
this issue
Feb 10, 2021
…ns inside test directory structure. docker-compose configuration is now loaded from 3 directories: - Directory containing the actual test - "docker-compose" directory at the same level of the directory containing the actual test - Current working directory. Effective directory is the first one in this list where docker-compose can run properly. Effective directory can be forced with --docker-compose-directory option. All docker_project objects are now registered in all_docker_projects registry, a simple dict available as a session scoped fixture that keeps all docker_project instances involved in the pytest session. At the same time, docker_project fixture has been dropped. This change makes possible to have different docker_project instances for the run session, while still allowing to reuse the docker_project instance when the same configuration is involved. ContainerGetter has been improved to wait for container to be in running state before returning. To retrieve a stopped service, user can use set wait_running argument to False. This changes makes tests more stable. (In my use case, network_info was often empty because it was retrieved when a container was still starting or restarting) Some broken tests were fixed too. I also tried to update CircleCI configuration to make it test with Python 3.7/3.8. Close pytest-docker-compose#43 Close pytest-docker-compose#63 BREAKING CHANGE: --docker-compose option doesn't support "," separator anymore and should now be used many times to include many configuration files. BREAKING CHANGE: docker_project fixture has been dropped, use all_docker_projects instead.
Toilal
added a commit
to Toilal/pytest-docker-compose
that referenced
this issue
Oct 14, 2021
…ns inside test directory structure. docker-compose configuration is now loaded from 3 directories: - Directory containing the actual test - "docker-compose" directory at the same level of the directory containing the actual test - Current working directory. Effective directory is the first one in this list where docker-compose can run properly. Effective directory can be forced with --docker-compose-directory option. All docker_project objects are now registered in all_docker_projects registry, a simple dict available as a session scoped fixture that keeps all docker_project instances involved in the pytest session. At the same time, docker_project fixture has been dropped. This change makes possible to have different docker_project instances for the run session, while still allowing to reuse the docker_project instance when the same configuration is involved. ContainerGetter has been improved to wait for container to be in running state before returning. To retrieve a stopped service, user can use set wait_running argument to False. This changes makes tests more stable. (In my use case, network_info was often empty because it was retrieved when a container was still starting or restarting) Some broken tests were fixed too. I also tried to update CircleCI configuration to make it test with Python 3.7/3.8. Close pytest-docker-compose#43 Close pytest-docker-compose#63 BREAKING CHANGE: --docker-compose option doesn't support "," separator anymore and should now be used many times to include many configuration files. BREAKING CHANGE: docker_project fixture has been dropped, use all_docker_projects instead.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
By default, it would be convenient to make this plugin traverse directories up from the current working directory to find
docker-compose.yml
configuration, instead of using the current working directory only.It will then be possible to use different
docker-compose.yml
configuration only by organizing the configurations inside many directories.So foo1 and bar1 tests will use
it1/docker-compose.yml
, foo2 and bar2 will useit2/docker-compose.yml
.In fact,
docker-compose
itself use this behavior to finddocker-compose.yml
file. So when no--docker-compose
option is given to pytest, it should invokedocker-compose
with no--file
flag at all instead of actual--file docker-compose.yml
.The text was updated successfully, but these errors were encountered: