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 4e6535f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
32 changes: 32 additions & 0 deletions python/python/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,22 @@ async def glide_client(
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(
request,
Expand All @@ -237,6 +253,22 @@ async def management_client(
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,
cluster_mode: bool,
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 4e6535f

Please sign in to comment.