]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Sort hostnames in unit test
authorZack Cerza <zack@redhat.com>
Fri, 8 May 2015 15:53:35 +0000 (09:53 -0600)
committerZack Cerza <zack@redhat.com>
Fri, 8 May 2015 17:03:16 +0000 (11:03 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/test/task/__init__.py

index 57b1dc74f9585d8f278d5b234ee1c540f3bdd220..22755f07bfe3d6a9a710f504eace67bf9832761c 100644 (file)
@@ -34,8 +34,8 @@ class TestTask(object):
         with Task(self.ctx, task_config) as task:
             task_hosts = task.cluster.remotes.keys()
             assert len(task_hosts) == 2
-            assert task_hosts[0].name == 'remote1'
-            assert task_hosts[1].name == 'remote2'
+            assert sorted(host.name for host in task_hosts) == ['remote1',
+                                                                'remote2']
 
     def test_hosts_no_results(self):
         self.ctx.cluster = Cluster()