Skip to content

Commit

Permalink
chore(ci): resolve redis port conflicts for redis-auth
Browse files Browse the repository at this point in the history
  • Loading branch information
windmgc committed Oct 29, 2024
1 parent 0bcd6c5 commit 13752d9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ jobs:
--health-timeout 5s
--health-retries 5
ports:
- 6381:6379
- 6385:6379
env:
REDIS_ARGS: "--requirepass passdefault"

Expand Down
3 changes: 3 additions & 0 deletions scripts/dependency_services/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ port_defs+=("REDIS_PORT:6379 REDIS_SSL_PORT:6380")
services+=("redis-stack")
port_defs+=("REDIS_STACK_PORT:6379")

services+=("redis-auth")
port_defs+=("REDIS_AUTH_PORT:6385")

services+=("grpcbin")
port_defs+=("GRPCBIN_PORT:9000 GRPCBIN_SSL_PORT:9001")

Expand Down
6 changes: 3 additions & 3 deletions scripts/dependency_services/docker-compose-test-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ services:
redis-auth:
image: redis/redis-stack-server
ports:
- 127.0.0.1::6381
- 127.0.0.1::6385
environment:
- REDIS_ARGS=--requirepass passdefault
- REDIS_ARGS=--requirepass passdefault --port 6385
volumes:
- redis-auth-data:/data
healthcheck:
test: ["CMD", "redis-cli", "--pass", "passdefault", "ping"]
test: ["CMD", "redis-cli", "-p", "6385", "--pass", "passdefault", "ping"]
interval: 5s
timeout: 10s
retries: 10
Expand Down
2 changes: 1 addition & 1 deletion spec/internal/constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ local CONSTANTS = {
REDIS_HOST = os.getenv("KONG_SPEC_TEST_REDIS_HOST") or "localhost",
REDIS_PORT = tonumber(os.getenv("KONG_SPEC_TEST_REDIS_PORT") or 6379),
REDIS_SSL_PORT = tonumber(os.getenv("KONG_SPEC_TEST_REDIS_SSL_PORT") or 6380),
REDIS_AUTH_PORT = tonumber(os.getenv("KONG_SPEC_TEST_REDIS_AUTH_PORT") or 6381),
REDIS_AUTH_PORT = tonumber(os.getenv("KONG_SPEC_TEST_REDIS_AUTH_PORT") or 6385),
REDIS_SSL_SNI = os.getenv("KONG_SPEC_TEST_REDIS_SSL_SNI") or "test-redis.example.com",
TEST_COVERAGE_MODE = os.getenv("KONG_COVERAGE"),
TEST_COVERAGE_TIMEOUT = 30,
Expand Down

0 comments on commit 13752d9

Please sign in to comment.