Skip to content

Commit

Permalink
robot: add hexdump consistency test file
Browse files Browse the repository at this point in the history
  • Loading branch information
YunhuiChen committed Apr 11, 2022
1 parent c260260 commit cc8b67a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions robot/Resources/keywords/fs_fault_inject.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ def checksum_data():
md5 = "".join(rs[1]).split(" ")[0]
check_list.append(md5)
logger.info("check file md5 is %s"%check_list)
if check_list != config.md5_check:
ori_cmd = "sudo hexdump /home/nbs/failover/test1.0.0 > /home/nbs/failover/test1.hex1"
rs = shell_operator.ssh_exec(ssh, ori_cmd)
ori_cmd = "sudo hexdump /home/nbs/failover/test1/test1.0.0 > /home/nbs/failover/test1.hex2"
rs = shell_operator.ssh_exec(ssh, ori_cmd)
assert check_list == config.md5_check,"md5 check fail,begin is %s,end is %s"%(config.md5_check,check_list)

def checksum_cto_data(mountfs=""):
Expand Down

0 comments on commit cc8b67a

Please sign in to comment.