From 9cc32ce9fd4bd35917be287c0b7feb343b1d580b Mon Sep 17 00:00:00 2001 From: Katharina Trentau Date: Wed, 4 Sep 2024 12:32:12 +0200 Subject: [PATCH] re-added gen_sonobuoy_result_file Signed-off-by: Katharina Trentau --- Tests/kaas/k8s-default-storage-class/helper.py | 2 +- .../k8s-default-storage-class-check.py | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Tests/kaas/k8s-default-storage-class/helper.py b/Tests/kaas/k8s-default-storage-class/helper.py index ed917f408..1e1d5032e 100644 --- a/Tests/kaas/k8s-default-storage-class/helper.py +++ b/Tests/kaas/k8s-default-storage-class/helper.py @@ -39,7 +39,6 @@ def __init__(self, *args, return_code: int): def setup_k8s_client(kubeconfigfile=None): - if kubeconfigfile: logger.debug(f"using kubeconfig file '{kubeconfigfile}'") config.load_kube_config(kubeconfigfile) @@ -55,6 +54,7 @@ def setup_k8s_client(kubeconfigfile=None): k8s_storage_client, ) + def gen_sonobuoy_result_file(error_n: int, error_msg: str, test_file_name: str): test_name = test_file_name.replace(".py", "") test_status = "passed" diff --git a/Tests/kaas/k8s-default-storage-class/k8s-default-storage-class-check.py b/Tests/kaas/k8s-default-storage-class/k8s-default-storage-class-check.py index f9171f530..914cdd966 100644 --- a/Tests/kaas/k8s-default-storage-class/k8s-default-storage-class-check.py +++ b/Tests/kaas/k8s-default-storage-class/k8s-default-storage-class-check.py @@ -39,7 +39,6 @@ def check_default_storageclass(k8s_client_storage): - api_response = k8s_client_storage.list_storage_class(_preload_content=False) storageclasses = api_response.read().decode("utf-8") storageclasses_dict = json.loads(storageclasses) @@ -138,7 +137,6 @@ def check_default_persistentvolumeclaim_readwriteonce(k8s_api_instance, storage_ # Check if pod is up and running: retries = 0 while pod_status != "Running" and retries <= 30: - api_response = k8s_api_instance.read_namespaced_pod( pod_name, namespace, _preload_content=False ) @@ -193,7 +191,6 @@ def check_default_persistentvolumeclaim_readwriteonce(k8s_api_instance, storage_ def main(argv): - initialize_logging() return_code = 0 return_message = "return_message: FAILED"