diff --git a/e2e/keywords/workload.resource b/e2e/keywords/workload.resource index 6d8b91d6d0..be66c747d2 100644 --- a/e2e/keywords/workload.resource +++ b/e2e/keywords/workload.resource @@ -32,12 +32,12 @@ Keep writing data to statefulset ${idx} Check deployment ${idx} works ${pod_name} = get_workload_pod_name ${deployment_list}[${idx}] ${pod_data_checksum} = write_pod_random_data ${pod_name} 1024 - check_pod_data ${pod_name} ${pod_data_checksum} + check_pod_data_checksum ${pod_name} ${pod_data_checksum} Check statefulset ${idx} works ${pod_name} = get_workload_pod_name ${statefulset_list}[${idx}] ${pod_data_checksum} = write_pod_random_data ${pod_name} 1024 - check_pod_data ${pod_name} ${pod_data_checksum} + check_pod_data_checksum ${pod_name} ${pod_data_checksum} Wait for statefulset ${idx} stable wait_for_workload_pod_stable ${statefulset_list}[${idx}] diff --git a/e2e/libs/keywords/workload_keywords.py b/e2e/libs/keywords/workload_keywords.py index 10c0299876..931c4f48ee 100644 --- a/e2e/libs/keywords/workload_keywords.py +++ b/e2e/libs/keywords/workload_keywords.py @@ -34,8 +34,8 @@ def keep_writing_pod_data(self, pod_name): def write_pod_random_data(self, pod, size_in_mb): return write_pod_random_data(pod, size_in_mb) - def check_pod_data(self, pod_name, checksum): - check_pod_data(pod_name, checksum) + def check_pod_data_checksum(self, pod_name, checksum): + check_pod_data_checksum(pod_name, checksum) def cleanup_deployments(self, deployment_names): for name in deployment_names: diff --git a/e2e/libs/workload/workload.py b/e2e/libs/workload/workload.py index 232aa961fd..8ea679532f 100644 --- a/e2e/libs/workload/workload.py +++ b/e2e/libs/workload/workload.py @@ -273,7 +273,8 @@ def keep_writing_pod_data(pod_name, size_in_mb=256, path="/data/overwritten-data logging(f"Created process to keep writing pod {pod_name}") return res -def check_pod_data(pod_name, checksum, path="/data/random-data"): +def check_pod_data_checksum(pod_name, checksum, path="/data/random-data"): + logging(f"Checking pod {pod_name} data checksum") api = client.CoreV1Api() cmd = [ '/bin/sh', @@ -284,9 +285,9 @@ def check_pod_data(pod_name, checksum, path="/data/random-data"): api.connect_get_namespaced_pod_exec, pod_name, 'default', command=cmd, stderr=True, stdin=False, stdout=True, tty=False) - logging(f"Got {path} checksum = {_checksum},\ - expected checksum = {checksum}") - assert _checksum == checksum + assert _checksum == checksum, \ + f"Got {path} checksum = {_checksum}\n" \ + f"Expected checksum = {checksum}" def wait_for_workload_pod_stable(workload_name): stable_pod = None