From 856c15539a958dabe3b8a1f22d305048ca39de9a Mon Sep 17 00:00:00 2001 From: Paul Luse Date: Mon, 14 Apr 2014 15:19:22 -0700 Subject: [PATCH] Fix testcase test_print_db_info_metadata() 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 --- test/unit/cli/test_info.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/unit/cli/test_info.py b/test/unit/cli/test_info.py index 306bb608b6..55516460c6 100644 --- a/test/unit/cli/test_info.py +++ b/test/unit/cli/test_info.py @@ -112,7 +112,8 @@ Metadata: 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', @@ -154,7 +155,8 @@ Metadata: 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,