Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/func-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

env:
GO_VERSION: 1.25.6
GOEXPERIMENT: jsonv2
DOCKER_API_VERSION: 1.45

jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

env:
GO_VERSION: 1.25.6
GOEXPERIMENT: jsonv2

permissions:
contents: read
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jepsen-cluster-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

env:
GO_VERSION: 1.25.6
GOEXPERIMENT: jsonv2

jobs:
test:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jepsen-sentinel-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

env:
GO_VERSION: 1.25.6
GOEXPERIMENT: jsonv2

jobs:
test:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

env:
GO_VERSION: 1.25.6
GOEXPERIMENT: jsonv2

jobs:
unittest:
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PROJECT=rdsync
ZK_VERSION=3.9.4

cmd/rdsync/rdsync:
GOOS=linux go build -tags netgo,osusergo -o ./cmd/rdsync/rdsync ./cmd/rdsync/...
GOEXPERIMENT=jsonv2 GOOS=linux go build -tags netgo,osusergo -o ./cmd/rdsync/rdsync ./cmd/rdsync/...

format:
gofmt -s -w `find . -name '*.go'`
Expand All @@ -24,8 +24,8 @@ test: base_image valkey/src/valkey-server cmd/rdsync/rdsync recreate_logs
rm -rf ./tests/images/valkey/valkey-server && cp valkey/src/valkey-server ./tests/images/valkey/valkey-server
rm -rf ./tests/images/valkey/valkey-senticache && cp valkey/src/valkey-senticache ./tests/images/valkey/valkey-senticache
rm -rf ./tests/images/valkey/valkey-cli && cp valkey/src/valkey-cli ./tests/images/valkey/valkey-cli
go build ./tests/...
(cd tests; go test -timeout 180m)
GOEXPERIMENT=jsonv2 go build ./tests/...
(cd tests; GOEXPERIMENT=jsonv2 go test -timeout 180m)

recreate_logs:
@if [ "$(shell ls tests/logs 2>/dev/null | wc -l)" != "0" ]; then\
Expand Down
2 changes: 1 addition & 1 deletion internal/app/info_file.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package app

import (
"encoding/json"
json "encoding/json/v2"
"log/slog"
"os"
"time"
Expand Down
2 changes: 1 addition & 1 deletion internal/dcs/zk.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package dcs

import (
"context"
"encoding/json"
json "encoding/json/v2"
"fmt"
"log/slog"
"net"
Expand Down
5 changes: 1 addition & 4 deletions tests/rdsync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package tests

import (
"context"
"encoding/json"
json "encoding/json/v2"
"fmt"
"html/template"
"io"
Expand Down Expand Up @@ -806,9 +806,6 @@ func (tctx *testContext) createZookeeperNode(node string) error {

func (tctx *testContext) stepISetZookeeperNode(node string, body *godog.DocString) error {
data := []byte(strings.TrimSpace(body.Content))
if !json.Valid(data) {
return fmt.Errorf("node value is not valid json")
}
_, stat, err := tctx.zk.Get(node)
if err != nil && err != zk.ErrNoNode {
return err
Expand Down
2 changes: 1 addition & 1 deletion tests/testutil/matchers/matchers.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package matchers

import (
"encoding/json"
json "encoding/json/v2"
"fmt"
"reflect"
"regexp"
Expand Down
Loading