Skip to content

Commit

Permalink
check for dir back
Browse files Browse the repository at this point in the history
Signed-off-by: Katharina Trentau <[email protected]>
  • Loading branch information
fraugabel authored and mbuechse committed Nov 8, 2024
1 parent cb8e432 commit 1092abe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tests/kaas/k8s-default-storage-class/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import sys
import logging
from kubernetes import client, config
import os

manual_result_file_template = {
"name": None,
Expand Down Expand Up @@ -70,5 +71,8 @@ def gen_sonobuoy_result_file(error_n: int, error_msg: str, test_file_name: str):
result_file["status"] = test_status
result_file["details"]["messages"] = error_msg

directory_path = os.path.dirname(f"./{test_name}.result.yaml")
os.makedirs(directory_path, exist_ok=True)

with open(f"./{test_name}.result.yaml", "w") as file:
yaml.dump(result_file, file)

0 comments on commit 1092abe

Please sign in to comment.