Skip to content

Commit

Permalink
add integration test for redis with username
Browse files Browse the repository at this point in the history
  • Loading branch information
vcidst committed Sep 20, 2023
1 parent 883f6a1 commit b7562e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/integration_tests/core/test_lock_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ def test_create_lock_store(redis_lock_store: RedisLockStore):
assert lock
assert lock.conversation_id == conversation_id

def test_lock_store_with_username():
""" connect to a redis instance with username """
redis = RedisLockStore(host="localhost", port=6380, username="username1", password="password")

Check failure on line 27 in tests/integration_tests/core/test_lock_store.py

View workflow job for this annotation

GitHub Actions / Code Quality

E501 Line too long (98 > 88 characters)
assert redis.ping()

def test_serve_ticket(redis_lock_store: RedisLockStore):
conversation_id = "my id 1"
Expand Down
6 changes: 6 additions & 0 deletions tests_deployment/docker-compose.integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ services:
ports:
- 6379:6379

redis1:
image: redis:6
command: "--requirepass password --user username1 on >password ~* allcommands --user default off nopass nocommands"
ports:
- "6379:6380"

postgres:
image: postgres:13
# Set health checks to wait until postgres has started
Expand Down

0 comments on commit b7562e2

Please sign in to comment.