Use known flavor ID as marker
The flavors marker test races with the flavors admin test because we
can list the flavors, pick the first flavor ID as a marker, then the
flavors admin test deletes that flavor and finally our attempt to list
flavors with that marker fails.
Avoid this by using a known flavor ID as our marker.
Change-Id: I56d043b58a403fc28a13b6f45540831ae8e0331d
Closes-Bug: #1330830
diff --git a/tempest/api/compute/flavors/test_flavors.py b/tempest/api/compute/flavors/test_flavors.py
index bfebb5e..0e6b9d6 100644
--- a/tempest/api/compute/flavors/test_flavors.py
+++ b/tempest/api/compute/flavors/test_flavors.py
@@ -67,8 +67,8 @@
@test.attr(type='gate')
def test_list_flavors_using_marker(self):
# The list of flavors should start from the provided marker
- resp, flavors = self.client.list_flavors()
- flavor_id = flavors[0]['id']
+ resp, flavor = self.client.get_flavor_details(self.flavor_ref)
+ flavor_id = flavor['id']
params = {'marker': flavor_id}
resp, flavors = self.client.list_flavors(params)
@@ -78,8 +78,8 @@
@test.attr(type='gate')
def test_list_flavors_detailed_using_marker(self):
# The list of flavors should start from the provided marker
- resp, flavors = self.client.list_flavors_with_detail()
- flavor_id = flavors[0]['id']
+ resp, flavor = self.client.get_flavor_details(self.flavor_ref)
+ flavor_id = flavor['id']
params = {'marker': flavor_id}
resp, flavors = self.client.list_flavors_with_detail(params)