Skip to content

Commit

Permalink
fix: cluster调整成单节点集群 (#965)
Browse files Browse the repository at this point in the history
Co-authored-by: liwc1 <liwc1@jiguang.cn>
Co-authored-by: 大可 <hnlq.sysu@gmail.com>
  • Loading branch information
3 people authored Aug 15, 2023
1 parent 5c2a25b commit 869245b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
ref: ${{ github.event.pull_request.head.sha }}

- name: docker-compose
run: docker-compose -f test/docker-compose.yaml up -d
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/redis/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func Test_Cluster(t *testing.T) {

})
t.Run("normal start", func(t *testing.T) {
config.Addr = []string{"127.0.0.1:7000", "127.0.0.1:7001", "127.0.0.1:7002"}
config.Addr = []string{"localhost:7111"}
config.name = "test"
client, err := config.BuildCluster()
if err != nil {
Expand Down
3 changes: 0 additions & 3 deletions test/data/cluster/conf/nodes.conf

This file was deleted.

8 changes: 2 additions & 6 deletions test/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ services:
image: redis:6.2-alpine
restart: always
ports:
- 7000:7000
- 7001:7001
- 7002:7002
volumes:
- ./data/cluster/conf/nodes.conf:/data/cluster/conf/nodes.conf
command: redis-server --cluster-enabled yes --cluster-config-file /data/cluster/conf/nodes.conf --cluster-node-timeout 5000 --appendonly yes
- 7111:6380
command: redis-server --port=6380 --cluster-enabled yes --cluster-node-timeout 5000 --appendonly yes
db:
image: mysql:5.7
# volumes:
Expand Down

0 comments on commit 869245b

Please sign in to comment.