Merge "Stop using deprecated zake coordination driver"
This commit is contained in:
commit
69c6b12a8d
@ -14,6 +14,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import shutil
|
||||
import tempfile
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import fixture as cfg_fixture
|
||||
@ -34,7 +36,10 @@ class TestCoordination(oslotest.base.BaseTestCase):
|
||||
self.useFixture(cfg_fixture.Config(CONF))
|
||||
self.name = 'coordination'
|
||||
self.tg = mock.Mock()
|
||||
CONF.set_override('backend_url', 'zake://', group='coordination')
|
||||
self.tempdir = tempfile.mkdtemp()
|
||||
CONF.set_override('backend_url', "file://%s" % self.tempdir,
|
||||
group='coordination')
|
||||
self.addCleanup(shutil.rmtree, self.tempdir, ignore_errors=True)
|
||||
|
||||
def test_retry_if_tooz_error(self):
|
||||
self.assertFalse(coordination._retry_if_tooz_error(Exception()))
|
||||
@ -158,10 +163,12 @@ class TestCoordination(oslotest.base.BaseTestCase):
|
||||
class TestPartitioner(oslotest.base.BaseTestCase):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.tempdir = tempfile.mkdtemp()
|
||||
self.addCleanup(shutil.rmtree, self.tempdir, ignore_errors=True)
|
||||
|
||||
def _get_partitioner(self, partitions, host=b'a'):
|
||||
fixture = self.useFixture(base_fixtures.CoordinatorFixture(
|
||||
'zake://', host)
|
||||
"file://%s" % self.tempdir, host)
|
||||
)
|
||||
group = 'group'
|
||||
fixture.coordinator.create_group(group)
|
||||
|
@ -15,7 +15,6 @@ WebTest>=2.0.27 # MIT
|
||||
tempest>=21.0.0 # Apache-2.0
|
||||
# Bandit security code scanner
|
||||
bandit>=1.1.0 # Apache-2.0
|
||||
zake>=0.1.6 # Apache-2.0
|
||||
doc8>=0.6.0 # Apache-2.0
|
||||
Pygments>=2.2.0 # BSD license
|
||||
pymemcache!=1.3.0,>=1.2.9 # Apache 2.0 License
|
||||
|
Loading…
Reference in New Issue
Block a user