Merge "Use parenthesis instead of backslashes in tempest folder"
This commit is contained in:
commit
e17328cf94
@ -238,8 +238,8 @@ class SharesClient(rest_client.RestClient):
|
||||
if share_status == status:
|
||||
return
|
||||
elif 'error' in share_status.lower():
|
||||
raise share_exceptions.\
|
||||
ShareBuildErrorException(share_id=share_id)
|
||||
raise share_exceptions.ShareBuildErrorException(
|
||||
share_id=share_id)
|
||||
|
||||
if int(time.time()) - start >= self.build_timeout:
|
||||
message = ('Share %s failed to reach %s status within '
|
||||
@ -259,8 +259,8 @@ class SharesClient(rest_client.RestClient):
|
||||
body = self.get_snapshot(snapshot_id)
|
||||
snapshot_status = body['status']
|
||||
if 'error' in snapshot_status:
|
||||
raise share_exceptions.\
|
||||
SnapshotBuildErrorException(snapshot_id=snapshot_id)
|
||||
raise share_exceptions.SnapshotBuildErrorException(
|
||||
snapshot_id=snapshot_id)
|
||||
|
||||
if int(time.time()) - start >= self.build_timeout:
|
||||
message = ('Share Snapshot %s failed to reach %s status '
|
||||
@ -280,8 +280,8 @@ class SharesClient(rest_client.RestClient):
|
||||
rule_status = rule['state']
|
||||
break
|
||||
if 'error' in rule_status:
|
||||
raise share_exceptions.\
|
||||
AccessRuleBuildErrorException(rule_id=rule_id)
|
||||
raise share_exceptions.AccessRuleBuildErrorException(
|
||||
rule_id=rule_id)
|
||||
|
||||
if int(time.time()) - start >= self.build_timeout:
|
||||
message = ('Share Access Rule %s failed to reach %s status '
|
||||
|
@ -337,8 +337,8 @@ class SharesV2Client(shares_client.SharesClient):
|
||||
if instance_status == status:
|
||||
return
|
||||
elif 'error' in instance_status.lower():
|
||||
raise share_exceptions. \
|
||||
ShareInstanceBuildErrorException(id=instance_id)
|
||||
raise share_exceptions.ShareInstanceBuildErrorException(
|
||||
id=instance_id)
|
||||
|
||||
if int(time.time()) - start >= self.build_timeout:
|
||||
message = ('Share instance %s failed to reach %s status within'
|
||||
|
@ -100,9 +100,9 @@ class SharesActionsAdminTest(base.BaseSharesAdminTest):
|
||||
share["name"])
|
||||
self.assertEqual(self.share_name, str(share["name"]), msg)
|
||||
|
||||
msg = "Expected description: '%s', "\
|
||||
msg = ("Expected description: '%s', "
|
||||
"actual description: '%s'" % (self.share_desc,
|
||||
share["description"])
|
||||
share["description"]))
|
||||
self.assertEqual(self.share_desc, str(share["description"]), msg)
|
||||
|
||||
msg = "Expected size: '%s', actual size: '%s'" % (
|
||||
@ -330,12 +330,14 @@ class SharesActionsAdminTest(base.BaseSharesAdminTest):
|
||||
get["name"])
|
||||
self.assertEqual(self.snap_name, get["name"], msg)
|
||||
|
||||
msg = "Expected description: '%s', "\
|
||||
"actual description: '%s'" % (self.snap_desc, get["description"])
|
||||
msg = ("Expected description: '%s', "
|
||||
"actual description: '%s'" % (self.snap_desc,
|
||||
get["description"]))
|
||||
self.assertEqual(self.snap_desc, get["description"], msg)
|
||||
|
||||
msg = "Expected share_id: '%s', "\
|
||||
"actual share_id: '%s'" % (self.shares[0]["id"], get["share_id"])
|
||||
msg = ("Expected share_id: '%s', "
|
||||
"actual share_id: '%s'" % (self.shares[0]["id"],
|
||||
get["share_id"]))
|
||||
self.assertEqual(self.shares[0]["id"], get["share_id"], msg)
|
||||
|
||||
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||
|
@ -164,8 +164,8 @@ class SharesNFSTest(base.BaseSharesTest):
|
||||
|
||||
# verify share, created from snapshot
|
||||
get = self.shares_client.get_share(s2["id"])
|
||||
msg = "Expected snapshot_id %s as "\
|
||||
"source of share %s" % (snap["id"], get["snapshot_id"])
|
||||
msg = ("Expected snapshot_id %s as "
|
||||
"source of share %s" % (snap["id"], get["snapshot_id"]))
|
||||
self.assertEqual(get["snapshot_id"], snap["id"], msg)
|
||||
|
||||
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||
|
@ -115,9 +115,9 @@ class SharesActionsTest(base.BaseSharesTest):
|
||||
share["name"])
|
||||
self.assertEqual(self.share_name, six.text_type(share["name"]), msg)
|
||||
|
||||
msg = "Expected description: '%s', "\
|
||||
msg = ("Expected description: '%s', "
|
||||
"actual description: '%s'" % (self.share_desc,
|
||||
share["description"])
|
||||
share["description"]))
|
||||
self.assertEqual(
|
||||
self.share_desc, six.text_type(share["description"]), msg)
|
||||
|
||||
|
@ -961,8 +961,8 @@ class NetworkScenarioTest(ScenarioTest):
|
||||
nic)
|
||||
source_host = source.ssh_client.host
|
||||
if should_succeed:
|
||||
msg = "Timed out waiting for %s to become reachable from %s" \
|
||||
% (dest, source_host)
|
||||
msg = ("Timed out waiting for %s to become reachable from %s"
|
||||
% (dest, source_host))
|
||||
else:
|
||||
msg = "%s is reachable from %s" % (dest, source_host)
|
||||
self.assertTrue(result, msg)
|
||||
|
Loading…
Reference in New Issue
Block a user