mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-27 17:25:08 +00:00
Cover all cases
This commit is contained in:
parent
c6717a1720
commit
31518803ad
2 changed files with 7 additions and 7 deletions
|
|
@ -43,15 +43,11 @@ def compose(env_file: str):
|
|||
|
||||
@pytest.fixture(autouse=True, scope="session")
|
||||
def frappe_setup(compose: Compose):
|
||||
# Stop all containers in `test` project if they are running.
|
||||
# We don't care if it fails.
|
||||
with suppress(subprocess.CalledProcessError):
|
||||
compose.stop()
|
||||
|
||||
compose("up", "-d", "--quiet-pull")
|
||||
yield
|
||||
|
||||
with suppress(subprocess.CalledProcessError):
|
||||
compose.stop()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from contextlib import suppress
|
||||
import os
|
||||
import ssl
|
||||
import subprocess
|
||||
|
|
@ -46,6 +47,9 @@ class Compose:
|
|||
self("exec", "-T", *cmd)
|
||||
|
||||
def stop(self) -> None:
|
||||
# Stop all containers in `test` project if they are running.
|
||||
# We don't care if it fails.
|
||||
with suppress(subprocess.CalledProcessError):
|
||||
subprocess.check_call(self.base_cmd + ("down", "-v", "--remove-orphans"))
|
||||
|
||||
def bench(self, *cmd: str) -> None:
|
||||
|
|
|
|||
Loading…
Reference in a new issue