Skip to content

Commit

Permalink
Fix testcase test_print_db_info_metadata()
Browse files Browse the repository at this point in the history
Test compares cluster info to hardcoded expected data and wasn't
sorting the two sets of things being compared leading to some
sporadic unit test failures.

Change-Id: I3ef98260a62c15d06ba8cc196196d4e90abca3f0
  • Loading branch information
peluse committed Apr 14, 2014
1 parent e0108af commit 856c155
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/unit/cli/test_info.py
Expand Up @@ -112,7 +112,8 @@ def test_print_db_info_metadata(self):
No system metadata found in db file
User Metadata: {'mydata': 'swift'}'''

self.assertEquals(out.getvalue().strip(), exp_out)
self.assertEquals(sorted(out.getvalue().strip().split('\n')),
sorted(exp_out.split('\n')))

info = dict(
account='acct',
Expand Down Expand Up @@ -154,7 +155,8 @@ def test_print_db_info_metadata(self):
X-Container-Foo: bar
System Metadata: {'mydata': 'swift'}
No user metadata found in db file'''
self.assertEquals(out.getvalue().strip(), exp_out)
self.assertEquals(sorted(out.getvalue().strip().split('\n')),
sorted(exp_out.split('\n')))

def test_print_ring_locations(self):
self.assertRaisesMessage(ValueError, 'None type', print_ring_locations,
Expand Down

0 comments on commit 856c155

Please sign in to comment.