Skip to content

Commit cd91e68

Browse files
authored
chore: bump buf and go module dependencies (#148)
2 parents dc67405 + 308fcc2 commit cd91e68

10 files changed

Lines changed: 44 additions & 41 deletions

File tree

.project-settings.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
GOLANGCI_LINT_VERSION=v2.12.2
2-
BUF_VERSION=v1.69.0
2+
BUF_VERSION=v1.70.0
33
GO_VERSION=1.26.4
44
GCI_PREFIX=github.com/hyp3rd/hypercache
55
PROTO_ENABLED=false

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
include .project-settings.env
22

33
GOLANGCI_LINT_VERSION ?= v2.12.2
4-
BUF_VERSION ?= v1.69.0
4+
BUF_VERSION ?= v1.70.0
55
GO_VERSION ?= 1.26.4
66
GCI_PREFIX ?= github.com/hyp3rd/hypercache
77
PROTO_ENABLED ?= true

cmd/hypercache-server/mtls_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import (
1414
"path/filepath"
1515
"testing"
1616
"time"
17+
18+
"github.com/stretchr/testify/assert"
1719
)
1820

1921
// writeTestCertPair generates a self-signed cert + key and writes
@@ -121,9 +123,7 @@ func assertStandardTLSConfig(t *testing.T, cfg envConfig) {
121123
t.Fatalf("err = %v", err)
122124
}
123125

124-
if got == nil {
125-
t.Fatalf("got nil, want *tls.Config")
126-
}
126+
assert.NotNil(t, got, "got nil, want *tls.Config")
127127

128128
if got.ClientAuth != tls.NoClientCert {
129129
t.Errorf("ClientAuth = %v, want NoClientCert (no CA was configured)", got.ClientAuth)

cspell.config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ words:
203203
- neighbouring
204204
- nestif
205205
- Newf
206+
- Nilf
206207
- nilnil
207208
- nindent
208209
- noctx

go.mod

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
github.com/goccy/go-json v0.10.6
1010
github.com/gofiber/fiber/v3 v3.3.0
1111
github.com/hyp3rd/ewrap v1.5.1
12-
github.com/hyp3rd/sectools v1.2.6
12+
github.com/hyp3rd/sectools v1.2.7
1313
github.com/redis/go-redis/v9 v9.20.0
1414
github.com/stretchr/testify v1.11.1
1515
github.com/ugorji/go/codec v1.3.1
@@ -18,9 +18,9 @@ require (
1818
go.opentelemetry.io/otel/sdk v1.44.0
1919
go.opentelemetry.io/otel/sdk/metric v1.44.0
2020
go.opentelemetry.io/otel/trace v1.44.0
21-
golang.org/x/crypto v0.52.0
21+
golang.org/x/crypto v0.53.0
2222
golang.org/x/oauth2 v0.36.0
23-
golang.org/x/sync v0.20.0
23+
golang.org/x/sync v0.21.0
2424
gopkg.in/yaml.v3 v3.0.1
2525
)
2626

@@ -29,7 +29,7 @@ require (
2929
github.com/davecgh/go-spew v1.1.1 // indirect
3030
github.com/go-logr/logr v1.4.3 // indirect
3131
github.com/go-logr/stdr v1.2.2 // indirect
32-
github.com/gofiber/schema v1.7.2 // indirect
32+
github.com/gofiber/schema v1.8.0 // indirect
3333
github.com/gofiber/utils/v2 v2.1.0 // indirect
3434
github.com/google/uuid v1.6.0 // indirect
3535
github.com/klauspost/compress v1.18.6 // indirect
@@ -43,6 +43,6 @@ require (
4343
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
4444
go.uber.org/atomic v1.11.0 // indirect
4545
golang.org/x/net v0.55.0 // indirect
46-
golang.org/x/sys v0.45.0 // indirect
47-
golang.org/x/text v0.37.0 // indirect
46+
golang.org/x/sys v0.46.0 // indirect
47+
golang.org/x/text v0.38.0 // indirect
4848
)

go.sum

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ github.com/goccy/go-json v0.10.6 h1:p8HrPJzOakx/mn/bQtjgNjdTcN+/S6FcG2CTtQOrHVU=
2323
github.com/goccy/go-json v0.10.6/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
2424
github.com/gofiber/fiber/v3 v3.3.0 h1:QBd3sYCqdy6Qs5gJYzSw4I4SbqL204jPqpdub/ueiw8=
2525
github.com/gofiber/fiber/v3 v3.3.0/go.mod h1:YH7/TAoRaU4kF8slDCtQuFJ1NzC+3MtxUI4KfvQtaIA=
26-
github.com/gofiber/schema v1.7.2 h1:/0+siRIDYfMTh/edbdSNDXYZESBAFAu0CjKDUjo3g9Q=
27-
github.com/gofiber/schema v1.7.2/go.mod h1:lmbXPQ8hvzXSLkdS2DS7pb4kpunC2Roh7Sj3HMjGfzA=
26+
github.com/gofiber/schema v1.8.0 h1:NGsC9toPHmj8Xg4KpznuXBzNmHG6V5YV0tXKpKMcmis=
27+
github.com/gofiber/schema v1.8.0/go.mod h1:lmbXPQ8hvzXSLkdS2DS7pb4kpunC2Roh7Sj3HMjGfzA=
2828
github.com/gofiber/utils/v2 v2.1.0 h1:WSu4COJhJw9moNfJu2nQvaM9AFvAQ/nZbigjhHqKgOQ=
2929
github.com/gofiber/utils/v2 v2.1.0/go.mod h1:DdOgEVwQTi8cou/AKWPqhXOR4fHGRVhA/rEWL3IXG7Q=
3030
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
@@ -33,8 +33,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
3333
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
3434
github.com/hyp3rd/ewrap v1.5.1 h1:rnLaig+rnpBYkL7vQsvLUJGQpCLa/Yl5RRAnWjphJPs=
3535
github.com/hyp3rd/ewrap v1.5.1/go.mod h1:Pbote45XDYyodYzdcUH7xnWmnI6SSewbOYtTlRSsfvw=
36-
github.com/hyp3rd/sectools v1.2.6 h1:WCrBOazUmZUSHHw34zxK41m5arK+GJ4P9nX/ZFzUc6U=
37-
github.com/hyp3rd/sectools v1.2.6/go.mod h1:qCk5b23hquPRpe/Bi8/Kavh63nFzQ6ad8GSYW1t2h4g=
36+
github.com/hyp3rd/sectools v1.2.7 h1:gQRtEGm1YLOhJq2z58gTa8pUX/lIt3a6hQPYw2r97Ak=
37+
github.com/hyp3rd/sectools v1.2.7/go.mod h1:n4NvttH652ijiMgHz24HGObvOsK+KXND2Mv4X31ObJs=
3838
github.com/klauspost/compress v1.18.6 h1:2jupLlAwFm95+YDR+NwD2MEfFO9d4z4Prjl1XXDjuao=
3939
github.com/klauspost/compress v1.18.6/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
4040
github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE=
@@ -91,18 +91,18 @@ go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
9191
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
9292
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
9393
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
94-
golang.org/x/crypto v0.52.0 h1:RMs7fP2rXdep0CftQlK8Uf+kibLm7qkCcradZWYz988=
95-
golang.org/x/crypto v0.52.0/go.mod h1:1QgfPxDqh0T2M/elOJtp9RvuR95kVjir0e6/BvEmGbc=
94+
golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto=
95+
golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio=
9696
golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8=
9797
golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww=
9898
golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs=
9999
golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q=
100-
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
101-
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
102-
golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY=
103-
golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
104-
golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc=
105-
golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38=
100+
golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM=
101+
golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
102+
golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw=
103+
golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
104+
golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE=
105+
golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4=
106106
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
107107
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
108108
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=

pkg/stats/histogramcollector_test.go

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import (
66
"sync/atomic"
77
"testing"
88

9+
"github.com/stretchr/testify/assert"
10+
911
"github.com/hyp3rd/hypercache/internal/constants"
1012
)
1113

@@ -156,9 +158,8 @@ func TestHistogramStatsCollector_BoundedSamples(t *testing.T) {
156158
}
157159

158160
stat := c.GetStats()[constants.StatHistogram.String()]
159-
if stat == nil {
160-
t.Fatalf("missing stat")
161-
}
161+
162+
assert.NotNil(t, stat, "missing stat")
162163

163164
if stat.Count != 100 {
164165
t.Errorf("lifetime Count = %d, want 100", stat.Count)
@@ -224,9 +225,8 @@ func TestHistogramStatsCollector_ConcurrentRecord(t *testing.T) {
224225
readerWG.Wait()
225226

226227
stat := c.GetStats()[constants.StatIncr.String()]
227-
if stat == nil {
228-
t.Fatalf("missing stat after concurrent recording")
229-
}
228+
229+
assert.NotNil(t, stat, "missing stat after concurrent recording")
230230

231231
wantCount := int64(writers * perWriter)
232232
if int64(stat.Count) != wantCount {
@@ -351,9 +351,8 @@ func TestHistogramStatsCollector_AtomicMinMaxRace(t *testing.T) {
351351
wg.Wait()
352352

353353
stat := c.GetStats()[constants.StatIncr.String()]
354-
if stat == nil {
355-
t.Fatalf("missing stat")
356-
}
354+
355+
assert.NotNil(t, stat, "missing stat")
357356

358357
if stat.Min != 0 {
359358
t.Errorf("Min = %d, want 0", stat.Min)

tests/dist_logging_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import (
66
"sync"
77
"testing"
88

9+
"github.com/stretchr/testify/assert"
10+
911
"github.com/hyp3rd/hypercache/pkg/backend"
1012
)
1113

@@ -135,9 +137,7 @@ func TestDistMemory_LoggerEmitsListenerStart(t *testing.T) {
135137
}
136138
}
137139

138-
if startRec == nil {
139-
t.Fatalf("expected `dist HTTP listener started` record; got %d records", len(records))
140-
}
140+
assert.NotNilf(t, startRec, "expected `dist HTTP listener started` record; got %d records", len(records))
141141

142142
if startRec.Level != slog.LevelInfo {
143143
t.Fatalf("expected Info level, got %v", startRec.Level)

tests/merkle_single_missing_key_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import (
55
"testing"
66
"time"
77

8+
"github.com/stretchr/testify/assert"
9+
810
"github.com/hyp3rd/hypercache/pkg/backend"
911
cache "github.com/hyp3rd/hypercache/pkg/cache/v2"
1012
)
@@ -57,9 +59,8 @@ func TestMerkleSingleMissingKey(t *testing.T) {
5759
}
5860

5961
got, _ := db.Get(ctx, "k1")
60-
if got == nil {
61-
t.Fatalf("expected key pulled")
62-
}
62+
63+
assert.NotNil(t, got, "expected key pulled")
6364

6465
if bs, ok := got.Value.([]byte); !ok || string(bs) != "v1" {
6566
t.Fatalf("unexpected value %v", got.Value)

tests/merkle_sync_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import (
55
"testing"
66
"time"
77

8+
"github.com/stretchr/testify/assert"
9+
810
"github.com/hyp3rd/hypercache/pkg/backend"
911
cache "github.com/hyp3rd/hypercache/pkg/cache/v2"
1012
)
@@ -42,9 +44,9 @@ func TestMerkleSyncConvergence(t *testing.T) {
4244
itA, _ := dmA.Get(ctx, k)
4345

4446
itB, _ := dmB.Get(ctx, k)
45-
if itA == nil || itB == nil {
46-
t.Fatalf("missing key %s after sync", k)
47-
}
47+
48+
assert.NotNil(t, itA, "missing key %s after sync", k)
49+
assert.NotNil(t, itB, "missing key %s after sync", k)
4850

4951
if itB.Version < itA.Version {
5052
t.Fatalf("expected B version >= A version for %s", k)

0 commit comments

Comments
 (0)