Skip to content

Updating pipeline tests to use test libs image with RC2. Updating timeseries tests. #3623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
max-parallel: 15
fail-fast: false
matrix:
redis-version: ['8.0-RC1-pre', '${{ needs.redis_version.outputs.CURRENT }}', '7.2.7', '6.2.17']
redis-version: ['8.0-RC2-pre', '${{ needs.redis_version.outputs.CURRENT }}', '7.2.7', '6.2.17']
python-version: ['3.8', '3.13']
parser-backend: ['plain']
event-loop: ['asyncio']
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
x-client-libs-stack-image: &client-libs-stack-image
image: "redislabs/client-libs-test:${CLIENT_LIBS_TEST_STACK_IMAGE_TAG:-7.4.2}"
image: "redislabs/client-libs-test:${CLIENT_LIBS_TEST_STACK_IMAGE_TAG:-rs-7.4.0-v2}"

x-client-libs-image: &client-libs-image
image: "redislabs/client-libs-test:${CLIENT_LIBS_TEST_IMAGE_TAG:-7.4.2}"
Expand Down
39 changes: 39 additions & 0 deletions tests/test_asyncio/test_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from tests.conftest import (
assert_resp_response,
is_resp2_connection,
skip_if_server_version_gte,
skip_if_server_version_lt,
skip_ifmodversion_lt,
)

Expand Down Expand Up @@ -75,7 +77,24 @@ async def test_alter(decoded_r: redis.Redis):

@pytest.mark.redismod
@skip_ifmodversion_lt("1.4.0", "timeseries")
@skip_if_server_version_lt("7.9.0")
async def test_alter_duplicate_policy(decoded_r: redis.Redis):
assert await decoded_r.ts().create(1)
info = await decoded_r.ts().info(1)
assert_resp_response(
decoded_r, "block", info.get("duplicate_policy"), info.get("duplicatePolicy")
)
assert await decoded_r.ts().alter(1, duplicate_policy="min")
info = await decoded_r.ts().info(1)
assert_resp_response(
decoded_r, "min", info.get("duplicate_policy"), info.get("duplicatePolicy")
)


@pytest.mark.redismod
@skip_ifmodversion_lt("1.4.0", "timeseries")
@skip_if_server_version_gte("7.9.0")
async def test_alter_duplicate_policy_prior_redis_8(decoded_r: redis.Redis):
assert await decoded_r.ts().create(1)
info = await decoded_r.ts().info(1)
assert_resp_response(
Expand Down Expand Up @@ -722,7 +741,27 @@ async def test_info(decoded_r: redis.Redis):

@pytest.mark.redismod
@skip_ifmodversion_lt("1.4.0", "timeseries")
@skip_if_server_version_lt("7.9.0")
async def test_info_duplicate_policy(decoded_r: redis.Redis):
await decoded_r.ts().create(
1, retention_msecs=5, labels={"currentLabel": "currentData"}
)
info = await decoded_r.ts().info(1)
assert_resp_response(
decoded_r, "block", info.get("duplicate_policy"), info.get("duplicatePolicy")
)

await decoded_r.ts().create("time-serie-2", duplicate_policy="min")
info = await decoded_r.ts().info("time-serie-2")
assert_resp_response(
decoded_r, "min", info.get("duplicate_policy"), info.get("duplicatePolicy")
)


@pytest.mark.redismod
@skip_ifmodversion_lt("1.4.0", "timeseries")
@skip_if_server_version_gte("7.9.0")
async def test_info_duplicate_policy_prior_redis_8(decoded_r: redis.Redis):
await decoded_r.ts().create(
1, retention_msecs=5, labels={"currentLabel": "currentData"}
)
Expand Down
39 changes: 38 additions & 1 deletion tests/test_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
_get_client,
assert_resp_response,
is_resp2_connection,
skip_if_server_version_gte,
skip_if_server_version_lt,
skip_ifmodversion_lt,
)

Expand Down Expand Up @@ -84,7 +86,8 @@ def test_alter(client):

@pytest.mark.redismod
@skip_ifmodversion_lt("1.4.0", "timeseries")
def test_alter_duplicate_policy(client):
@skip_if_server_version_gte("7.9.0")
def test_alter_duplicate_policy_prior_redis_8(client):
assert client.ts().create(1)
info = client.ts().info(1)
assert_resp_response(
Expand All @@ -97,6 +100,22 @@ def test_alter_duplicate_policy(client):
)


@pytest.mark.redismod
@skip_ifmodversion_lt("1.4.0", "timeseries")
@skip_if_server_version_lt("7.9.0")
def test_alter_duplicate_policy(client):
assert client.ts().create(1)
info = client.ts().info(1)
assert_resp_response(
client, "block", info.get("duplicate_policy"), info.get("duplicatePolicy")
)
assert client.ts().alter(1, duplicate_policy="min")
info = client.ts().info(1)
assert_resp_response(
client, "min", info.get("duplicate_policy"), info.get("duplicatePolicy")
)


@pytest.mark.redismod
def test_add(client):
assert 1 == client.ts().add(1, 1, 1)
Expand Down Expand Up @@ -967,7 +986,25 @@ def test_info(client):

@pytest.mark.redismod
@skip_ifmodversion_lt("1.4.0", "timeseries")
@skip_if_server_version_lt("7.9.0")
def test_info_duplicate_policy(client):
client.ts().create(1, retention_msecs=5, labels={"currentLabel": "currentData"})
info = client.ts().info(1)
assert_resp_response(
client, "block", info.get("duplicate_policy"), info.get("duplicatePolicy")
)

client.ts().create("time-serie-2", duplicate_policy="min")
info = client.ts().info("time-serie-2")
assert_resp_response(
client, "min", info.get("duplicate_policy"), info.get("duplicatePolicy")
)


@pytest.mark.redismod
@skip_ifmodversion_lt("1.4.0", "timeseries")
@skip_if_server_version_gte("7.9.0")
def test_info_duplicate_policy_prior_redis_8(client):
client.ts().create(1, retention_msecs=5, labels={"currentLabel": "currentData"})
info = client.ts().info(1)
assert_resp_response(
Expand Down
Loading