Skip to content

Commit b803f8f

Browse files
committed
improving test cleanups
1 parent 2b00a3a commit b803f8f

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,9 @@ poetry run pytest
1515
# instead, especially during development, it's recommended to keep the Gitlab container running and not terminate it at the end.
1616
poetry run pytest --reuse-containers
1717
```
18+
19+
When you used `--reuse-containers` to run the tests, you can stop all containers, networks, etc. using the following command:
20+
21+
```shell
22+
make clean
23+
```

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.PHONY: clean-test-infrastructure
2-
clean-test-infrastructure:
2+
clean:
33
docker ps -aq --filter "label=creator=pytest-docker-tools" | xargs docker rm -f
4+
docker volume ls --filter "label=creator=pytest-docker-tools" --format '{{ .Name }}' | xargs docker volume rm
5+
docker network ls --filter "label=creator=pytest-docker-tools" --format '{{ .Name }}' | xargs docker network rm

tests/infrastructure/network.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from pytest_docker_tools import network
33

44
network = network(
5-
name=f"{NAME_PREFIX}network",
5+
name=f"{NAME_PREFIX}_network",
66
driver="bridge",
77
scope="session",
88
)

0 commit comments

Comments
 (0)