Test: handle non-existence of /run/osbuild in test/run/test_mount.py
The directory does not exist when the unit test is run in CI. Handle this case by ensuring that parent directories are created as needed. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
1a2776bf1b
commit
975965510b
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ def tmpdir_fixture():
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def make_arguments(opts):
|
def make_arguments(opts):
|
||||||
os.mkdir("/run/osbuild/api")
|
os.makedirs("/run/osbuild/api")
|
||||||
with open("/run/osbuild/api/arguments", "w", encoding="utf-8") as f:
|
with open("/run/osbuild/api/arguments", "w", encoding="utf-8") as f:
|
||||||
json.dump(opts, f)
|
json.dump(opts, f)
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue