Fix for SchedulerStatsAdminTest fails on timestamp

Two tests in SchedulerStatsAdminTest can fail when
a pool capabilities timestamp changes. The tests
really only need to test the key values to be
more reliable.

The 2 tests are:
 * test_pool_list_with_filters and
 * test_pool_list_detail_with_filters

Change-Id: I1bd8307da6c98764b12a948eed20a9f522173144
Closes-Bug: #1470928
This commit is contained in:
Mark Sturdevant 2015-07-02 09:28:51 -07:00
parent 6abb30299b
commit d19b800d42

View File

@ -60,7 +60,10 @@ class SchedulerStatsAdminTest(base.BaseSharesAdminTest):
# Ensure we got exactly one pool matching the first one from above
self.assertEqual(1, len(filtered_pool_list))
self.assertDictEqual(pool, filtered_pool_list[0])
# Match the key values, not the timestamp.
for k, v in search_opts.items():
self.assertEqual(v, filtered_pool_list[0][k])
@test.attr(type=["gate", "smoke", ])
def test_pool_list_with_filters_negative(self):
@ -115,7 +118,10 @@ class SchedulerStatsAdminTest(base.BaseSharesAdminTest):
# Ensure we got exactly one pool matching the first one from above
self.assertEqual(1, len(filtered_pool_list))
self.assertDictEqual(pool, filtered_pool_list[0])
# Match the key values, not the timestamp.
for k, v in search_opts.items():
self.assertEqual(v, filtered_pool_list[0][k])
@test.attr(type=["gate", "smoke", ])
def test_pool_list_detail_with_filters_negative(self):