Skip to content

Commit 0a54a9f

Browse files
committed
indentation
Signed-off-by: Katharina Trentau <[email protected]>
1 parent e00043e commit 0a54a9f

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

Tests/kaas/k8s-default-storage-class/k8s-default-storage-class-check.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def create_pvc_pod(
107107
namespace, body_pvc
108108
)
109109
k8s_api_instance.read_namespaced_persistent_volume_claim(name=pvc_name, namespace=namespace)
110-
logger.debug(f"created pvc successfully")
110+
logger.debug("created pvc successfully")
111111

112112
# 2. Create a pod which makes use of the PersistantVolumeClaim
113113
logger.debug(f"create pod: {pod_name}")
@@ -136,11 +136,10 @@ def create_pvc_pod(
136136
namespace, pod_body, _preload_content=False,
137137
)
138138
k8s_api_instance.read_namespaced_pod(name=pod_name, namespace=namespace)
139-
logger.debug(f"created pod successfully")
139+
logger.debug("created pod successfully")
140140
pod_info = json.loads(api_response.read().decode("utf-8"))
141141
pod_status = pod_info["status"]["phase"]
142142

143-
144143
retries = 0
145144
while pod_status != "Running" and retries <= num_retries:
146145
api_response = k8s_api_instance.read_namespaced_pod(
@@ -170,10 +169,7 @@ def check_default_persistentvolumeclaim_readwriteonce(
170169
logger.debug("check if the created PV supports ReadWriteOnce")
171170
api_response = k8s_api_instance.list_persistent_volume(_preload_content=False)
172171
if not api_response:
173-
raise SCSTestException(
174-
"No persistent volume found",
175-
return_code=1,
176-
)
172+
raise SCSTestException("No persistent volume found",return_code=1,)
177173

178174
pv_info = json.loads(api_response.read().decode("utf-8"))
179175
pv_list = pv_info["items"]
@@ -212,7 +208,7 @@ def check_csi_provider(k8s_core_api, allowed_csi_prov=ALLOWED_CSI_PROV):
212208
return_code=33,
213209
)
214210
if not csi_list:
215-
logger.info("CSI-Provider: No CSI Provider found.")
211+
logger.info("CSI-Provider: No CSI Provider found.")
216212
return 0
217213

218214

@@ -298,8 +294,8 @@ def __enter__(self):
298294
return self
299295

300296
def __exit__(self, exc_type, exc_value, traceback):
301-
# if self.return_code != 4:
302-
# self.clean()
297+
if self.return_code != 4:
298+
self.clean()
303299
if self.return_code == 0:
304300
self.return_message = "all tests passed"
305301
if isinstance(exc_value, SCSTestException):

0 commit comments

Comments
 (0)