Fix sentinel tests not running

We have to tweak the environment set by pifpaf to use redis sentinel
as backend.

Change-Id: I2a3e0d08b6742ee7b473bc382bfc021523719251
This commit is contained in:
Takashi Kajinami 2024-03-07 19:01:08 +09:00
parent a20ca740cf
commit 29f9043b7b
2 changed files with 3 additions and 0 deletions

View File

@ -60,6 +60,8 @@ class TestWithCoordinator(testcase.TestCase, metaclass=SkipNotImplementedMeta):
# defaults
self.url = self.url.replace("etcd://", "etcd3+http://") + \
"?api_version=v3beta"
if os.getenv("TOOZ_TEST_SENTINEL"):
self.url = self.url.replace(":6379", ":6380?sentinel=pifpaf")
self.useFixture(fixtures.NestedTempfile())
self.group_id = get_random_uuid()
self.member_id = get_random_uuid()

View File

@ -23,6 +23,7 @@ setenv =
zookeeper: TOOZ_TEST_DRIVERS = zookeeper
redis: TOOZ_TEST_DRIVERS = redis
sentinel: TOOZ_TEST_DRIVERS = redis --sentinel
sentinel: TOOZ_TEST_SENTINEL = 1
memcached: TOOZ_TEST_DRIVERS = memcached
mysql: TOOZ_TEST_DRIVERS = mysql
postgresql: TOOZ_TEST_DRIVERS = postgresql