mirror of
https://github.com/lukaszraczylo/graphql-monitoring-proxy.git
synced 2026-06-05 23:03:48 +00:00
fixup! Fix: Redis connection for tests.
This commit is contained in:
+9
-3
@@ -1,6 +1,9 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import libpack_redis "github.com/lukaszraczylo/graphql-monitoring-proxy/cache/redis"
|
import (
|
||||||
|
"github.com/gookit/goutil/envutil"
|
||||||
|
libpack_redis "github.com/lukaszraczylo/graphql-monitoring-proxy/cache/redis"
|
||||||
|
)
|
||||||
|
|
||||||
func (suite *Tests) Test_cacheLookupInmemory() {
|
func (suite *Tests) Test_cacheLookupInmemory() {
|
||||||
type args struct {
|
type args struct {
|
||||||
@@ -46,10 +49,13 @@ func (suite *Tests) Test_cacheLookupInmemory() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (suite *Tests) Test_cacheLookupRedis() {
|
func (suite *Tests) Test_cacheLookupRedis() {
|
||||||
|
redis_host := envutil.Getenv("REDIS_HOST", "localhost")
|
||||||
|
redis_port := envutil.Getenv("REDIS_PORT", "6379")
|
||||||
|
|
||||||
cfg.Cache.Client = libpack_redis.NewClient(&libpack_redis.RedisClientConfig{
|
cfg.Cache.Client = libpack_redis.NewClient(&libpack_redis.RedisClientConfig{
|
||||||
RedisDB: 0,
|
RedisServer: redis_host + ":" + redis_port,
|
||||||
RedisServer: "localhost:6379",
|
|
||||||
RedisPassword: "",
|
RedisPassword: "",
|
||||||
|
RedisDB: 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
type args struct {
|
type args struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user