Skip to content

Commit

Permalink
refactor(negative): rename check_data to reflect function purpose
Browse files Browse the repository at this point in the history
Signed-off-by: Chin-Ya Huang <[email protected]>
  • Loading branch information
c3y1huang committed Nov 1, 2023
1 parent 3d21dda commit 8a27c2d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion e2e/keywords/volume.resource
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions e2e/libs/keywords/volume_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion e2e/libs/volume/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion e2e/libs/volume/crd.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,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(
Expand Down
2 changes: 1 addition & 1 deletion e2e/libs/volume/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,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):
Expand Down
6 changes: 3 additions & 3 deletions e2e/libs/volume/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
return self.volume.cleanup(volume_names)

0 comments on commit 8a27c2d

Please sign in to comment.