Skip to content

Commit

Permalink
Fix update_passwd test in python
Browse files Browse the repository at this point in the history
Signed-off-by: GilboaAWS <[email protected]>
  • Loading branch information
GilboaAWS committed Jan 7, 2025
1 parent b2caf01 commit 40744cb
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
24 changes: 24 additions & 0 deletions python/python/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,18 @@ async def glide_client(
await test_teardown(request, cluster_mode, protocol)
await client.close()

@pytest.fixture(scope="function")
async def glide_client(
request,
cluster_mode: bool,
protocol: ProtocolVersion,
request_timeout: int,
) -> AsyncGenerator[TGlideClient, None]:
"Get async socket client for tests"
client = await create_client(request, cluster_mode, protocol=protocol, request_timeout=request_timeout)
yield client
await test_teardown(request, cluster_mode, protocol)
await client.close()

@pytest.fixture(scope="function")
async def management_client(
Expand All @@ -236,6 +248,18 @@ async def management_client(
await test_teardown(request, cluster_mode, protocol)
await client.close()

@pytest.fixture(scope="function")
async def management_client(
request,
cluster_mode: bool,
protocol: ProtocolVersion,
request_timeout: int,
) -> AsyncGenerator[TGlideClient, None]:
"Get async socket client for tests, used to manage the state when tests are on the client ability to connect"
client = await create_client(request, cluster_mode, protocol=protocol, request_timeout=request_timeout)
yield client
await test_teardown(request, cluster_mode, protocol)
await client.close()

async def create_client(
request,
Expand Down
1 change: 1 addition & 0 deletions python/python/tests/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ async def cleanup(self, request, management_client: TGlideClient):

@pytest.mark.parametrize("cluster_mode", [True])
@pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3])
@pytest.mark.parametrize("request_timeout", [3000])
async def test_update_connection_password(
self, glide_client: TGlideClient, management_client: TGlideClient
):
Expand Down

0 comments on commit 40744cb

Please sign in to comment.