mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 18:05:44 +02:00
chore: pull helio and add ipv6 replication test (#2889)
* chore: pull helio and add ipv6 replication test --------- Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
This commit is contained in:
parent
86559a29db
commit
468942ccbb
5 changed files with 21 additions and 4 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -55,7 +55,7 @@ jobs:
|
|||
image: ghcr.io/romange/${{ matrix.container }}
|
||||
volumes:
|
||||
- /:/hostroot
|
||||
|
||||
options: --sysctl "net.ipv6.conf.all.disable_ipv6=0"
|
||||
credentials:
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
2
.github/workflows/regression-tests.yml
vendored
2
.github/workflows/regression-tests.yml
vendored
|
@ -17,6 +17,8 @@ jobs:
|
|||
|
||||
container:
|
||||
image: ghcr.io/romange/${{ matrix.container }}
|
||||
options: --sysctl "net.ipv6.conf.all.disable_ipv6=0"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
|
|
2
helio
2
helio
|
@ -1 +1 @@
|
|||
Subproject commit d819bf4f1bc61e72d9fbe0c37b2ce40354d9689d
|
||||
Subproject commit 499a3f5736935ea11a0c531bb10c60dc6c101657
|
|
@ -90,7 +90,8 @@ class DflyInstance:
|
|||
assert self.proc == None
|
||||
|
||||
def client(self, *args, **kwargs) -> RedisClient:
|
||||
return RedisClient(port=self.port, decode_responses=True, *args, **kwargs)
|
||||
host = "localhost" if self["bind"] is None else self["bind"]
|
||||
return RedisClient(host=host, port=self.port, decode_responses=True, *args, **kwargs)
|
||||
|
||||
def admin_client(self, *args, **kwargs) -> RedisClient:
|
||||
return RedisClient(
|
||||
|
|
|
@ -1471,6 +1471,20 @@ async def test_tls_replication(
|
|||
await proxy.close(proxy_task)
|
||||
|
||||
|
||||
async def test_ipv6_replication(df_local_factory: DflyInstanceFactory):
|
||||
"""Test that IPV6 addresses work for replication, ::1 is 127.0.0.1 localhost"""
|
||||
master = df_local_factory.create(proactor_threads=1, bind="::1", port=1111)
|
||||
replica = df_local_factory.create(proactor_threads=1, bind="::1", port=1112)
|
||||
|
||||
df_local_factory.start_all([master, replica])
|
||||
c_master = master.client()
|
||||
c_replica = replica.client()
|
||||
|
||||
assert await c_master.ping()
|
||||
assert await c_replica.ping()
|
||||
assert await c_replica.execute_command("REPLICAOF", master["bind"], master["port"]) == "OK"
|
||||
|
||||
|
||||
# busy wait for 'replica' instance to have replication status 'status'
|
||||
async def wait_for_replica_status(
|
||||
replica: aioredis.Redis, status: str, wait_for_seconds=0.01, timeout=20
|
||||
|
@ -1629,7 +1643,7 @@ async def test_df_crash_on_memcached_error(df_local_factory):
|
|||
await wait_for_replica_status(c_replica, status="up")
|
||||
await c_replica.close()
|
||||
|
||||
memcached_client = pymemcache.Client(f"localhost:{replica.mc_port}")
|
||||
memcached_client = pymemcache.Client(f"127.0.0.1:{replica.mc_port}")
|
||||
|
||||
with pytest.raises(pymemcache.exceptions.MemcacheServerError):
|
||||
memcached_client.set("key", "data", noreply=False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue