Merge "Several fixies to tempest plugin"
This commit is contained in:
commit
3a67172141
@ -61,7 +61,8 @@ class ShareServersAdminTest(base.BaseSharesAdminTest):
|
||||
# All expected keys are present
|
||||
for key in keys:
|
||||
self.assertIn(key, server.keys())
|
||||
# 'Updated at' is valid date
|
||||
# 'Updated at' is valid date if set
|
||||
if server["updated_at"]:
|
||||
self.assertTrue(self.date_re.match(server["updated_at"]))
|
||||
# Host is not empty
|
||||
self.assertTrue(len(server["host"]) > 0)
|
||||
@ -71,8 +72,11 @@ class ShareServersAdminTest(base.BaseSharesAdminTest):
|
||||
self.assertTrue(len(server["project_id"]) > 0)
|
||||
|
||||
# Server we used is present
|
||||
# allow 'creating' status too, because there can be
|
||||
# another server with same requirements.
|
||||
any((s["share_network_name"] in self.sn_name_and_id and
|
||||
self.assertEqual(s["status"].lower(), "active")) for s in servers)
|
||||
self.assertIn(s["status"].lower(),
|
||||
["active", "creating"])) for s in servers)
|
||||
|
||||
@test.attr(type=["gate", "smoke", ])
|
||||
def test_list_share_servers_with_host_filter(self):
|
||||
@ -176,7 +180,8 @@ class ShareServersAdminTest(base.BaseSharesAdminTest):
|
||||
self.assertIn(key, server.keys())
|
||||
# 'created_at' is valid date
|
||||
self.assertTrue(self.date_re.match(server["created_at"]))
|
||||
# 'updated_at' is valid date
|
||||
# 'updated_at' is valid date if set
|
||||
if server["updated_at"]:
|
||||
self.assertTrue(self.date_re.match(server["updated_at"]))
|
||||
# Host is not empty
|
||||
self.assertTrue(len(server["host"]) > 0)
|
||||
|
@ -21,7 +21,7 @@ class ShareBuildErrorException(exceptions.TempestException):
|
||||
|
||||
|
||||
class AccessRuleBuildErrorException(exceptions.TempestException):
|
||||
message = "Share's rule with id %(rule_id) is in ERROR status"
|
||||
message = "Share's rule with id %(rule_id)s is in ERROR status"
|
||||
|
||||
|
||||
class SnapshotBuildErrorException(exceptions.TempestException):
|
||||
@ -42,11 +42,3 @@ class NoAvailableNetwork(exceptions.TempestException):
|
||||
|
||||
class InvalidResource(exceptions.TempestException):
|
||||
message = "Provided invalid resource: %(message)s"
|
||||
|
||||
|
||||
class ShareNetworkActivationFailed(exceptions.TempestException):
|
||||
message = "Share-network with id %(sn_id)s failed to activate"
|
||||
|
||||
|
||||
class ShareNetworkDeactivationFailed(exceptions.TempestException):
|
||||
message = "Share-network with id %(sn_id)s failed to deactivate"
|
||||
|
Loading…
Reference in New Issue
Block a user