Skip to content

Commit

Permalink
run cluster tests in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
amirreza8002 committed Nov 22, 2024
1 parent 8d6d6de commit 414584e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ jobs:
poetry run invoke devenv
chmod +x ./util/wait-for-it.sh
./util/wait-for-it.sh localhost:6379
./util/wait-for-it.sh localhost:16379
poetry run pytest tests/tests_cluster/*.py --ds=tests.settings.sqlite_cluster -x
poetry run pytest tests/*.py --ds=tests.settings.sqlite -x
poetry run pytest tests/*.py --ds=tests.settings.sqlite_herd -x
poetry run pytest tests/*.py --ds=tests.settings.sqlite_json -x
Expand Down
11 changes: 7 additions & 4 deletions tests/settings/sqlite_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
CACHES = {
"default": {
"BACKEND": "django_valkey.cluster_cache.cache.ClusterValkeyCache",
"LOCATION": ["valkey://127.0.0.1:16380", "valkey://127.0.0.1:16381"],
"LOCATION": ["valkey://valkey-cluster:16380", "valkey://valkey-cluster:16381"],
"OPTIONS": {
"CLIENT_CLASS": "django_valkey.cluster_cache.client.DefaultClusterClient"
"CLIENT_CLASS": "django_valkey.cluster_cache.client.DefaultClusterClient",
"BASE_CLIENT_CLS_KWARGS": {
"health_check_interval": 3.0,
},
},
},
"doesnotexist": {
Expand All @@ -17,14 +20,14 @@
},
"sample": {
"BACKEND": "django_valkey.cluster_cache.cache.ClusterValkeyCache",
"LOCATION": "valkey://127.0.0.1:16379:0,valkey://127.0.0.1:16380:0",
"LOCATION": "valkey://valkey-cluster:16379:0,valkey://valkey-cluster:16380:0",
"OPTIONS": {
"CLIENT_CLASS": "django_valkey.cluster_cache.client.DefaultClusterClient"
},
},
"with_prefix": {
"BACKEND": "django_valkey.cluster_cache.cache.ClusterValkeyCache",
"LOCATION": "valkey://127.0.0.1:16379?db=0",
"LOCATION": "valkey://valkey-cluster:16379?db=0",
"OPTIONS": {
"CLIENT_CLASS": "django_valkey.cluster_cache.client.DefaultClusterClient"
},
Expand Down

0 comments on commit 414584e

Please sign in to comment.