Mercurial > hg > orthanc-tests
changeset 822:f094845ac9a2 attach-custom-data
fix
| author | Alain Mazy <am@orthanc.team> |
|---|---|
| date | Tue, 27 May 2025 17:07:49 +0200 |
| parents | cc4f3fbcd075 |
| children | ba3295716819 |
| files | NewTests/helpers.py |
| diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/NewTests/helpers.py Tue May 27 16:29:49 2025 +0200 +++ b/NewTests/helpers.py Tue May 27 17:07:49 2025 +0200 @@ -185,6 +185,9 @@ # shutil.rmtree(os.path.join(root, d)) # shutil.rmtree(storage_path, ignore_errors=True) else: + # create the directory with user ownership before docker creates it + pathlib.Path(storage_path).mkdir(parents=True, exist_ok=True) + # clear the directory (but you need to be root from the container !) cmd = [ "docker", "run", "--rm", @@ -195,9 +198,6 @@ ] subprocess.run(cmd, check=True) - # create the directory with user ownership - pathlib.Path(storage_path).mkdir(parents=True, exist_ok=True) - @classmethod def is_storage_empty(cls, storage_name: str):
