Skip to content

Commit

Permalink
chore(acl): add test with requirepass and aclfile (#3312)
Browse files Browse the repository at this point in the history
* add a test that uses both requirepass and aclfile

Signed-off-by: kostas <[email protected]>
  • Loading branch information
kostasrim authored Jul 15, 2024
1 parent 4e3bd94 commit 73abd68
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/dragonfly/acl_family_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,23 @@ async def test_require_pass(df_factory):
await client.close()


@pytest.mark.asyncio
@dfly_args({"port": 1111, "requirepass": "temp"})
async def test_require_pass_with_acl_file_order(df_factory, tmp_dir):
acl = create_temp_file(
"USER default ON >jordan ~* +@all",
tmp_dir,
)

df = df_factory.create(aclfile=acl)
df.start()

client = aioredis.Redis(username="default", password="jordan", port=df.port)

assert await client.set("foo", "bar")
await client.close()


@pytest.mark.asyncio
async def test_set_acl_file(async_client: aioredis.Redis, tmp_dir):
acl_file_content = "USER roy ON #ea71c25a7a602246b4c39824b855678894a96f43bb9b71319c39700a1e045222 +@string +@fast +hset\nUSER john on nopass +@string"
Expand Down

0 comments on commit 73abd68

Please sign in to comment.