mirror of
https://github.com/lukaszraczylo/graphql-monitoring-proxy.git
synced 2026-10-22 06:38:13 +00:00
Fix: Redis connection for tests.
This commit is contained in:
Vendored
+4
-1
@@ -4,6 +4,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/gookit/goutil/envutil"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
)
|
)
|
||||||
@@ -14,8 +15,10 @@ type RedisConfigSuite struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (suite *RedisConfigSuite) SetupTest() {
|
func (suite *RedisConfigSuite) SetupTest() {
|
||||||
|
redis_host := envutil.Getenv("REDIS_HOST", "localhost")
|
||||||
|
redis_port := envutil.Getenv("REDIS_PORT", "6379")
|
||||||
suite.redisConfig = NewClient(&RedisClientConfig{
|
suite.redisConfig = NewClient(&RedisClientConfig{
|
||||||
RedisServer: "localhost:6379",
|
RedisServer: redis_host + ":" + redis_port,
|
||||||
RedisPassword: "",
|
RedisPassword: "",
|
||||||
RedisDB: 0,
|
RedisDB: 0,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user