1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-15 17:51:06 +00:00
dragonflydb-dragonfly/tests/dragonfly/management_test.py
Roman Gershman af434cf710
feat: implement CONFIG GET command (#1751)
* feat: implement CONFIG GET command

The command returns all the matched arguments and their current values.
In addition, this PR adds mutability semantics to each config - whether it can be
changed at runtime.

Fixes #1700

Signed-off-by: Roman Gershman <roman@dragonflydb.io>

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-08-28 19:26:38 +03:00

14 lines
459 B
Python

import pytest
import asyncio
from redis import asyncio as aioredis
from redis.exceptions import ResponseError
@pytest.mark.asyncio
async def test_config_cmd(async_client: aioredis.Redis):
with pytest.raises(ResponseError):
await async_client.config_set("foo", "bar")
await async_client.config_set("requirepass", "foobar") == "OK"
res = await async_client.config_get("*")
assert len(res) > 0
assert res["requirepass"] == "foobar"