Skip to content

Commit f2f2f42

Browse files
committed
feature motify test
1 parent 4194628 commit f2f2f42

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

memcache/memcache_e2e_test.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ package memcache
1717
import (
1818
"context"
1919
"log"
20+
"os"
2021
"strconv"
2122
"testing"
2223
"time"
@@ -235,10 +236,14 @@ func (s *MemcacheCompositionTestSuite) TestMemcacheCacheGetMulti() {
235236
}
236237

237238
func TestSsdbComposition(t *testing.T) {
239+
memCacheAddr := os.Getenv("MEMCACHE_ADDR")
240+
if memCacheAddr == "" {
241+
memCacheAddr = "127.0.0.1:11211"
242+
}
238243
suite.Run(t, &MemcacheCompositionTestSuite{
239244
Suite{
240245
driver: "memcache",
241-
dsn: "127.0.0.1:11211",
246+
dsn: memCacheAddr,
242247
},
243248
})
244249
}

redis/redis_e2e_test.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"context"
1919
"fmt"
2020
"log"
21+
"os"
2122
"testing"
2223
"time"
2324

@@ -312,10 +313,14 @@ func (s *RedisCompositionTestSuite) TestCacheScan() {
312313
}
313314

314315
func TestRedisComposition(t *testing.T) {
316+
redisAddr := os.Getenv("REDIS_ADDR")
317+
if redisAddr == "" {
318+
redisAddr = "127.0.0.1:6379"
319+
}
315320
suite.Run(t, &RedisCompositionTestSuite{
316321
Suite{
317322
driver: "redis",
318-
dsn: "127.0.0.1:6379",
323+
dsn: redisAddr,
319324
},
320325
})
321326
}

ssdb/ssdb_e2e_test.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ package ssdb
1717
import (
1818
"context"
1919
"log"
20+
"os"
2021
"strconv"
2122
"strings"
2223
"testing"
@@ -237,10 +238,14 @@ func (s *SsdbCompositionTestSuite) TestSsdbCacheGetMulti() {
237238
}
238239

239240
func TestSsdbComposition(t *testing.T) {
241+
ssdbAddr := os.Getenv("SSDB_ADDR")
242+
if ssdbAddr == "" {
243+
ssdbAddr = "127.0.0.1:8888"
244+
}
240245
suite.Run(t, &SsdbCompositionTestSuite{
241246
Suite{
242247
driver: "ssdb",
243-
dsn: "127.0.0.1:8888",
248+
dsn: ssdbAddr,
244249
},
245250
})
246251
}

0 commit comments

Comments
 (0)