Skip to content

Commit 389a45f

Browse files
committed
change ports for CI
1 parent ae70766 commit 389a45f

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | sort)
22

33
test: testdeps
4+
docker start go-redis-redis-stack || docker run -d --name go-redis-redis-stack -p 6379:6379 -e REDIS_ARGS="--enable-debug-command yes --enable-module-command yes" redis/redis-stack-server:latest
45
$(eval GO_VERSION := $(shell go version | cut -d " " -f 3 | cut -d. -f2))
56
set -e; for dir in $(GO_MOD_DIRS); do \
67
if echo "$${dir}" | grep -q "./example" && [ "$(GO_VERSION)" = "19" ]; then \
@@ -19,9 +20,12 @@ test: testdeps
1920
done
2021
cd internal/customvet && go build .
2122
go vet -vettool ./internal/customvet/customvet
23+
docker stop (docker container ls -a -q --filter name=go-redis-redis-stack)
2224

2325
testdeps: testdata/redis/src/redis-server
2426

27+
28+
2529
bench: testdeps
2630
go test ./... -test.run=NONE -test.bench=. -test.benchmem
2731

json_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package redis_test
33
import (
44
"context"
55
"encoding/json"
6-
"fmt"
76
"time"
87

98
. "github.com/bsm/ginkgo/v2"
@@ -778,9 +777,6 @@ var _ = Describe("Go-Redis Advanced JSON and RediSearch Tests", func() {
778777
nicknameType, err := typeCmd.Result()
779778
Expect(err).NotTo(HaveOccurred(), "JSON.TYPE failed")
780779
Expect(nicknameType[0]).To(Equal([]interface{}{"string"}), "JSON.TYPE mismatch for nickname")
781-
fmt.Printf("%T\n", nicknameType)
782-
fmt.Printf("%T\n", nicknameType[0])
783-
fmt.Printf("%#v\n", nicknameType[0])
784780

785781
createIndexCmd := client.Do(ctx, "FT.CREATE", "person_idx", "ON", "JSON",
786782
"PREFIX", "1", "person:", "SCHEMA",

main_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ var (
4141
redisAddr = ":" + redisPort
4242
)
4343

44+
var (
45+
redisStackPort = "6379"
46+
redisStackAddr = ":" + redisStackPort
47+
)
48+
4449
var (
4550
sentinelAddrs = []string{":" + sentinelPort1, ":" + sentinelPort2, ":" + sentinelPort3}
4651

@@ -120,6 +125,9 @@ var _ = BeforeSuite(func() {
120125
err = startCluster(ctx, cluster)
121126
Expect(err).NotTo(HaveOccurred())
122127
} else {
128+
redisPort = redisStackPort
129+
redisAddr = redisStackAddr
130+
123131
// populate cluster node information
124132
Expect(configureClusterTopology(ctx, cluster)).NotTo(HaveOccurred())
125133
}

0 commit comments

Comments
 (0)