Skip to content

Commit

Permalink
use redis-stack image
Browse files Browse the repository at this point in the history
  • Loading branch information
gruceo committed Aug 13, 2024
1 parent ed8a8f9 commit 5ae44a9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ jobs:
ports:
- 6379:6379
- 6380:6380
- 6381:6381
options: >-
--name kong_redis
Expand All @@ -199,6 +198,19 @@ jobs:
ports:
- 9411:9411

redis-auth:
image: redis/redis-stack-server
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6381:6379
env:
REDIS_ARGS: "--requirepass passdefault"

steps:
- name: Bump max open files
run: |
Expand Down
8 changes: 4 additions & 4 deletions spec/03-plugins/29-acme/05-redis_storage_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ describe("Plugin: acme (storage.redis)", function()
assert.is_nil(err)
assert.not_nil(storage)
local err = storage:set("foo", "bar", 10)
assert.equal("can't select database NOAUTH Authentication required.", err)
assert.equal("authentication failed WRONGPASS invalid username-password pair or user is disabled.", err)
end)

it("should not connect to Redis with Auth using wrong username", function()
Expand All @@ -637,7 +637,7 @@ describe("Plugin: acme (storage.redis)", function()
assert.is_nil(err)
assert.not_nil(storage)
local err = storage:set("foo", "bar", 10)
assert.equal("can't select database NOAUTH Authentication required.", err)
assert.equal("authentication failed WRONGPASS invalid username-password pair or user is disabled.", err)
end)

it("should not connect to Redis with Auth using wrong password and no username", function()
Expand Down Expand Up @@ -666,7 +666,7 @@ describe("Plugin: acme (storage.redis)", function()
assert.is_nil(err)
assert.not_nil(storage)
local err = storage:set("foo", "bar", 10)
assert.equal("can't select database NOAUTH Authentication required.", err)
assert.equal("authentication failed WRONGPASS invalid username-password pair or user is disabled.", err)
end)

it("should not connect to Redis with Auth using correct password and wrong username", function()
Expand All @@ -681,7 +681,7 @@ describe("Plugin: acme (storage.redis)", function()
assert.is_nil(err)
assert.not_nil(storage)
local err = storage:set("foo", "bar", 10)
assert.equal("can't select database NOAUTH Authentication required.", err)
assert.equal("authentication failed WRONGPASS invalid username-password pair or user is disabled.", err)
end)
end)
end)
Expand Down
4 changes: 0 additions & 4 deletions spec/fixtures/redis/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ if [ -d /workspace ] ; then
--tls-cluster no \
--tls-replication no \
--tls-auth-clients no

redis-server \
--port 6381 \
--requirepass passdefault
fi

tail -f /dev/null

0 comments on commit 5ae44a9

Please sign in to comment.