Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeuoly committed Sep 9, 2024
1 parent 01f2e98 commit b3b20e7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/utils/cache/redis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ const (
TEST_PREFIX = "test"
)

func getRedisConnection(t *testing.T) error {
func getRedisConnection() error {
return InitRedisClient("0.0.0.0:6379", "difyai123456")
}

func TestRedisConnection(t *testing.T) {
// get redis connection
if err := getRedisConnection(t); err != nil {
if err := getRedisConnection(); err != nil {
t.Errorf("get redis connection failed: %v", err)
return
}
Expand All @@ -34,7 +34,7 @@ func TestRedisConnection(t *testing.T) {

func TestRedisTransaction(t *testing.T) {
// get redis connection
if err := getRedisConnection(t); err != nil {
if err := getRedisConnection(); err != nil {
t.Errorf("get redis connection failed: %v", err)
return
}
Expand Down Expand Up @@ -117,7 +117,7 @@ func TestRedisTransaction(t *testing.T) {

func TestRedisScanMap(t *testing.T) {
// get redis connection
if err := getRedisConnection(t); err != nil {
if err := getRedisConnection(); err != nil {
t.Errorf("get redis connection failed: %v", err)
return
}
Expand Down Expand Up @@ -197,7 +197,7 @@ func TestRedisScanMap(t *testing.T) {

func TestRedisP2PPubsub(t *testing.T) {
// get redis connection
if err := getRedisConnection(t); err != nil {
if err := getRedisConnection(); err != nil {
t.Errorf("get redis connection failed: %v", err)
return
}
Expand Down Expand Up @@ -230,7 +230,7 @@ func TestRedisP2PPubsub(t *testing.T) {

func TestRedisP2ARedis(t *testing.T) {
// get redis connection
if err := getRedisConnection(t); err != nil {
if err := getRedisConnection(); err != nil {
t.Errorf("get redis connection failed: %v", err)
return
}
Expand Down

0 comments on commit b3b20e7

Please sign in to comment.