summaryrefslogtreecommitdiff
path: root/tooz/tests
diff options
context:
space:
mode:
authorJulien Danjou <julien@danjou.info>2016-11-10 15:23:17 +0100
committerJulien Danjou <julien@danjou.info>2016-11-24 10:25:52 +0100
commitda12883f2b6868188ba480082ead3ced230fc0b8 (patch)
tree7e51c6e21f9b3e3a304116a12d7e84ca94802bcc /tooz/tests
parent533341aebb994b8b5608efce3c8bbcf890d2ed74 (diff)
downloadtooz-da12883f2b6868188ba480082ead3ced230fc0b8.tar.gz
coordinator: add join_group_create
This adds a method implement the common pattern of joining a group and creating it if it does not exist. Change-Id: Ie46e7c1d07599a20bd8c24e28e5936b9f47a8bf4
Diffstat (limited to 'tooz/tests')
-rw-r--r--tooz/tests/test_coordination.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tooz/tests/test_coordination.py b/tooz/tests/test_coordination.py
index 2a54f2c..e43acd7 100644
--- a/tooz/tests/test_coordination.py
+++ b/tooz/tests/test_coordination.py
@@ -157,6 +157,11 @@ class TestAPI(tests.TestCaseSkipNotImplemented):
self.assertRaises(tooz.coordination.GroupNotCreated,
join_group.get)
+ def test_join_group_create(self):
+ self._coord.join_group_create(self.group_id)
+ member_list = self._coord.get_members(self.group_id).get()
+ self.assertTrue(self.member_id in member_list)
+
def test_join_group_with_member_id_already_exists(self):
self._coord.create_group(self.group_id).get()
self._coord.join_group(self.group_id).get()