Skip to content

Commit

Permalink
Fix redis-search port for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nantiferov committed Sep 11, 2024
1 parent 7cae37b commit 3f02f94
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ test:
TEST_REDIS_CLUSTER_PASSWORD_URI="redis://localhost:17006" \
TEST_TILE38_URI="redis://localhost:19851" \
TEST_REDIS_SENTINEL_URI="redis://localhost:26379" \
TEST_REDIS_SEARCH_URI="redis://redis-search:6379" \
TEST_REDIS_SEARCH_URI="redis://localhost:36379" \
go test -v -covermode=atomic -cover -race -coverprofile=coverage.txt -p 1 ./...

.PHONY: lint
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ services:
redis-search:
image: redis/redis-stack-server:7.4.0-v0
ports:
- "7379:6379"
- "36379:6379"
6 changes: 3 additions & 3 deletions exporter/search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ func TestSearch(t *testing.T) {
}{
{addr: os.Getenv("TEST_REDIS_SEARCH_URI"), isSearch: true, wantSearchMetrics: true},
{addr: os.Getenv("TEST_REDIS_SEARCH_URI"), isSearch: false, wantSearchMetrics: false},
{addr: os.Getenv("TEST_REDIS_SEARCH_URI"), isSearch: true, wantSearchMetrics: false},
{addr: os.Getenv("TEST_REDIS_SEARCH_URI"), isSearch: false, wantSearchMetrics: false},
{addr: os.Getenv("TEST_REDIS_URI"), isSearch: true, wantSearchMetrics: false},
{addr: os.Getenv("TEST_REDIS_URI"), isSearch: false, wantSearchMetrics: false},
}

for _, tst := range tsts {
e, _ := NewRedisExporter(tst.addr, Options{Namespace: "test", IsTile38: tst.isSearch})
e, _ := NewRedisExporter(tst.addr, Options{Namespace: "test", IsSearch: tst.isSearch})

chM := make(chan prometheus.Metric)
go func() {
Expand Down

0 comments on commit 3f02f94

Please sign in to comment.