fix(test): use REDIS_ADDR environment variable in test mocks to match CI service hostname
This commit is contained in:
@@ -44,8 +44,15 @@ func flushRedisForTest(t *testing.T, client *redis.Client) {
|
||||
}
|
||||
|
||||
func newMockHandlerContext() *HandlerContext {
|
||||
// Read Redis address from environment, default to localhost:6379
|
||||
redisAddr := os.Getenv("REDIS_ADDR")
|
||||
if redisAddr == "" {
|
||||
redisAddr = "localhost:6379"
|
||||
}
|
||||
redisClient := redis.NewClient(&redis.Options{
|
||||
Addr: "localhost:6379",
|
||||
Addr: redisAddr,
|
||||
Password: "",
|
||||
DB: 0,
|
||||
})
|
||||
|
||||
// Create an empty routing graph
|
||||
|
||||
Reference in New Issue
Block a user