diff --git a/e2e/keywords/volume.resource b/e2e/keywords/volume.resource index 47815ced3e..076db9a8d9 100644 --- a/e2e/keywords/volume.resource +++ b/e2e/keywords/volume.resource @@ -48,7 +48,7 @@ Wait until replica ${replica_0} rebuilt, delete replica ${replica_2} delete_replica ${volume_name} ${replica_2} Check data is intact - check_data ${volume_name} ${volume_data_checksum} + check_data_checksum ${volume_name} ${volume_data_checksum} Check volume ${idx} works ${volume_data_checksum} = write_volume_random_data ${volume_list}[${idx}] 1024 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/volume_keywords.py b/e2e/libs/keywords/volume_keywords.py index 6caa9cb4b0..10129769ad 100644 --- a/e2e/libs/keywords/volume_keywords.py +++ b/e2e/libs/keywords/volume_keywords.py @@ -49,9 +49,9 @@ def keep_writing_data(self, volume_name): self.volume.keep_writing_data(volume_name) - def check_data(self, volume_name, checksum): + def check_data_checksum(self, volume_name, checksum): logging(f"Checking volume {volume_name} data with checksum {checksum}") - self.volume.check_data(volume_name, checksum) + self.volume.check_data_checksum(volume_name, checksum) def delete_replica(self, volume_name, replica_node): 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/volume/base.py b/e2e/libs/volume/base.py index c9435828c5..6624a425fa 100644 --- a/e2e/libs/volume/base.py +++ b/e2e/libs/volume/base.py @@ -43,7 +43,7 @@ def wait_for_replica_rebuilding_complete(self, volume_name, node_name): return NotImplemented @abstractmethod - def check_data(self, volume_name, checksum): + def check_data_checksum(self, volume_name, checksum): return NotImplemented @abstractmethod diff --git a/e2e/libs/volume/crd.py b/e2e/libs/volume/crd.py index d9bab24f76..d12cc48b1d 100644 --- a/e2e/libs/volume/crd.py +++ b/e2e/libs/volume/crd.py @@ -209,7 +209,7 @@ def wait_for_replica_rebuilding_complete(self, volume_name, node_name): node_name ) - def check_data(self, volume_name, checksum): + def check_data_checksum(self, volume_name, checksum): node_name = self.get(volume_name)["spec"]["nodeID"] endpoint = self.get_endpoint(volume_name) _checksum = self.node_exec.issue_cmd( diff --git a/e2e/libs/volume/rest.py b/e2e/libs/volume/rest.py index 7bb43d36c7..bbbaf8c486 100644 --- a/e2e/libs/volume/rest.py +++ b/e2e/libs/volume/rest.py @@ -123,7 +123,7 @@ def wait_for_replica_rebuilding_complete(self, volume_name, node_name): time.sleep(RETRY_INTERVAL) assert completed - def check_data(self, volume_name, checksum): + def check_data_checksum(self, volume_name, checksum): return NotImplemented def cleanup(self, volume_names): diff --git a/e2e/libs/volume/volume.py b/e2e/libs/volume/volume.py index bf88009cd6..fda2ecefcf 100644 --- a/e2e/libs/volume/volume.py +++ b/e2e/libs/volume/volume.py @@ -65,8 +65,8 @@ def wait_for_replica_rebuilding_complete(self, volume_name, node_name): node_name ) - def check_data(self, volume_name, checksum): - return self.volume.check_data(volume_name, checksum) + def check_data_checksum(self, volume_name, checksum): + return self.volume.check_data_checksum(volume_name, checksum) def cleanup(self, volume_names): - return self.volume.cleanup(volume_names) \ No newline at end of file + return self.volume.cleanup(volume_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