mirror of
https://github.com/redis/go-redis.git
synced 2025-07-29 17:41:15 +03:00
feat: Enable CI for Redis CE 8.0 (#3274)
* chore: extract benchmark tests * wip * enable pubsub tests * enable ring tests * stop tests with build redis from source * start all tests * mix of makefile and action * add sentinel configs * fix example test * stop debug on re * wip * enable gears for redis 7.2 * wip * enable sentinel, they are expected to fail * fix: linter configuration * chore: update re versions * return older redis enterprise version * add basic codeql * wip: increase timeout, focus only sentinel tests * sentinels with docker network host * enable all tests * fix flanky test * enable example tests * tidy docker compose * add debug output * stop shutingdown masters * don't test sentinel for re * skip unsuported addscores * Update README bump go version in CI * Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update CONTRIBUTING.md add information about new test setup --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@ -5,6 +5,8 @@ package example_commands_test
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/redis/go-redis/v9"
|
||||
)
|
||||
@ -21,6 +23,8 @@ func ExampleClient_query_em() {
|
||||
|
||||
// HIDE_END
|
||||
// REMOVE_START
|
||||
// start with fresh database
|
||||
rdb.FlushDB(ctx)
|
||||
rdb.FTDropIndex(ctx, "idx:bicycle")
|
||||
rdb.FTDropIndex(ctx, "idx:email")
|
||||
// REMOVE_END
|
||||
@ -274,11 +278,16 @@ func ExampleClient_query_em() {
|
||||
|
||||
fmt.Println(res3.Total) // >>> 5
|
||||
|
||||
for _, doc := range res3.Docs {
|
||||
docs := res3.Docs
|
||||
slices.SortFunc(docs, func(a, b redis.Document) int {
|
||||
return strings.Compare(a.ID, b.ID)
|
||||
})
|
||||
|
||||
for _, doc := range docs {
|
||||
fmt.Println(doc.ID)
|
||||
}
|
||||
// >>> bicycle:5
|
||||
// >>> bicycle:0
|
||||
// >>> bicycle:5
|
||||
// >>> bicycle:6
|
||||
// >>> bicycle:7
|
||||
// >>> bicycle:8
|
||||
@ -350,8 +359,8 @@ func ExampleClient_query_em() {
|
||||
// 1
|
||||
// bicycle:0
|
||||
// 5
|
||||
// bicycle:5
|
||||
// bicycle:0
|
||||
// bicycle:5
|
||||
// bicycle:6
|
||||
// bicycle:7
|
||||
// bicycle:8
|
||||
|
Reference in New Issue
Block a user