File tree 3 files changed +18
-3
lines changed
3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ package memcache
17
17
import (
18
18
"context"
19
19
"log"
20
+ "os"
20
21
"strconv"
21
22
"testing"
22
23
"time"
@@ -235,10 +236,14 @@ func (s *MemcacheCompositionTestSuite) TestMemcacheCacheGetMulti() {
235
236
}
236
237
237
238
func TestSsdbComposition (t * testing.T ) {
239
+ memCacheAddr := os .Getenv ("MEMCACHE_ADDR" )
240
+ if memCacheAddr == "" {
241
+ memCacheAddr = "127.0.0.1:11211"
242
+ }
238
243
suite .Run (t , & MemcacheCompositionTestSuite {
239
244
Suite {
240
245
driver : "memcache" ,
241
- dsn : "127.0.0.1:11211" ,
246
+ dsn : memCacheAddr ,
242
247
},
243
248
})
244
249
}
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import (
18
18
"context"
19
19
"fmt"
20
20
"log"
21
+ "os"
21
22
"testing"
22
23
"time"
23
24
@@ -312,10 +313,14 @@ func (s *RedisCompositionTestSuite) TestCacheScan() {
312
313
}
313
314
314
315
func TestRedisComposition (t * testing.T ) {
316
+ redisAddr := os .Getenv ("REDIS_ADDR" )
317
+ if redisAddr == "" {
318
+ redisAddr = "127.0.0.1:6379"
319
+ }
315
320
suite .Run (t , & RedisCompositionTestSuite {
316
321
Suite {
317
322
driver : "redis" ,
318
- dsn : "127.0.0.1:6379" ,
323
+ dsn : redisAddr ,
319
324
},
320
325
})
321
326
}
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ package ssdb
17
17
import (
18
18
"context"
19
19
"log"
20
+ "os"
20
21
"strconv"
21
22
"strings"
22
23
"testing"
@@ -237,10 +238,14 @@ func (s *SsdbCompositionTestSuite) TestSsdbCacheGetMulti() {
237
238
}
238
239
239
240
func TestSsdbComposition (t * testing.T ) {
241
+ ssdbAddr := os .Getenv ("SSDB_ADDR" )
242
+ if ssdbAddr == "" {
243
+ ssdbAddr = "127.0.0.1:8888"
244
+ }
240
245
suite .Run (t , & SsdbCompositionTestSuite {
241
246
Suite {
242
247
driver : "ssdb" ,
243
- dsn : "127.0.0.1:8888" ,
248
+ dsn : ssdbAddr ,
244
249
},
245
250
})
246
251
}
You can’t perform that action at this time.
0 commit comments