Skip to content

Commit edb6dc1

Browse files
committed
dividing 404
Signed-off-by: Katharina Trentau <[email protected]>
1 parent d853396 commit edb6dc1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ def create_pvc_pod(
9292
# 1. Create PersistantVolumeClaim
9393
logger.debug(f"create pvc: {pvc_name}")
9494

95-
creationflag = 2
96-
9795
pvc_meta = client.V1ObjectMeta(name=pvc_name)
9896
pvc_resources = client.V1ResourceRequirements(
9997
requests={"storage": "1Gi"},
@@ -110,8 +108,9 @@ def create_pvc_pod(
110108
api_response = k8s_api_instance.create_namespaced_persistent_volume_claim(
111109
namespace, body_pvc
112110
)
113-
try k8s_api_instance.read_namespaced_persistent_volume_claim(name=pvc_name, namespace=namespace):
114-
logger.debug(f"created pvc successfully {creationflag}")
111+
try:
112+
k8s_api_instance.read_namespaced_persistent_volume_claim(name=pvc_name, namespace=namespace)
113+
logger.debug("created pvc successfully")
115114
except ApiException as api_exception:
116115
logger.info(f"code {api_exception.status}")
117116
if api_exception.status == 404:
@@ -148,7 +147,7 @@ def create_pvc_pod(
148147
namespace, pod_body, _preload_content=False,
149148
)
150149
try:
151-
k8s_api_instance.read_namespaced_pod(name=pod_name, namespace=namespace):
150+
k8s_api_instance.read_namespaced_pod(name=pod_name, namespace=namespace)
152151
logger.debug(f"created pod successfully")
153152
except ApiException as api_exception:
154153
logger.info(f"code {api_exception.status}")

0 commit comments

Comments
 (0)