Merge "Improve share migration scenario test validation"

This commit is contained in:
Jenkins 2017-01-26 00:29:06 +00:00 committed by Gerrit Code Review
commit a82f8efe30
1 changed files with 4 additions and 7 deletions

View File

@ -362,14 +362,11 @@ class ShareBasicOpsBase(manager.ShareScenarioTest):
self.share = self.migrate_share( self.share = self.migrate_share(
self.share['id'], dest_pool, task_state, force_host_assisted) self.share['id'], dest_pool, task_state, force_host_assisted)
read_only = False
if force_host_assisted: if force_host_assisted:
try: self.assertRaises(
ssh_client.exec_command( exceptions.SSHExecCommandFailed,
"dd if=/dev/zero of=/mnt/f1/1m6.bin bs=1M count=1") ssh_client.exec_command,
except Exception: "dd if=/dev/zero of=/mnt/f1/1m6.bin bs=1M count=1")
read_only = True
self.assertTrue(read_only)
self.umount_share(ssh_client) self.umount_share(ssh_client)