Skip to content

Commit 6b1cc87

Browse files
authored
Merge pull request #881 from mdujava/tmpdir_and_persistence
tmpdir and persistence
2 parents ed4a447 + 536c45f commit 6b1cc87

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

testsuite/certificates/persist.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __init__(self) -> None:
1818
@property
1919
def _directory(self):
2020
if not self._dir:
21-
self._dir = tempfile.mkdtemp(prefix="tls_certs", dir=os.environ.get("resultsdir"))
21+
self._dir = tempfile.mkdtemp(prefix="tls_certs_", dir=os.environ.get("resultsdir"))
2222
return self._dir
2323

2424
@abstractmethod

testsuite/tests/apicast/parameters/test_apicast_access_log_file.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"""
66

77
import re
8+
import tempfile
89
from typing import Tuple
910
from urllib.parse import urlparse
1011

@@ -50,7 +51,7 @@ def run(hits):
5051

5152

5253
@pytest.fixture
53-
def read_log(staging_gateway, tmpdir):
54+
def read_log(staging_gateway):
5455
"""Read log from gateway by copying it to a local directory.
5556
5657
Returns a tuple containing the content of the file and also the
@@ -60,6 +61,11 @@ def read_log(staging_gateway, tmpdir):
6061
def read(filename) -> Tuple[str, int]:
6162
source = f"/tmp/{filename}"
6263

64+
# tmpdir is used as destination for files to rsync, file is only read
65+
# into string, since file is only used in this function it does not
66+
# need to be in $resultsdir, also dir needs to be created every time,
67+
# e.g in case --load is used and tmpdir does no longer exists
68+
tmpdir = tempfile.mkdtemp(prefix="apicast_logs_")
6369
dest = f"{tmpdir}/{filename}"
6470

6571
# copy log file from apicast to local

0 commit comments

Comments
 (0)