diff options
| author | Steven Dake <stdake@cisco.com> | 2016-05-01 14:00:54 -0400 |
|---|---|---|
| committer | Steven Dake <stdake@cisco.com> | 2016-05-02 06:12:50 -0700 |
| commit | 025d57f82005a4ea92950f9b4d717c88f647d15f (patch) | |
| tree | e366312a926efda5fa70bcd9c1e4894327e71e6d /tests/test_set_config.py | |
| parent | 420f8740ea4a9c6e534fd57e66ea77ec11cdad5a (diff) | |
| download | kolla-025d57f82005a4ea92950f9b4d717c88f647d15f.tar.gz kolla-025d57f82005a4ea92950f9b4d717c88f647d15f.zip | |
Remove dependencies on kazoo and friends
Since kolla-mesos has been retired, there is no need in the code
base to keep the zookeeper implementation. As a result, just remove
it. If we were to keep it we need virtualenvs for that part of the
code base which installs the python dependencies related to it
for from-binary installs.
This just simplifies the implementation tremendously and culls dead
code.
Change-Id: Ieda226e652d67f5b5667112f4f2556f3171366d3
Closes-Bug: #1577194
Diffstat (limited to 'tests/test_set_config.py')
| -rw-r--r-- | tests/test_set_config.py | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/tests/test_set_config.py b/tests/test_set_config.py index 03975d156..3e946c797 100644 --- a/tests/test_set_config.py +++ b/tests/test_set_config.py @@ -15,11 +15,8 @@ import json import mock import os.path import sys -import tempfile from oslotest import base -import testscenarios -from zake import fake_client # nasty: to import set_config (not a part of the kolla package) this_dir = os.path.dirname(sys.modules[__name__].__file__) @@ -67,58 +64,3 @@ class LoadFromEnv(base.BaseTestCase): mock.call().write(u'/bin/true'), mock.call().__exit__(None, None, None)], mo.mock_calls) - - -class ZkCopyTest(testscenarios.WithScenarios, base.BaseTestCase): - - scenarios = [ - ('1', dict(in_paths=['a.conf'], - in_subtree='/', - expect_paths=[['a.conf']])), - ('2', dict(in_paths=['/a/b/c.x', '/a/b/foo.x', '/a/no.x'], - in_subtree='/a/b', - expect_paths=[['c.x'], ['foo.x']])), - ('3', dict(in_paths=['/a/b/c.x', '/a/z/foo.x'], - in_subtree='/', - expect_paths=[['a', 'b', 'c.x'], ['a', 'z', 'foo.x']])), - ] - - def setUp(self): - super(ZkCopyTest, self).setUp() - self.client = fake_client.FakeClient() - self.client.start() - self.addCleanup(self.client.stop) - self.addCleanup(self.client.close) - - def test_cp_tree(self): - # Note: oslotest.base cleans up all tempfiles as follows: - # self.useFixture(fixtures.NestedTempfile()) - # so we don't have to. - temp_dir = tempfile.mkdtemp() - - for path in self.in_paths: - self.client.create(path, b'one', makepath=True) - set_configs.zk_copy_tree(self.client, self.in_subtree, temp_dir) - for expect in self.expect_paths: - expect.insert(0, temp_dir) - expect_path = os.path.join(*expect) - self.assertTrue(os.path.exists(expect_path)) - - -class ZkExistsTest(base.BaseTestCase): - def setUp(self): - super(ZkExistsTest, self).setUp() - self.client = fake_client.FakeClient() - self.client.start() - self.addCleanup(self.client.stop) - self.addCleanup(self.client.close) - - def test_path_exists_no(self): - self.client.create('/test/path/thing', b'one', makepath=True) - self.assertFalse(set_configs.zk_path_exists(self.client, - '/test/missing/thing')) - - def test_path_exists_yes(self): - self.client.create('/test/path/thing', b'one', makepath=True) - self.assertTrue(set_configs.zk_path_exists(self.client, - '/test/path/thing')) |
