Improve tempest share server filtering

Make sure that test_share_servers test suite uses share_network with name,
because test suite depends on it and it is not set always.

Change-Id: I33f06b6b7192ac2f249b90f19a6c5b045ae55c9c
This commit is contained in:
vponomaryov 2014-12-20 14:48:55 +02:00
parent 15fcc9e6a4
commit bc2a0bccf5

View File

@ -37,6 +37,10 @@ class ShareServersAdminTest(base.BaseSharesAdminTest):
__, cls.share = cls.create_share()
__, cls.share_network = cls.shares_client.get_share_network(
cls.shares_client.share_network_id)
if not cls.share_network["name"]:
sn_id = cls.share_network["id"]
__, cls.share_network = cls.shares_client.update_share_network(
sn_id, name="sn_%s" % sn_id)
cls.sn_name_and_id = [
cls.share_network["name"],
cls.share_network["id"],