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