From 4e182b22d94e0f5018f20718b1ec47b5122d332c Mon Sep 17 00:00:00 2001 From: Li Ma Date: Wed, 4 Feb 2015 19:06:25 -0800 Subject: [PATCH] Add missing unit test for a recent commit In commit bd52d08efaa608244254a801c9737a0aed7434e0, unit test code has only added in tests/ directory. However, as the recent namespace changing, the working directory should be oslo_messaging/tests. This patch adds the missing unit test. Change-Id: Iba5369dbed1d602ade59dcdde3d1706524b82a0b --- oslo_messaging/tests/drivers/test_matchmaker_redis.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/oslo_messaging/tests/drivers/test_matchmaker_redis.py b/oslo_messaging/tests/drivers/test_matchmaker_redis.py index a0c4d7f43..9110296fa 100644 --- a/oslo_messaging/tests/drivers/test_matchmaker_redis.py +++ b/oslo_messaging/tests/drivers/test_matchmaker_redis.py @@ -46,6 +46,7 @@ class RedisMatchMakerTest(test_utils.BaseTestCase): "network": ["controller1", "node1", "node2", "node3"], "cert": ["controller1"], "console": ["controller1"], + "l3_agent.node1": ["node1"], "consoleauth": ["controller1"]} self.matcher = matchmaker_redis.MatchMakerRedis() self.populate() @@ -70,6 +71,10 @@ class RedisMatchMakerTest(test_utils.BaseTestCase): self.assertEqual( sorted(self.matcher.redis.smembers('cert')), ['cert.controller1', 'cert.keymaster']) + self.matcher.register('l3_agent.node1', 'node1') + self.assertEqual( + sorted(self.matcher.redis.smembers('l3_agent.node1')), + ['l3_agent.node1.node1']) def test_unregister(self): self.matcher.unregister('conductor', 'controller1')