Fix share status waiter within tempest

Method 'wait_for_share_status' can expect any status for waiting, but now,
if we expect 'error' or 'error_deleting' statuses we will get exception raised,
but should not, because it is expected.

Change-Id: I61afd92fe386c784a3ae1e83916dabf097ce61d2
This commit is contained in:
vponomaryov 2014-08-07 13:16:19 +03:00 committed by Valeriy Ponomaryov
parent c16feaea5e
commit 148265bea4
1 changed files with 3 additions and 1 deletions

View File

@ -170,7 +170,9 @@ class SharesClient(rest_client.RestClient):
time.sleep(self.build_interval)
__, body = self.get_share(share_id)
share_status = body['status']
if 'error' in share_status:
if share_status == status:
return
elif 'error' in share_status:
raise share_exceptions.\
ShareBuildErrorException(share_id=share_id)