@@ -156,7 +156,6 @@ def check_default_persistentvolumeclaim_readwriteonce(k8s_api_instance):
156156 """
157157 3. Check if PV got succesfully created using ReadWriteOnce
158158 """
159-
160159 # 3. Check if PV got succesfully created using ReadWriteOnce
161160 logger .debug ("check if the created PV supports ReadWriteOnce" )
162161
@@ -192,13 +191,12 @@ def __init__(self, k8s_api_instance):
192191 self .pvc_name = PVC_NAME
193192 self .k8s_api_instance = k8s_api_instance
194193 self .return_code = None
195- self .return_message = "return message "
194+ self .return_message = "return_message: FAILED "
196195
197196
198197 def prepare (self , k8s_api_instance ):
199198 print ("prepare" )
200199 try :
201- # Get the list of PVCs in the namespace and filter by name
202200 pvc_list = k8s_api_instance .list_namespaced_persistent_volume_claim (namespace = self .namespace )
203201 for pvc in pvc_list .items :
204202 if pvc .metadata .name == self .pvc_name :
@@ -239,11 +237,11 @@ def __enter__(self):
239237
240238 def __exit__ (self , exc_type , exc_value , traceback ):
241239 self .clean ()
242- logger .debug (f"return_code:{ self .return_code } " )
243-
244240 if self .return_code == 0 :
245241 self .return_message = "all tests passed"
246242
243+ logger .debug (f"return_code:{ self .return_code } { self .return_message } " )
244+
247245 gen_sonobuoy_result_file (self .return_code , self .return_message , os .path .basename (__file__ ))
248246 print (f"Exiting the context { self .k8s_api_instance } " )
249247 if exc_type :
0 commit comments