From 6ec8dc0ab209547ac58dd8c07cd0c8c4dd876639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Yasir=20Na=C3=A7?= <76746351+aliyasirnac@users.noreply.github.com> Date: Mon, 7 Apr 2025 02:24:05 +0300 Subject: [PATCH 001/168] feat(surrealdb): add initial implementation of SurrealDB storage with configuration and tests --- surrealdb/config.go | 59 +++++++++++++ surrealdb/go.mod | 65 ++++++++++++++ surrealdb/go.sum | 163 ++++++++++++++++++++++++++++++++++++ surrealdb/surrealdb.go | 74 ++++++++++++++++ surrealdb/surrealdb_test.go | 24 ++++++ 5 files changed, 385 insertions(+) create mode 100644 surrealdb/config.go create mode 100644 surrealdb/go.mod create mode 100644 surrealdb/go.sum create mode 100644 surrealdb/surrealdb.go create mode 100644 surrealdb/surrealdb_test.go diff --git a/surrealdb/config.go b/surrealdb/config.go new file mode 100644 index 00000000..e8ba6926 --- /dev/null +++ b/surrealdb/config.go @@ -0,0 +1,59 @@ +package surrealdb + +type Config struct { + ConnectionString string + Namespace string + Database string + + // auth + Username string + Password string + Access string + Scope string +} + +var ConfigDefault = Config{ + ConnectionString: "ws://localhost:8000", + Namespace: "fiber_storage", + Database: "fiber_storage", + Username: "root", + Password: "root", + Access: "full", + Scope: "all", +} + +func configDefault(config ...Config) Config { + // Return default config if nothing provided + if len(config) < 1 { + return ConfigDefault + } + + // Override default config + cfg := config[0] + + // Set default values + if cfg.ConnectionString == "" { + cfg.ConnectionString = ConfigDefault.ConnectionString + } + if cfg.Namespace == "" { + cfg.Namespace = ConfigDefault.Namespace + } + + if cfg.Database == "" { + cfg.Database = ConfigDefault.Database + } + + if cfg.Username == "" { + cfg.Username = ConfigDefault.Username + } + + if cfg.Password == "" { + cfg.Password = ConfigDefault.Password + } + + if cfg.Scope == "" { + cfg.Scope = ConfigDefault.Scope + } + + return cfg +} diff --git a/surrealdb/go.mod b/surrealdb/go.mod new file mode 100644 index 00000000..67788233 --- /dev/null +++ b/surrealdb/go.mod @@ -0,0 +1,65 @@ +module github.com/gofiber/storage/surrealdb/v2 + +go 1.23.3 + +require ( + github.com/stretchr/testify v1.10.0 + github.com/surrealdb/surrealdb.go v0.3.2 +) + +require ( + dario.cat/mergo v1.0.1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/containerd/platforms v0.2.1 // indirect + github.com/cpuguy83/dockercfg v0.3.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/distribution/reference v0.6.0 // indirect + github.com/docker/docker v28.0.1+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/ebitengine/purego v0.8.2 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/gofrs/uuid v4.4.0+incompatible // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/gorilla/websocket v1.5.3 // indirect + github.com/klauspost/compress v1.17.4 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/magiconair/properties v1.8.9 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/patternmatcher v0.6.0 // indirect + github.com/moby/sys/sequential v0.5.0 // indirect + github.com/moby/sys/user v0.1.0 // indirect + github.com/moby/sys/userns v0.1.0 // indirect + github.com/moby/term v0.5.0 // indirect + github.com/morikuni/aec v1.0.0 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.1 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/shirou/gopsutil/v4 v4.25.1 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/testcontainers/testcontainers-go v0.36.0 // indirect + github.com/testcontainers/testcontainers-go/modules/surrealdb v0.36.0 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + github.com/x448/float16 v0.8.4 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect + golang.org/x/crypto v0.35.0 // indirect + golang.org/x/sys v0.31.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/surrealdb/go.sum b/surrealdb/go.sum new file mode 100644 index 00000000..91f0ae08 --- /dev/null +++ b/surrealdb/go.sum @@ -0,0 +1,163 @@ +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= +github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= +github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v28.0.1+incompatible h1:FCHjSRdXhNRFjlHMTv4jUNlIBbTeRjrWfeFuJp7jpo0= +github.com/docker/docker v28.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I= +github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= +github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= +github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= +github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= +github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= +github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= +github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/surrealdb/surrealdb.go v0.3.2 h1:ynBbD0onW+M4BXhZ1+dDdVnNcaqBqFlHaHCFnk8LgmQ= +github.com/surrealdb/surrealdb.go v0.3.2/go.mod h1:A0zahuChOaJtvTm2lefQnV+6aJtgqNLm9TIdYhZbw1Q= +github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= +github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= +github.com/testcontainers/testcontainers-go/modules/surrealdb v0.36.0 h1:x5kibhWJYAZe6GKXYlJyljVkBt7X9KRNJ4fj65AO6gI= +github.com/testcontainers/testcontainers-go/modules/surrealdb v0.36.0/go.mod h1:mocRRy6nXfjM75723YS6KoIoUt5rldiYxRvC9niLceQ= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= +golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/surrealdb/surrealdb.go b/surrealdb/surrealdb.go new file mode 100644 index 00000000..ff32a779 --- /dev/null +++ b/surrealdb/surrealdb.go @@ -0,0 +1,74 @@ +package surrealdb + +import ( + "github.com/surrealdb/surrealdb.go" + "time" +) + +// Storage interface that is implemented by storage providers +type Storage struct { + db *surrealdb.DB +} + +func New(config ...Config) *Storage { + cfg := configDefault(config...) + db, err := surrealdb.New(cfg.ConnectionString) + if err != nil { + panic(err) + } + + if err = db.Use(cfg.Namespace, cfg.Database); err != nil { + panic(err) + } + + authData := &surrealdb.Auth{ + Username: cfg.Username, + Password: cfg.Password, + Access: cfg.Access, + Scope: cfg.Scope, + } + + token, err := db.SignIn(authData) + if err != nil { + panic(err) + } + + if err := db.Authenticate(token); err != nil { + panic(err) + } + + //defer func(token string) { + // if err := db.Invalidate(); err != nil { + // panic(err) + // } + //}(token) + + return &Storage{ + db: db, + } +} + +func (s *Storage) Get(key string) ([]byte, error) { + // TODO implement me + panic("implement me") +} + +func (s *Storage) Set(key string, val []byte, exp time.Duration) error { + //TODO implement me + panic("implement me") +} + +func (s *Storage) Delete(key string) error { + //TODO implement me + panic("implement me") +} + +func (s *Storage) Reset() error { + //TODO implement me + panic("implement me") +} + +func (s *Storage) Close() error { + //TODO implement me + panic("implement me") +} diff --git a/surrealdb/surrealdb_test.go b/surrealdb/surrealdb_test.go new file mode 100644 index 00000000..bfdb97a5 --- /dev/null +++ b/surrealdb/surrealdb_test.go @@ -0,0 +1,24 @@ +package surrealdb + +import ( + "github.com/stretchr/testify/require" + "os" + "testing" +) + +var testStore *Storage +var testConfig = ConfigDefault + +func TestMain(m *testing.M) { + testStore = New(testConfig) + + code := m.Run() + testStore.Close() + os.Exit(code) +} + +func Test_Surrealdb_Get(t *testing.T) { + bytes, err := testStore.Get("") + require.NoError(t, err) + require.Nil(t, bytes) +} From 38d42c947fd2ddec96c3767744a1298581c95803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Yasir=20Na=C3=A7?= <76746351+aliyasirnac@users.noreply.github.com> Date: Mon, 7 Apr 2025 21:27:32 +0300 Subject: [PATCH 002/168] feat(surrealdb): add crud methods and write basic tests --- surrealdb/config.go | 11 ++++++ surrealdb/surrealdb.go | 71 +++++++++++++++++++++++++++++-------- surrealdb/surrealdb_test.go | 57 ++++++++++++++++++++++++++--- 3 files changed, 121 insertions(+), 18 deletions(-) diff --git a/surrealdb/config.go b/surrealdb/config.go index e8ba6926..fbcc8219 100644 --- a/surrealdb/config.go +++ b/surrealdb/config.go @@ -10,6 +10,8 @@ type Config struct { Password string Access string Scope string + + DefaultTable string } var ConfigDefault = Config{ @@ -20,6 +22,7 @@ var ConfigDefault = Config{ Password: "root", Access: "full", Scope: "all", + DefaultTable: "fiber_storage", } func configDefault(config ...Config) Config { @@ -55,5 +58,13 @@ func configDefault(config ...Config) Config { cfg.Scope = ConfigDefault.Scope } + if cfg.Access == "" { + cfg.Access = ConfigDefault.Access + } + + if cfg.DefaultTable == "" { + cfg.DefaultTable = ConfigDefault.DefaultTable + } + return cfg } diff --git a/surrealdb/surrealdb.go b/surrealdb/surrealdb.go index ff32a779..3f693e10 100644 --- a/surrealdb/surrealdb.go +++ b/surrealdb/surrealdb.go @@ -1,13 +1,23 @@ package surrealdb import ( + "encoding/json" + "fmt" "github.com/surrealdb/surrealdb.go" + "github.com/surrealdb/surrealdb.go/pkg/models" "time" ) // Storage interface that is implemented by storage providers type Storage struct { - db *surrealdb.DB + db *surrealdb.DB + table string +} + +type model struct { + Key string `json:"k"` + Val []byte `json:"v"` + Exp int64 `json:"e"` } func New(config ...Config) *Storage { @@ -24,8 +34,6 @@ func New(config ...Config) *Storage { authData := &surrealdb.Auth{ Username: cfg.Username, Password: cfg.Password, - Access: cfg.Access, - Scope: cfg.Scope, } token, err := db.SignIn(authData) @@ -44,31 +52,66 @@ func New(config ...Config) *Storage { //}(token) return &Storage{ - db: db, + db: db, + table: cfg.DefaultTable, } } func (s *Storage) Get(key string) ([]byte, error) { - // TODO implement me - panic("implement me") + recordID := models.NewRecordID(s.table, key) + m, err := surrealdb.Select[model, models.RecordID](s.db, recordID) + if err != nil { + return nil, err + } + bytes, err := json.Marshal(m) + if err != nil { + return nil, err + } + return bytes, nil } func (s *Storage) Set(key string, val []byte, exp time.Duration) error { - //TODO implement me - panic("implement me") + create, err := surrealdb.Create[model](s.db, models.Table(key), &model{Key: key, Val: val, Exp: int64(exp)}) + if err != nil { + return err + } + + bytes, err := json.Marshal(create) + if err != nil { + return err + } + fmt.Println(string(bytes)) + return nil } func (s *Storage) Delete(key string) error { - //TODO implement me - panic("implement me") + _, err := surrealdb.Delete[model](s.db, models.NewRecordID(s.table, key)) + if err != nil { + return err + } + return nil } func (s *Storage) Reset() error { - //TODO implement me - panic("implement me") + _, err := surrealdb.Delete[[]model](s.db, models.Table(s.table)) + if err != nil { + return err + } + return nil } func (s *Storage) Close() error { - //TODO implement me - panic("implement me") + return s.db.Close() +} + +func (s *Storage) List(table string) ([]byte, error) { + a, err := surrealdb.Select[[]map[string]interface{}, models.Table](s.db, models.Table(table)) + if err != nil { + return nil, err + } + bytes, err := json.Marshal(a) + if err != nil { + return nil, err + } + return bytes, nil } diff --git a/surrealdb/surrealdb_test.go b/surrealdb/surrealdb_test.go index bfdb97a5..45281b14 100644 --- a/surrealdb/surrealdb_test.go +++ b/surrealdb/surrealdb_test.go @@ -1,6 +1,8 @@ package surrealdb import ( + "encoding/json" + "fmt" "github.com/stretchr/testify/require" "os" "testing" @@ -17,8 +19,55 @@ func TestMain(m *testing.M) { os.Exit(code) } -func Test_Surrealdb_Get(t *testing.T) { - bytes, err := testStore.Get("") - require.NoError(t, err) - require.Nil(t, bytes) +type testData struct { + Name string `json:"name"` + Age int `json:"age"` +} + +var data = testData{ + Name: "john", + Age: 35, +} + +func Test_Surrealdb_Create(t *testing.T) { + jsonData, err := json.Marshal(data) + require.NoError(t, err) + err = testStore.Set(testConfig.DefaultTable, jsonData, 0) + require.NoError(t, err) +} + +func Test_Surrealdb_CreateAndGet(t *testing.T) { + jsonData, err := json.Marshal(data) + require.NoError(t, err) + err = testStore.Set(testConfig.DefaultTable, jsonData, 0) + require.NoError(t, err) + + get, err := testStore.Get("yy2l8qwx55wc7ksxxjiz") + require.NoError(t, err) + require.NotEmpty(t, get) + +} + +func Test_Surrealdb_ListTable(t *testing.T) { + bytes, err := testStore.List(testConfig.DefaultTable) + require.NoError(t, err) + require.NotEmpty(t, bytes) + + fmt.Println(string(bytes)) +} + +func Test_Surrealdb_Get(t *testing.T) { + get, err := testStore.Get("783njhf8t4gkwlrvapsl") + require.NoError(t, err) + require.NotEmpty(t, get) +} + +func Test_Surrealdb_Delete(t *testing.T) { + err := testStore.Delete("qzplvi8yadeymz3az09c") + require.NoError(t, err) +} + +func Test_Surrealdb_Flush(t *testing.T) { + err := testStore.Reset() + require.NoError(t, err) } From bc1d9a9bdc1703cc14fc30ccfa718482a0e8aa96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Yasir=20Na=C3=A7?= <76746351+aliyasirnac@users.noreply.github.com> Date: Tue, 8 Apr 2025 01:21:19 +0300 Subject: [PATCH 003/168] added "testStore.Close()" to error handling --- surrealdb/config.go | 36 ++++++++-- surrealdb/go.mod | 49 +------------ surrealdb/go.sum | 139 +----------------------------------- surrealdb/surrealdb.go | 105 ++++++++++++++++----------- surrealdb/surrealdb_test.go | 59 ++++++++------- 5 files changed, 129 insertions(+), 259 deletions(-) diff --git a/surrealdb/config.go b/surrealdb/config.go index fbcc8219..bae58cbf 100644 --- a/surrealdb/config.go +++ b/surrealdb/config.go @@ -1,16 +1,40 @@ package surrealdb +// Config holds the configuration required to initialize and connect to a SurrealDB instance. +// It includes authentication credentials, namespace/database selection, and default storage settings. +// +// Fields: +// - ConnectionString: the full SurrealDB connection URL (e.g., "ws://localhost:8000"). +// - Namespace: the namespace to use when connecting to SurrealDB. +// - Database: the database name within the specified namespace. +// - Username: the SurrealDB root or application-level username for authentication. +// - Password: the associated password for the given username. +// - Access: optional field for token-based access (not always required). +// - Scope: optional scope name for scoped authentication (e.g., user login scopes). +// - DefaultTable: the default table name where key-value records will be stored. type Config struct { + // The connection URL to connect to SurrealDB ConnectionString string - Namespace string - Database string - // auth + // The namespace to be used in SurrealDB + Namespace string + + // The database to be used within the specified namespace + Database string + + // The application username to connect to SurrealDB Username string - Password string - Access string - Scope string + // The application password to connect to SurrealDB + Password string + + // Optional access token or access type + Access string + + // Optional scope for scoped logins (e.g., user-defined scopes) + Scope string + + // The default table used to store key-value records DefaultTable string } diff --git a/surrealdb/go.mod b/surrealdb/go.mod index 67788233..8b284a0c 100644 --- a/surrealdb/go.mod +++ b/surrealdb/go.mod @@ -1,6 +1,6 @@ module github.com/gofiber/storage/surrealdb/v2 -go 1.23.3 +go 1.22 require ( github.com/stretchr/testify v1.10.0 @@ -8,58 +8,13 @@ require ( ) require ( - dario.cat/mergo v1.0.1 // indirect - github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect - github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/containerd/log v0.1.0 // indirect - github.com/containerd/platforms v0.2.1 // indirect - github.com/cpuguy83/dockercfg v0.3.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/distribution/reference v0.6.0 // indirect - github.com/docker/docker v28.0.1+incompatible // indirect - github.com/docker/go-connections v0.5.0 // indirect - github.com/docker/go-units v0.5.0 // indirect - github.com/ebitengine/purego v0.8.2 // indirect - github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect - github.com/go-logr/logr v1.4.2 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect github.com/gofrs/uuid v4.4.0+incompatible // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect - github.com/klauspost/compress v1.17.4 // indirect github.com/kr/text v0.2.0 // indirect - github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/magiconair/properties v1.8.9 // indirect - github.com/moby/docker-image-spec v1.3.1 // indirect - github.com/moby/patternmatcher v0.6.0 // indirect - github.com/moby/sys/sequential v0.5.0 // indirect - github.com/moby/sys/user v0.1.0 // indirect - github.com/moby/sys/userns v0.1.0 // indirect - github.com/moby/term v0.5.0 // indirect - github.com/morikuni/aec v1.0.0 // indirect - github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/shirou/gopsutil/v4 v4.25.1 // indirect - github.com/sirupsen/logrus v1.9.3 // indirect - github.com/testcontainers/testcontainers-go v0.36.0 // indirect - github.com/testcontainers/testcontainers-go/modules/surrealdb v0.36.0 // indirect - github.com/tklauser/go-sysconf v0.3.12 // indirect - github.com/tklauser/numcpus v0.6.1 // indirect + github.com/rogpeppe/go-internal v1.13.1 // indirect github.com/x448/float16 v0.8.4 // indirect - github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect - go.opentelemetry.io/otel v1.35.0 // indirect - go.opentelemetry.io/otel/metric v1.35.0 // indirect - go.opentelemetry.io/otel/trace v1.35.0 // indirect - golang.org/x/crypto v0.35.0 // indirect - golang.org/x/sys v0.31.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/surrealdb/go.sum b/surrealdb/go.sum index 91f0ae08..83e1e50e 100644 --- a/surrealdb/go.sum +++ b/surrealdb/go.sum @@ -1,163 +1,28 @@ -dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= -dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= -github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= -github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= -github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= -github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= -github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= -github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= -github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v28.0.1+incompatible h1:FCHjSRdXhNRFjlHMTv4jUNlIBbTeRjrWfeFuJp7jpo0= -github.com/docker/docker v28.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= -github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= -github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= -github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I= -github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= -github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= -github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= -github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= -github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= -github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= -github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= -github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= -github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= -github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= -github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= -github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= -github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= -github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= -github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= -github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= -github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= -github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= -github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/surrealdb/surrealdb.go v0.3.2 h1:ynBbD0onW+M4BXhZ1+dDdVnNcaqBqFlHaHCFnk8LgmQ= github.com/surrealdb/surrealdb.go v0.3.2/go.mod h1:A0zahuChOaJtvTm2lefQnV+6aJtgqNLm9TIdYhZbw1Q= -github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= -github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= -github.com/testcontainers/testcontainers-go/modules/surrealdb v0.36.0 h1:x5kibhWJYAZe6GKXYlJyljVkBt7X9KRNJ4fj65AO6gI= -github.com/testcontainers/testcontainers-go/modules/surrealdb v0.36.0/go.mod h1:mocRRy6nXfjM75723YS6KoIoUt5rldiYxRvC9niLceQ= -github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= -github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= -github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= -github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= -github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= -go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= -go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= -go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= -go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= -go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= -go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/surrealdb/surrealdb.go b/surrealdb/surrealdb.go index 3f693e10..c562300e 100644 --- a/surrealdb/surrealdb.go +++ b/surrealdb/surrealdb.go @@ -2,7 +2,7 @@ package surrealdb import ( "encoding/json" - "fmt" + "errors" "github.com/surrealdb/surrealdb.go" "github.com/surrealdb/surrealdb.go/pkg/models" "time" @@ -14,21 +14,30 @@ type Storage struct { table string } +// model represents a key-value storage record used in SurrealDB. +// It contains the key name, the stored byte value, and an optional expiration timestamp. +// +// Fields: +// - Key: the unique identifier for the stored item. +// - Body: the value stored as a byte slice (can represent any serialized data, such as JSON). +// - Exp: the expiration time as a Unix timestamp (0 means no expiration). type model struct { - Key string `json:"k"` - Val []byte `json:"v"` - Exp int64 `json:"e"` + Key string `json:"key"` + Body []byte `json:"body"` + Exp int64 `json:"exp"` } -func New(config ...Config) *Storage { +// New creates a new SurrealDB storage instance using the provided configuration. +// Returns an error if the connection or authentication fails. +func New(config ...Config) (*Storage, error) { cfg := configDefault(config...) db, err := surrealdb.New(cfg.ConnectionString) if err != nil { - panic(err) + return nil, err } if err = db.Use(cfg.Namespace, cfg.Database); err != nil { - panic(err) + return nil, err } authData := &surrealdb.Auth{ @@ -38,80 +47,90 @@ func New(config ...Config) *Storage { token, err := db.SignIn(authData) if err != nil { - panic(err) + return nil, err } - if err := db.Authenticate(token); err != nil { - panic(err) + if err = db.Authenticate(token); err != nil { + return nil, err } - //defer func(token string) { - // if err := db.Invalidate(); err != nil { - // panic(err) - // } - //}(token) - return &Storage{ db: db, table: cfg.DefaultTable, - } + }, nil } func (s *Storage) Get(key string) ([]byte, error) { + if len(key) == 0 { + return nil, errors.New("key is required") + } + recordID := models.NewRecordID(s.table, key) m, err := surrealdb.Select[model, models.RecordID](s.db, recordID) if err != nil { return nil, err } - bytes, err := json.Marshal(m) - if err != nil { - return nil, err + + if m.Exp > 0 && time.Now().Unix() > m.Exp { + _ = s.Delete(key) + return nil, nil } - return bytes, nil + + return m.Body, nil } func (s *Storage) Set(key string, val []byte, exp time.Duration) error { - create, err := surrealdb.Create[model](s.db, models.Table(key), &model{Key: key, Val: val, Exp: int64(exp)}) - if err != nil { - return err + if len(key) == 0 { + return errors.New("key is required") } - bytes, err := json.Marshal(create) - if err != nil { - return err + var expiresAt int64 + if exp > 0 { + expiresAt = time.Now().Add(exp).Unix() } - fmt.Println(string(bytes)) - return nil + + _, err := surrealdb.Create[model](s.db, models.NewRecordID(s.table, key), &model{ + Key: key, + Body: val, + Exp: expiresAt, + }) + return err } func (s *Storage) Delete(key string) error { - _, err := surrealdb.Delete[model](s.db, models.NewRecordID(s.table, key)) - if err != nil { - return err + if len(key) == 0 { + return errors.New("key is required") } - return nil + + _, err := surrealdb.Delete[model](s.db, models.NewRecordID(s.table, key)) + return err } func (s *Storage) Reset() error { _, err := surrealdb.Delete[[]model](s.db, models.Table(s.table)) - if err != nil { - return err - } - return nil + return err } func (s *Storage) Close() error { return s.db.Close() } -func (s *Storage) List(table string) ([]byte, error) { - a, err := surrealdb.Select[[]map[string]interface{}, models.Table](s.db, models.Table(table)) +func (s *Storage) List() ([]byte, error) { + records, err := surrealdb.Select[[]model, models.Table](s.db, models.Table(s.table)) if err != nil { return nil, err } - bytes, err := json.Marshal(a) - if err != nil { - return nil, err + + data := make(map[string][]byte, len(*records)) + now := time.Now().Unix() + + for _, item := range *records { + if item.Exp > 0 && now > item.Exp { + _ = s.Delete(item.Key) + continue + } + data[item.Key] = item.Body } - return bytes, nil + + return json.Marshal(data) } diff --git a/surrealdb/surrealdb_test.go b/surrealdb/surrealdb_test.go index 45281b14..f88474dc 100644 --- a/surrealdb/surrealdb_test.go +++ b/surrealdb/surrealdb_test.go @@ -1,7 +1,6 @@ package surrealdb import ( - "encoding/json" "fmt" "github.com/stretchr/testify/require" "os" @@ -12,58 +11,51 @@ var testStore *Storage var testConfig = ConfigDefault func TestMain(m *testing.M) { - testStore = New(testConfig) + var err error + testStore, err = New(testConfig) + if err != nil { + panic(err) + } code := m.Run() - testStore.Close() + if err := testStore.Close(); err != nil { + fmt.Fprintf(os.Stderr, "failed to close store: %v\n", err) + } os.Exit(code) } -type testData struct { - Name string `json:"name"` - Age int `json:"age"` -} - -var data = testData{ - Name: "john", - Age: 35, -} - func Test_Surrealdb_Create(t *testing.T) { - jsonData, err := json.Marshal(data) - require.NoError(t, err) - err = testStore.Set(testConfig.DefaultTable, jsonData, 0) + err := testStore.Set("create", []byte("test12345"), 0) require.NoError(t, err) } func Test_Surrealdb_CreateAndGet(t *testing.T) { - jsonData, err := json.Marshal(data) - require.NoError(t, err) - err = testStore.Set(testConfig.DefaultTable, jsonData, 0) + err := testStore.Set("createandget", []byte("test1234"), 0) require.NoError(t, err) - get, err := testStore.Get("yy2l8qwx55wc7ksxxjiz") + get, err := testStore.Get("createandget") require.NoError(t, err) require.NotEmpty(t, get) } func Test_Surrealdb_ListTable(t *testing.T) { - bytes, err := testStore.List(testConfig.DefaultTable) + bytes, err := testStore.List() require.NoError(t, err) require.NotEmpty(t, bytes) - - fmt.Println(string(bytes)) } -func Test_Surrealdb_Get(t *testing.T) { - get, err := testStore.Get("783njhf8t4gkwlrvapsl") +func Test_Surrealdb_Get_WithNoErr(t *testing.T) { + get, err := testStore.Get("create") require.NoError(t, err) require.NotEmpty(t, get) } func Test_Surrealdb_Delete(t *testing.T) { - err := testStore.Delete("qzplvi8yadeymz3az09c") + err := testStore.Set("delete", []byte("delete1234"), 0) + require.NoError(t, err) + + err = testStore.Delete("delete") require.NoError(t, err) } @@ -71,3 +63,18 @@ func Test_Surrealdb_Flush(t *testing.T) { err := testStore.Reset() require.NoError(t, err) } + +func BenchmarkSet(b *testing.B) { + store, err := New(ConfigDefault) + if err != nil { + b.Fatalf("failed to init storage: %v", err) + } + defer store.Close() + + for i := 0; i < b.N; i++ { + err := store.Set(fmt.Sprintf("bench-key-%d", i), []byte("value"), 0) + if err != nil { + b.Errorf("Set failed: %v", err) + } + } +} From 48d18604d40dbe5d55ae1ae9a4915eb88d9f0699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Yasir=20Na=C3=A7?= <76746351+aliyasirnac@users.noreply.github.com> Date: Tue, 8 Apr 2025 01:41:03 +0300 Subject: [PATCH 004/168] added some tests --- surrealdb/surrealdb_test.go | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/surrealdb/surrealdb_test.go b/surrealdb/surrealdb_test.go index f88474dc..dc13c069 100644 --- a/surrealdb/surrealdb_test.go +++ b/surrealdb/surrealdb_test.go @@ -1,10 +1,12 @@ package surrealdb import ( + "encoding/json" "fmt" "github.com/stretchr/testify/require" "os" "testing" + "time" ) var testStore *Storage @@ -64,6 +66,44 @@ func Test_Surrealdb_Flush(t *testing.T) { require.NoError(t, err) } +func Test_Surrealdb_GetExpired(t *testing.T) { + err := testStore.Set("temp", []byte("value"), 1*time.Second) + require.NoError(t, err) + + time.Sleep(2 * time.Second) + + val, err := testStore.Get("temp") + require.NoError(t, err) + require.Nil(t, val) +} + +func Test_Surrealdb_GetMissing(t *testing.T) { + val, err := testStore.Get("non-existent-key") + require.NoError(t, err) + require.Nil(t, val) +} + +func Test_Surrealdb_ListSkipsExpired(t *testing.T) { + _ = testStore.Reset() + + // Geçerli kayıt + _ = testStore.Set("valid", []byte("123"), 0) + + // Süresi geçen kayıt + _ = testStore.Set("expired", []byte("456"), 1*time.Second) + time.Sleep(2 * time.Second) + + // List çağrısı + data, err := testStore.List() + require.NoError(t, err) + + var result map[string][]byte + err = json.Unmarshal(data, &result) + require.NoError(t, err) + + require.Contains(t, result, "valid") + require.NotContains(t, result, "expired") +} func BenchmarkSet(b *testing.B) { store, err := New(ConfigDefault) if err != nil { From d0f987d2f8c671763caa6bb84ce65fce27e1d1d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Yasir=20Na=C3=A7?= <76746351+aliyasirnac@users.noreply.github.com> Date: Tue, 8 Apr 2025 02:16:33 +0300 Subject: [PATCH 005/168] added readme and github actions file --- .github/workflows/test-surrealdb.yml | 35 +++++++++ surrealdb/README.md | 105 +++++++++++++++++++++++++++ 2 files changed, 140 insertions(+) create mode 100644 .github/workflows/test-surrealdb.yml create mode 100644 surrealdb/README.md diff --git a/.github/workflows/test-surrealdb.yml b/.github/workflows/test-surrealdb.yml new file mode 100644 index 00000000..d85b2249 --- /dev/null +++ b/.github/workflows/test-surrealdb.yml @@ -0,0 +1,35 @@ +on: + push: + branches: + - master + - main + paths: + - 'surrealdb/**' + pull_request: + paths: + - 'surrealdb/**' +name: "Tests SurrealDB" +jobs: + Tests: + runs-on: ubuntu-latest + strategy: + matrix: + go-version: + - 1.22.x + - 1.23.x + - 1.24.x + services: + surrealdb: + image: 'surrealdb/surrealdb:latest' + ports: + - '8000:8000' + command: ["start", "--user", "root", "--pass", "root"] + steps: + - name: Fetch Repository + uses: actions/checkout@v4 + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '${{ matrix.go-version }}' + - name: Run Test + run: cd ./surrealdb && go test ./... -v -race diff --git a/surrealdb/README.md b/surrealdb/README.md new file mode 100644 index 00000000..0459d273 --- /dev/null +++ b/surrealdb/README.md @@ -0,0 +1,105 @@ +--- +id: surrealdb +title: SurrealDB +--- + +![Release](https://img.shields.io/github/v/tag/gofiber/storage?filter=surrealdb*) +[![Discord](https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7)](https://gofiber.io/discord) +![Test](https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-surrealdb.yml?label=Tests) + +A SurrealDB storage driver using [surrealdb/surrealdb.go](https://github.com/surrealdb/surrealdb.go). + +**Note: Requires Go 1.20 and above** + +### Table of Contents +- [Signatures](#signatures) +- [Installation](#installation) +- [Examples](#examples) +- [Config](#config) +- [Default Config](#default-config) + +### Signatures +```go +func New(config ...Config) (*Storage, error) +func (s *Storage) Get(key string) ([]byte, error) +func (s *Storage) Set(key string, val []byte, exp time.Duration) error +func (s *Storage) Delete(key string) error +func (s *Storage) Reset() error +func (s *Storage) Close() error +func (s *Storage) Conn() *gocb.Cluster +func (s *Storage) List() ([]byte, error) { +``` +### Installation +SurrealDB is tested on Go 1.22 and 1.23 with support for modules. +Make sure to initialize a Go module first if you haven’t already: +```bash +go get github.com/gofiber/storage/surrealdb/v2 +``` + +### Examples +Import the storage package. +```go +import "github.com/gofiber/storage/surrealdb/v2" +``` + +You can use the following possibilities to create a storage: +```go +// Initialize default config +store, err := surrealdb.New() + +// Initialize SurrealDB storage with custom config +store, err := surrealdb.New(Config{ +ConnectionString: "ws://localhost:8000", +Namespace: "fiber_storage", +Database: "fiber_storage", +Username: "root", +Password: "root", +Access: "full", +Scope: "all", +DefaultTable: "fiber_storage", +}) +``` + +### Config +```go +type Config struct { +// The connection URL to connect to SurrealDB +ConnectionString string + +// The namespace to be used in SurrealDB +Namespace string + +// The database to be used within the specified namespace +Database string + +// The application username to connect to SurrealDB +Username string + +// The application password to connect to SurrealDB +Password string + +// Optional access token or access type +Access string + +// Optional scope for scoped logins (e.g., user-defined scopes) +Scope string + +// The default table used to store key-value records +DefaultTable string +} +``` + +### Default Config +```go +// ConfigDefault is the default config +var ConfigDefault = Config{ +ConnectionString: "ws://localhost:8000", +Namespace: "fiber_storage", +Database: "fiber_storage", +Username: "root", +Password: "root", +Access: "full", +Scope: "all", +DefaultTable: "fiber_storage", +} +``` From 0c639e37cae8ad893add12c062109db464f37dee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Yasir=20Na=C3=A7?= <76746351+aliyasirnac@users.noreply.github.com> Date: Tue, 8 Apr 2025 02:30:20 +0300 Subject: [PATCH 006/168] waiting for surrealdb --- .github/workflows/test-surrealdb.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-surrealdb.yml b/.github/workflows/test-surrealdb.yml index d85b2249..3794c0e1 100644 --- a/.github/workflows/test-surrealdb.yml +++ b/.github/workflows/test-surrealdb.yml @@ -23,13 +23,21 @@ jobs: image: 'surrealdb/surrealdb:latest' ports: - '8000:8000' - command: ["start", "--user", "root", "--pass", "root"] + command: [ "start", "--user", "root", "--pass", "root" ] steps: - name: Fetch Repository uses: actions/checkout@v4 - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: '${{ matrix.go-version }}' - - name: Run Test - run: cd ./surrealdb && go test ./... -v -race + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '${{ matrix.go-version }}' + + - name: Wait for SurrealDB + run: | + for i in {1..15}; do + nc -z localhost 8000 && echo "SurrealDB is up!" && break + echo "Waiting for SurrealDB..." + sleep 2 + done + - name: Run Test + run: cd ./surrealdb && go test ./... -v -race From 7306bb3b4cf79d817b443924d1d52ed6bb2e4696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Yasir=20Na=C3=A7?= <76746351+aliyasirnac@users.noreply.github.com> Date: Tue, 8 Apr 2025 02:42:05 +0300 Subject: [PATCH 007/168] refactored yml files --- .github/workflows/benchmark.yml | 6 +++++- .github/workflows/test-surrealdb.yml | 10 ++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 66da8d39..d656bb96 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -109,7 +109,11 @@ jobs: run: | docker run --name scylladb -p 9042:9042 -p 19042:19042 -p 9160:9160 -p 7000:7000 -p 7001:7001 -p 7199:7199 -p 9180:9180 -d scylladb/scylla:latest --broadcast-address 127.0.0.1 --listen-address 0.0.0.0 --broadcast-rpc-address 127.0.0.1 sleep 15 # Wait for ScyllaDb to initialize - + - name: Install SurrealDB + if: ${{ matrix.package == 'surrealdb' }} + run: | + docker run --name surrealdb -p 8000:8000 -d surrealdb/surrealdb:latest start --user root --pass root + sleep 30 # wait for SurrealDb to initialize - name: Setup Redis if: ${{ matrix.package == 'redis' || matrix.package == 'rueidis' }} uses: shogo82148/actions-setup-redis@v1 diff --git a/.github/workflows/test-surrealdb.yml b/.github/workflows/test-surrealdb.yml index 3794c0e1..ef8ffdd3 100644 --- a/.github/workflows/test-surrealdb.yml +++ b/.github/workflows/test-surrealdb.yml @@ -32,12 +32,10 @@ jobs: with: go-version: '${{ matrix.go-version }}' - - name: Wait for SurrealDB + - name: Run ScyllaDb run: | - for i in {1..15}; do - nc -z localhost 8000 && echo "SurrealDB is up!" && break - echo "Waiting for SurrealDB..." - sleep 2 - done + docker run --name surrealdb -p 8000:8000 -d surrealdb/surrealdb:latest start --user root --pass root + sleep 30 # Wait for SurrealDb to initialize + - name: Run Test run: cd ./surrealdb && go test ./... -v -race From dfec0c6f76ffda091f2e17e2889349b87800754d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Yasir=20Na=C3=A7?= <76746351+aliyasirnac@users.noreply.github.com> Date: Tue, 8 Apr 2025 02:46:05 +0300 Subject: [PATCH 008/168] added reset to the benchmark --- surrealdb/surrealdb_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/surrealdb/surrealdb_test.go b/surrealdb/surrealdb_test.go index dc13c069..5679180e 100644 --- a/surrealdb/surrealdb_test.go +++ b/surrealdb/surrealdb_test.go @@ -110,6 +110,7 @@ func BenchmarkSet(b *testing.B) { b.Fatalf("failed to init storage: %v", err) } defer store.Close() + _ = store.Reset() for i := 0; i < b.N; i++ { err := store.Set(fmt.Sprintf("bench-key-%d", i), []byte("value"), 0) From af43d028309c789f1d889528188c57f4c307f81e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Yasir=20Na=C3=A7?= <76746351+aliyasirnac@users.noreply.github.com> Date: Tue, 8 Apr 2025 02:51:31 +0300 Subject: [PATCH 009/168] changed benchmark key --- surrealdb/surrealdb_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/surrealdb/surrealdb_test.go b/surrealdb/surrealdb_test.go index 5679180e..e0b6494d 100644 --- a/surrealdb/surrealdb_test.go +++ b/surrealdb/surrealdb_test.go @@ -110,10 +110,10 @@ func BenchmarkSet(b *testing.B) { b.Fatalf("failed to init storage: %v", err) } defer store.Close() - _ = store.Reset() for i := 0; i < b.N; i++ { - err := store.Set(fmt.Sprintf("bench-key-%d", i), []byte("value"), 0) + key := fmt.Sprintf("bench-key-%d-%d", i, time.Now().UnixNano()) + err := store.Set(fmt.Sprintf("bench-key-%d", key), []byte("value"), 0) if err != nil { b.Errorf("Set failed: %v", err) } From 05c8d3ed0fbb3015f512dbd88165e430f87772bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Yasir=20Na=C3=A7?= <76746351+aliyasirnac@users.noreply.github.com> Date: Tue, 8 Apr 2025 02:53:07 +0300 Subject: [PATCH 010/168] format key --- surrealdb/surrealdb_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/surrealdb/surrealdb_test.go b/surrealdb/surrealdb_test.go index e0b6494d..69c385e3 100644 --- a/surrealdb/surrealdb_test.go +++ b/surrealdb/surrealdb_test.go @@ -113,7 +113,7 @@ func BenchmarkSet(b *testing.B) { for i := 0; i < b.N; i++ { key := fmt.Sprintf("bench-key-%d-%d", i, time.Now().UnixNano()) - err := store.Set(fmt.Sprintf("bench-key-%d", key), []byte("value"), 0) + err := store.Set(fmt.Sprintf("bench-key-%s", key), []byte("value"), 0) if err != nil { b.Errorf("Set failed: %v", err) } From 4701e7152992efc5ea6e84a3b470019472dec6cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Yasir=20Na=C3=A7?= <76746351+aliyasirnac@users.noreply.github.com> Date: Tue, 8 Apr 2025 04:43:37 +0300 Subject: [PATCH 011/168] apply review suggestions and minor fixes, except test containers --- .github/workflows/test-surrealdb.yml | 3 +-- surrealdb/README.md | 16 +++++------- surrealdb/go.mod | 4 +-- surrealdb/surrealdb.go | 16 +++++++----- surrealdb/surrealdb_test.go | 39 ++++++++++++++++------------ 5 files changed, 42 insertions(+), 36 deletions(-) diff --git a/.github/workflows/test-surrealdb.yml b/.github/workflows/test-surrealdb.yml index ef8ffdd3..6618f73a 100644 --- a/.github/workflows/test-surrealdb.yml +++ b/.github/workflows/test-surrealdb.yml @@ -15,7 +15,6 @@ jobs: strategy: matrix: go-version: - - 1.22.x - 1.23.x - 1.24.x services: @@ -32,7 +31,7 @@ jobs: with: go-version: '${{ matrix.go-version }}' - - name: Run ScyllaDb + - name: Run SurrealDB run: | docker run --name surrealdb -p 8000:8000 -d surrealdb/surrealdb:latest start --user root --pass root sleep 30 # Wait for SurrealDb to initialize diff --git a/surrealdb/README.md b/surrealdb/README.md index 0459d273..84a252d8 100644 --- a/surrealdb/README.md +++ b/surrealdb/README.md @@ -7,10 +7,6 @@ title: SurrealDB [![Discord](https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7)](https://gofiber.io/discord) ![Test](https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-surrealdb.yml?label=Tests) -A SurrealDB storage driver using [surrealdb/surrealdb.go](https://github.com/surrealdb/surrealdb.go). - -**Note: Requires Go 1.20 and above** - ### Table of Contents - [Signatures](#signatures) - [Installation](#installation) @@ -26,29 +22,29 @@ func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error -func (s *Storage) Conn() *gocb.Cluster +func (s *Storage) Conn() *surrealdb.DB func (s *Storage) List() ([]byte, error) { ``` ### Installation -SurrealDB is tested on Go 1.22 and 1.23 with support for modules. +SurrealDB is tested on latest two version of Golang. Make sure to initialize a Go module first if you haven’t already: ```bash -go get github.com/gofiber/storage/surrealdb/v2 +go get github.com/gofiber/storage/surrealdb ``` ### Examples Import the storage package. ```go -import "github.com/gofiber/storage/surrealdb/v2" +import "github.com/gofiber/storage/surrealdb" ``` You can use the following possibilities to create a storage: ```go // Initialize default config -store, err := surrealdb.New() +store := surrealdb.New() // Initialize SurrealDB storage with custom config -store, err := surrealdb.New(Config{ +store := surrealdb.New(Config{ ConnectionString: "ws://localhost:8000", Namespace: "fiber_storage", Database: "fiber_storage", diff --git a/surrealdb/go.mod b/surrealdb/go.mod index 8b284a0c..46027166 100644 --- a/surrealdb/go.mod +++ b/surrealdb/go.mod @@ -1,6 +1,6 @@ -module github.com/gofiber/storage/surrealdb/v2 +module github.com/gofiber/storage/surrealdb -go 1.22 +go 1.23 require ( github.com/stretchr/testify v1.10.0 diff --git a/surrealdb/surrealdb.go b/surrealdb/surrealdb.go index c562300e..44addfe2 100644 --- a/surrealdb/surrealdb.go +++ b/surrealdb/surrealdb.go @@ -29,15 +29,15 @@ type model struct { // New creates a new SurrealDB storage instance using the provided configuration. // Returns an error if the connection or authentication fails. -func New(config ...Config) (*Storage, error) { +func New(config ...Config) *Storage { cfg := configDefault(config...) db, err := surrealdb.New(cfg.ConnectionString) if err != nil { - return nil, err + panic(err) } if err = db.Use(cfg.Namespace, cfg.Database); err != nil { - return nil, err + panic(err) } authData := &surrealdb.Auth{ @@ -47,17 +47,17 @@ func New(config ...Config) (*Storage, error) { token, err := db.SignIn(authData) if err != nil { - return nil, err + panic(err) } if err = db.Authenticate(token); err != nil { - return nil, err + panic(err) } return &Storage{ db: db, table: cfg.DefaultTable, - }, nil + } } func (s *Storage) Get(key string) ([]byte, error) { @@ -115,6 +115,10 @@ func (s *Storage) Close() error { return s.db.Close() } +func (s *Storage) Conn() *surrealdb.DB { + return s.db +} + func (s *Storage) List() ([]byte, error) { records, err := surrealdb.Select[[]model, models.Table](s.db, models.Table(s.table)) if err != nil { diff --git a/surrealdb/surrealdb_test.go b/surrealdb/surrealdb_test.go index 69c385e3..bc574675 100644 --- a/surrealdb/surrealdb_test.go +++ b/surrealdb/surrealdb_test.go @@ -13,11 +13,7 @@ var testStore *Storage var testConfig = ConfigDefault func TestMain(m *testing.M) { - var err error - testStore, err = New(testConfig) - if err != nil { - panic(err) - } + testStore = New(testConfig) code := m.Run() if err := testStore.Close(); err != nil { @@ -86,14 +82,11 @@ func Test_Surrealdb_GetMissing(t *testing.T) { func Test_Surrealdb_ListSkipsExpired(t *testing.T) { _ = testStore.Reset() - // Geçerli kayıt _ = testStore.Set("valid", []byte("123"), 0) - // Süresi geçen kayıt _ = testStore.Set("expired", []byte("456"), 1*time.Second) time.Sleep(2 * time.Second) - // List çağrısı data, err := testStore.List() require.NoError(t, err) @@ -104,18 +97,32 @@ func Test_Surrealdb_ListSkipsExpired(t *testing.T) { require.Contains(t, result, "valid") require.NotContains(t, result, "expired") } + func BenchmarkSet(b *testing.B) { - store, err := New(ConfigDefault) - if err != nil { - b.Fatalf("failed to init storage: %v", err) - } + store := New(ConfigDefault) defer store.Close() for i := 0; i < b.N; i++ { key := fmt.Sprintf("bench-key-%d-%d", i, time.Now().UnixNano()) - err := store.Set(fmt.Sprintf("bench-key-%s", key), []byte("value"), 0) - if err != nil { - b.Errorf("Set failed: %v", err) - } + store.Set(fmt.Sprintf("bench-key-%s", key), []byte("value"), 0) + } +} + +func BenchmarkGet(b *testing.B) { + store := New(ConfigDefault) + defer store.Close() + store.Reset() + + key := "bench-get-key" + value := []byte("some-value") + + err := store.Set(key, value, 0) + if err != nil { + b.Fatalf("failed to prepare test value: %v", err) + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + store.Get(key) } } From f13d0882af361c01b0041f09b80f85d2bfd45d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Yasir=20Na=C3=A7?= <76746351+aliyasirnac@users.noreply.github.com> Date: Tue, 8 Apr 2025 05:15:00 +0300 Subject: [PATCH 012/168] added testcontainers for testing --- surrealdb/go.mod | 50 ++++++++++++- surrealdb/go.sum | 135 ++++++++++++++++++++++++++++++++++++ surrealdb/surrealdb_test.go | 121 ++++++++++++++++++++++++++------ 3 files changed, 283 insertions(+), 23 deletions(-) diff --git a/surrealdb/go.mod b/surrealdb/go.mod index 46027166..aa87ddbe 100644 --- a/surrealdb/go.mod +++ b/surrealdb/go.mod @@ -1,6 +1,8 @@ module github.com/gofiber/storage/surrealdb -go 1.23 +go 1.23.0 + +toolchain go1.23.3 require ( github.com/stretchr/testify v1.10.0 @@ -8,13 +10,59 @@ require ( ) require ( + dario.cat/mergo v1.0.1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/containerd/platforms v0.2.1 // indirect + github.com/cpuguy83/dockercfg v0.3.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/distribution/reference v0.6.0 // indirect + github.com/docker/docker v28.0.1+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/ebitengine/purego v0.8.2 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect github.com/gofrs/uuid v4.4.0+incompatible // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect + github.com/klauspost/compress v1.17.4 // indirect github.com/kr/text v0.2.0 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/magiconair/properties v1.8.9 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/patternmatcher v0.6.0 // indirect + github.com/moby/sys/sequential v0.5.0 // indirect + github.com/moby/sys/user v0.1.0 // indirect + github.com/moby/sys/userns v0.1.0 // indirect + github.com/moby/term v0.5.0 // indirect + github.com/morikuni/aec v1.0.0 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.1 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/rogpeppe/go-internal v1.13.1 // indirect + github.com/shirou/gopsutil/v4 v4.25.1 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/testcontainers/testcontainers-go v0.36.0 // indirect + github.com/testcontainers/testcontainers-go/modules/surrealdb v0.36.0 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect github.com/x448/float16 v0.8.4 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect + golang.org/x/crypto v0.35.0 // indirect + golang.org/x/sys v0.31.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/surrealdb/go.sum b/surrealdb/go.sum index 83e1e50e..98417ab9 100644 --- a/surrealdb/go.sum +++ b/surrealdb/go.sum @@ -1,28 +1,163 @@ +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= +github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= +github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v28.0.1+incompatible h1:FCHjSRdXhNRFjlHMTv4jUNlIBbTeRjrWfeFuJp7jpo0= +github.com/docker/docker v28.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I= +github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= +github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= +github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= +github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= +github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= +github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/surrealdb/surrealdb.go v0.3.2 h1:ynBbD0onW+M4BXhZ1+dDdVnNcaqBqFlHaHCFnk8LgmQ= github.com/surrealdb/surrealdb.go v0.3.2/go.mod h1:A0zahuChOaJtvTm2lefQnV+6aJtgqNLm9TIdYhZbw1Q= +github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= +github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= +github.com/testcontainers/testcontainers-go/modules/surrealdb v0.36.0 h1:x5kibhWJYAZe6GKXYlJyljVkBt7X9KRNJ4fj65AO6gI= +github.com/testcontainers/testcontainers-go/modules/surrealdb v0.36.0/go.mod h1:mocRRy6nXfjM75723YS6KoIoUt5rldiYxRvC9niLceQ= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= +golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/surrealdb/surrealdb_test.go b/surrealdb/surrealdb_test.go index bc574675..e611736b 100644 --- a/surrealdb/surrealdb_test.go +++ b/surrealdb/surrealdb_test.go @@ -1,34 +1,78 @@ package surrealdb import ( + "context" "encoding/json" "fmt" "github.com/stretchr/testify/require" + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/modules/surrealdb" "os" "testing" "time" ) -var testStore *Storage -var testConfig = ConfigDefault +var ( + // surrealDb is the default image used for running surrealdb in tests. + surrealDb = "surrealdb/surrealdb:latest" + surrealDbImageEnvVar string = "TEST_SURREALDB_IMAGE" + surrealDbUser string = "root" + surrealDbPass string = "root" +) -func TestMain(m *testing.M) { - testStore = New(testConfig) +func newTestStore(t testing.TB) (*Storage, error) { + t.Helper() - code := m.Run() - if err := testStore.Close(); err != nil { - fmt.Fprintf(os.Stderr, "failed to close store: %v\n", err) + img := surrealDb + if imgFromEnv := os.Getenv(surrealDbImageEnvVar); imgFromEnv != "" { + img = imgFromEnv } - os.Exit(code) + surrealdbContainer, err := surrealdb.Run(context.Background(), img) + if err != nil { + return nil, err + } + + testcontainers.CleanupContainer(t, surrealdbContainer) + + host, err := surrealdbContainer.Host(context.Background()) + if err != nil { + return nil, err + } + + port, err := surrealdbContainer.MappedPort(context.Background(), "8000") + if err != nil { + return nil, err + } + + url := fmt.Sprintf("ws://%s:%s", host, port.Port()) + + return New( + Config{ + ConnectionString: url, + Namespace: "testns", + Database: "testdb", + Username: surrealDbUser, + Password: surrealDbPass, + DefaultTable: "fiber_storage", + }, + ), nil } func Test_Surrealdb_Create(t *testing.T) { - err := testStore.Set("create", []byte("test12345"), 0) + testStore, err := newTestStore(t) + require.NoError(t, err) + defer testStore.Close() + + err = testStore.Set("create", []byte("test12345"), 0) require.NoError(t, err) } func Test_Surrealdb_CreateAndGet(t *testing.T) { - err := testStore.Set("createandget", []byte("test1234"), 0) + testStore, err := newTestStore(t) + require.NoError(t, err) + defer testStore.Close() + + err = testStore.Set("createandget", []byte("test1234"), 0) require.NoError(t, err) get, err := testStore.Get("createandget") @@ -38,19 +82,34 @@ func Test_Surrealdb_CreateAndGet(t *testing.T) { } func Test_Surrealdb_ListTable(t *testing.T) { + testStore, err := newTestStore(t) + require.NoError(t, err) + defer testStore.Close() + bytes, err := testStore.List() require.NoError(t, err) require.NotEmpty(t, bytes) } func Test_Surrealdb_Get_WithNoErr(t *testing.T) { - get, err := testStore.Get("create") + testStore, err := newTestStore(t) + require.NoError(t, err) + defer testStore.Close() + + err = testStore.Set("create2", []byte("test1234"), 0) + require.NoError(t, err) + + get, err := testStore.Get("create2") require.NoError(t, err) require.NotEmpty(t, get) } func Test_Surrealdb_Delete(t *testing.T) { - err := testStore.Set("delete", []byte("delete1234"), 0) + testStore, err := newTestStore(t) + require.NoError(t, err) + defer testStore.Close() + + err = testStore.Set("delete", []byte("delete1234"), 0) require.NoError(t, err) err = testStore.Delete("delete") @@ -58,12 +117,20 @@ func Test_Surrealdb_Delete(t *testing.T) { } func Test_Surrealdb_Flush(t *testing.T) { - err := testStore.Reset() + testStore, err := newTestStore(t) + require.NoError(t, err) + defer testStore.Close() + + err = testStore.Reset() require.NoError(t, err) } func Test_Surrealdb_GetExpired(t *testing.T) { - err := testStore.Set("temp", []byte("value"), 1*time.Second) + testStore, err := newTestStore(t) + require.NoError(t, err) + defer testStore.Close() + + err = testStore.Set("temp", []byte("value"), 1*time.Second) require.NoError(t, err) time.Sleep(2 * time.Second) @@ -74,12 +141,20 @@ func Test_Surrealdb_GetExpired(t *testing.T) { } func Test_Surrealdb_GetMissing(t *testing.T) { + testStore, err := newTestStore(t) + require.NoError(t, err) + defer testStore.Close() + val, err := testStore.Get("non-existent-key") require.NoError(t, err) require.Nil(t, val) } func Test_Surrealdb_ListSkipsExpired(t *testing.T) { + testStore, err := newTestStore(t) + require.NoError(t, err) + defer testStore.Close() + _ = testStore.Reset() _ = testStore.Set("valid", []byte("123"), 0) @@ -99,30 +174,32 @@ func Test_Surrealdb_ListSkipsExpired(t *testing.T) { } func BenchmarkSet(b *testing.B) { - store := New(ConfigDefault) - defer store.Close() + testStore, err := newTestStore(b) + require.NoError(b, err) + defer testStore.Close() for i := 0; i < b.N; i++ { key := fmt.Sprintf("bench-key-%d-%d", i, time.Now().UnixNano()) - store.Set(fmt.Sprintf("bench-key-%s", key), []byte("value"), 0) + testStore.Set(fmt.Sprintf("bench-key-%s", key), []byte("value"), 0) } } func BenchmarkGet(b *testing.B) { - store := New(ConfigDefault) - defer store.Close() - store.Reset() + testStore, err := newTestStore(b) + require.NoError(b, err) + defer testStore.Close() + testStore.Reset() key := "bench-get-key" value := []byte("some-value") - err := store.Set(key, value, 0) + err = testStore.Set(key, value, 0) if err != nil { b.Fatalf("failed to prepare test value: %v", err) } b.ResetTimer() for i := 0; i < b.N; i++ { - store.Get(key) + testStore.Get(key) } } From 685c6a67579a850c77959ccd567093812d6e9093 Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez <835733+gaby@users.noreply.github.com> Date: Mon, 7 Apr 2025 22:47:13 -0400 Subject: [PATCH 013/168] Update test-surrealdb.yml --- .github/workflows/test-surrealdb.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/test-surrealdb.yml b/.github/workflows/test-surrealdb.yml index 6618f73a..e98e7e9a 100644 --- a/.github/workflows/test-surrealdb.yml +++ b/.github/workflows/test-surrealdb.yml @@ -17,12 +17,6 @@ jobs: go-version: - 1.23.x - 1.24.x - services: - surrealdb: - image: 'surrealdb/surrealdb:latest' - ports: - - '8000:8000' - command: [ "start", "--user", "root", "--pass", "root" ] steps: - name: Fetch Repository uses: actions/checkout@v4 @@ -31,10 +25,5 @@ jobs: with: go-version: '${{ matrix.go-version }}' - - name: Run SurrealDB - run: | - docker run --name surrealdb -p 8000:8000 -d surrealdb/surrealdb:latest start --user root --pass root - sleep 30 # Wait for SurrealDb to initialize - - name: Run Test run: cd ./surrealdb && go test ./... -v -race From 496c0b684e8fe475daf9e34f32b9eb9025db9009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Yasir=20Na=C3=A7?= <76746351+aliyasirnac@users.noreply.github.com> Date: Tue, 8 Apr 2025 13:04:21 +0300 Subject: [PATCH 014/168] fix review comments and switch to Upsert in Set - Replaced Create with Upsert to allow overwriting existing keys - Removed trailing spaces from line 2 and 3 in README - Addressed other code review suggestions (naming, consistency, etc.) --- surrealdb/README.md | 6 +-- surrealdb/surrealdb.go | 3 +- surrealdb/surrealdb_test.go | 79 ++++++++++++++++++++++--------------- 3 files changed, 52 insertions(+), 36 deletions(-) diff --git a/surrealdb/README.md b/surrealdb/README.md index 84a252d8..a4b2cad9 100644 --- a/surrealdb/README.md +++ b/surrealdb/README.md @@ -1,6 +1,6 @@ --- -id: surrealdb -title: SurrealDB +id: surrealdb +title: SurrealDB --- ![Release](https://img.shields.io/github/v/tag/gofiber/storage?filter=surrealdb*) @@ -16,7 +16,7 @@ title: SurrealDB ### Signatures ```go -func New(config ...Config) (*Storage, error) +func New(config ...Config) (*Storage, error) func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error diff --git a/surrealdb/surrealdb.go b/surrealdb/surrealdb.go index 44addfe2..5f5382fa 100644 --- a/surrealdb/surrealdb.go +++ b/surrealdb/surrealdb.go @@ -89,7 +89,8 @@ func (s *Storage) Set(key string, val []byte, exp time.Duration) error { expiresAt = time.Now().Add(exp).Unix() } - _, err := surrealdb.Create[model](s.db, models.NewRecordID(s.table, key), &model{ + // Upsert is used instead of Create to allow overriding the same key if it already exists. + _, err := surrealdb.Upsert[model](s.db, models.NewRecordID(s.table, key), &model{ Key: key, Body: val, Exp: expiresAt, diff --git a/surrealdb/surrealdb_test.go b/surrealdb/surrealdb_test.go index e611736b..204c7301 100644 --- a/surrealdb/surrealdb_test.go +++ b/surrealdb/surrealdb_test.go @@ -63,7 +63,7 @@ func Test_Surrealdb_Create(t *testing.T) { require.NoError(t, err) defer testStore.Close() - err = testStore.Set("create", []byte("test12345"), 0) + err = testStore.Set("test", []byte("test12345"), 0) require.NoError(t, err) } @@ -72,10 +72,10 @@ func Test_Surrealdb_CreateAndGet(t *testing.T) { require.NoError(t, err) defer testStore.Close() - err = testStore.Set("createandget", []byte("test1234"), 0) + err = testStore.Set("test", []byte("test12345"), 0) require.NoError(t, err) - get, err := testStore.Get("createandget") + get, err := testStore.Get("test") require.NoError(t, err) require.NotEmpty(t, get) @@ -96,10 +96,10 @@ func Test_Surrealdb_Get_WithNoErr(t *testing.T) { require.NoError(t, err) defer testStore.Close() - err = testStore.Set("create2", []byte("test1234"), 0) + err = testStore.Set("test", []byte("test1234"), 0) require.NoError(t, err) - get, err := testStore.Get("create2") + get, err := testStore.Get("test") require.NoError(t, err) require.NotEmpty(t, get) } @@ -109,10 +109,10 @@ func Test_Surrealdb_Delete(t *testing.T) { require.NoError(t, err) defer testStore.Close() - err = testStore.Set("delete", []byte("delete1234"), 0) + err = testStore.Set("test", []byte("delete1234"), 0) require.NoError(t, err) - err = testStore.Delete("delete") + err = testStore.Delete("test") require.NoError(t, err) } @@ -121,7 +121,6 @@ func Test_Surrealdb_Flush(t *testing.T) { require.NoError(t, err) defer testStore.Close() - err = testStore.Reset() require.NoError(t, err) } @@ -155,8 +154,6 @@ func Test_Surrealdb_ListSkipsExpired(t *testing.T) { require.NoError(t, err) defer testStore.Close() - _ = testStore.Reset() - _ = testStore.Set("valid", []byte("123"), 0) _ = testStore.Set("expired", []byte("456"), 1*time.Second) @@ -173,33 +170,51 @@ func Test_Surrealdb_ListSkipsExpired(t *testing.T) { require.NotContains(t, result, "expired") } -func BenchmarkSet(b *testing.B) { +func Benchmark_SurrealDB_Set(b *testing.B) { testStore, err := newTestStore(b) require.NoError(b, err) defer testStore.Close() - for i := 0; i < b.N; i++ { - key := fmt.Sprintf("bench-key-%d-%d", i, time.Now().UnixNano()) - testStore.Set(fmt.Sprintf("bench-key-%s", key), []byte("value"), 0) - } -} - -func BenchmarkGet(b *testing.B) { - testStore, err := newTestStore(b) - require.NoError(b, err) - defer testStore.Close() - testStore.Reset() - - key := "bench-get-key" - value := []byte("some-value") - - err = testStore.Set(key, value, 0) - if err != nil { - b.Fatalf("failed to prepare test value: %v", err) - } - + b.ReportAllocs() b.ResetTimer() + for i := 0; i < b.N; i++ { - testStore.Get(key) + err = testStore.Set("john", []byte("doe"), 0) } + + require.NoError(b, err) +} + +func Benchmark_SurrealDB_Get(b *testing.B) { + testStore, err := newTestStore(b) + require.NoError(b, err) + defer testStore.Close() + + err = testStore.Set("john", []byte("doe"), 0) + require.NoError(b, err) + + b.ReportAllocs() + b.ResetTimer() + + for i := 0; i < b.N; i++ { + _, err = testStore.Get("john") + } + + require.NoError(b, err) +} + +func Benchmark_SurrealDB_SetAndDelete(b *testing.B) { + testStore, err := newTestStore(b) + require.NoError(b, err) + defer testStore.Close() + + b.ReportAllocs() + b.ResetTimer() + + for i := 0; i < b.N; i++ { + testStore.Set("john", []byte("doe"), 0) + err = testStore.Delete("john") + } + + require.NoError(b, err) } From c425087442e45ef669d675f5020aec67763aabc8 Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez <835733+gaby@users.noreply.github.com> Date: Tue, 8 Apr 2025 08:12:58 -0400 Subject: [PATCH 015/168] Update README.md --- surrealdb/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/surrealdb/README.md b/surrealdb/README.md index a4b2cad9..d3294b40 100644 --- a/surrealdb/README.md +++ b/surrealdb/README.md @@ -8,6 +8,7 @@ title: SurrealDB ![Test](https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-surrealdb.yml?label=Tests) ### Table of Contents + - [Signatures](#signatures) - [Installation](#installation) - [Examples](#examples) @@ -15,6 +16,7 @@ title: SurrealDB - [Default Config](#default-config) ### Signatures + ```go func New(config ...Config) (*Storage, error) func (s *Storage) Get(key string) ([]byte, error) @@ -25,20 +27,26 @@ func (s *Storage) Close() error func (s *Storage) Conn() *surrealdb.DB func (s *Storage) List() ([]byte, error) { ``` + ### Installation + SurrealDB is tested on latest two version of Golang. Make sure to initialize a Go module first if you haven’t already: + ```bash go get github.com/gofiber/storage/surrealdb ``` ### Examples + Import the storage package. + ```go import "github.com/gofiber/storage/surrealdb" ``` You can use the following possibilities to create a storage: + ```go // Initialize default config store := surrealdb.New() @@ -57,6 +65,7 @@ DefaultTable: "fiber_storage", ``` ### Config + ```go type Config struct { // The connection URL to connect to SurrealDB @@ -86,6 +95,7 @@ DefaultTable string ``` ### Default Config + ```go // ConfigDefault is the default config var ConfigDefault = Config{ From 33ac0242fc89ab3fb2b97f4dcba6d775eb8ae022 Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez <835733+gaby@users.noreply.github.com> Date: Tue, 8 Apr 2025 08:24:24 -0400 Subject: [PATCH 016/168] Update go.mod --- surrealdb/go.mod | 1 - 1 file changed, 1 deletion(-) diff --git a/surrealdb/go.mod b/surrealdb/go.mod index aa87ddbe..8a8efbdd 100644 --- a/surrealdb/go.mod +++ b/surrealdb/go.mod @@ -2,7 +2,6 @@ module github.com/gofiber/storage/surrealdb go 1.23.0 -toolchain go1.23.3 require ( github.com/stretchr/testify v1.10.0 From cc552d8da176117f2165179415a73b8426ab2efc Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Mon, 14 Apr 2025 12:30:17 +0530 Subject: [PATCH 017/168] Added Apache Cassandra Storage Driver --- .github/workflows/benchmark.yml | 1 + .github/workflows/test-cassandra.yml | 30 ++ README.md | 1 + cassandra/README.md | 108 +++++++ cassandra/cassandra.go | 416 +++++++++++++++++++++++++++ cassandra/cassandra_test.go | 310 ++++++++++++++++++++ cassandra/config.go | 73 +++++ cassandra/go.mod | 67 +++++ cassandra/go.sum | 202 +++++++++++++ 9 files changed, 1208 insertions(+) create mode 100644 .github/workflows/test-cassandra.yml create mode 100644 cassandra/README.md create mode 100644 cassandra/cassandra.go create mode 100644 cassandra/cassandra_test.go create mode 100644 cassandra/config.go create mode 100644 cassandra/go.mod create mode 100644 cassandra/go.sum diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index e93d0e26..0f2a6761 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -130,6 +130,7 @@ jobs: MSSQL_PASSWORD: MsSql!1234 TEST_AZURITE_IMAGE: mcr.microsoft.com/azure-storage/azurite:latest TEST_CLICKHOUSE_IMAGE: "clickhouse/clickhouse-server:23-alpine" + TEST_CASSANDRA_IMAGE: "cassandra:4.1.3" TEST_COUCHBASE_IMAGE: "couchbase:enterprise-7.6.5" TEST_DYNAMODB_IMAGE: amazon/dynamodb-local:latest TEST_MINIO_IMAGE: "docker.io/minio/minio:RELEASE.2024-08-17T01-24-54Z" diff --git a/.github/workflows/test-cassandra.yml b/.github/workflows/test-cassandra.yml new file mode 100644 index 00000000..06687007 --- /dev/null +++ b/.github/workflows/test-cassandra.yml @@ -0,0 +1,30 @@ +on: + push: + branches: + - master + - main + paths: + - 'cassandra/**' + pull_request: + paths: + - 'cassandra/**' +name: 'Tests Cassandra' +jobs: + Tests: + runs-on: ubuntu-latest + strategy: + matrix: + go-version: + - 1.23.x + - 1.24.x + steps: + - name: Fetch Repository + uses: actions/checkout@v4 + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '${{ matrix.go-version }}' + - name: Run Test + env: + TEST_CASSANDRA_IMAGE: cassandra:4.1.3 + run: cd ./cassandra && go clean -testcache && go test ./... -v -race diff --git a/README.md b/README.md index ddb141b3..b58f1390 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ type Storage interface { - [AzureBlob](./azureblob/README.md) - [Badger](./badger/README.md) - [Bbolt](./bbolt) +- [Cassandra](./cassandra/README.md) - [CloudflareKV](./cloudflarekv/README.md) - [Coherence](./coherence/README.md) - [Couchbase](./couchbase/README.md) diff --git a/cassandra/README.md b/cassandra/README.md new file mode 100644 index 00000000..d7124476 --- /dev/null +++ b/cassandra/README.md @@ -0,0 +1,108 @@ +# Cassandra + +A Cassandra storage driver using [https://github.com/gocql/gocql](https://github.com/apache/cassandra-gocql-driver). + +![Release](https://img.shields.io/github/v/tag/gofiber/storage?filter=cassandra*) +[![Discord](https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7)](https://gofiber.io/discord) +![Test](https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-cassandra.yml?label=Tests) + +### Table of Contents + +- [Signatures](#signatures) +- [Installation](#installation) +- [Examples](#examples) +- [Config](#config) +- [Default Config](#default-config) + +### Signatures + +```go +func New(config ...Config) (*Storage, error) +func (s *Storage) Get(key string) ([]byte, error) +func (s *Storage) Set(key string, val []byte, exp time.Duration) error +func (s *Storage) Delete(key string) error +func (s *Storage) Reset() error +func (s *Storage) Close() error +func (s *Storage) Conn() *Session +``` + +### Installation + +Cassandra is supported on the latest two versions of Go: + +Install the cassandra implementation: +```bash +go get github.com/gofiber/storage/cassandra +``` + +### Running the tests + +This module uses [Testcontainers for Go](https://github.com/testcontainers/testcontainers-go/) to run integration tests, which will start a local instance of Cassandra as a Docker container under the hood. To run the tests, you must have Docker (or another container runtime 100% compatible with the Docker APIs) installed on your machine. + +### Local development + +Before running this implementation, you must ensure a Cassandra cluster is available. +For local development, we recommend using the Cassandra Docker image; it contains everything +necessary for the client to operate correctly. + +To start Cassandra using Docker, issue the following: + +```bash +docker run --name cassandra --network host -d cassandra:tag +``` + +After running this command you're ready to start using the storage and connecting to the database. + +### Examples + +You can use the following options to create a cassandra storage driver: +```go +import "github.com/gofiber/storage/cassandra" + +// Initialize default config, to connect to localhost:9042 using the memory engine and with a clean table. +store := New(Config{ + Hosts: []string{"localhost:9042"}, + Keyspace: "test_keyspace_creation", + Table: "test_kv", + Expiration : 10 * time.Minute, +}) +``` + +### Config + +```go +// Config defines the configuration options for the Cassandra storage +type Config struct { + // Optional. Default is localhost + // Hosts is a list of Cassandra nodes to connect to. + Hosts []string + // Optional. Default is gofiber + // Keyspace is the name of the Cassandra keyspace to use. + Keyspace string + // Optional. Default is kv_store + /// Table is the name of the Cassandra table to use. + Table string + // Optional. Default is Quorum + // Consistency is the Cassandra consistency level. + Consistency gocql.Consistency + // Optional. Default is 10 minutes + // Expiration is the time after which an entry is considered expired. + Expiration time.Duration + // Optional. Default is false + // Reset is a flag to reset the database. + Reset bool +} +``` + +### Default Config + +```go +var ConfigDefault = Config{ + Hosts: []string{"localhost:9042"}, + Keyspace: "gofiber", + Table: "kv_store", + Consistency: gocql.Quorum, + Reset: false, + Expiration: 10 * time.Minute, +} +``` diff --git a/cassandra/cassandra.go b/cassandra/cassandra.go new file mode 100644 index 00000000..cd2c17cd --- /dev/null +++ b/cassandra/cassandra.go @@ -0,0 +1,416 @@ +package cassandra + +import ( + "errors" + "fmt" + "log" + "time" + + "github.com/gocql/gocql" +) + +// Storage represents a Cassandra storage implementation +type Storage struct { + cluster *gocql.ClusterConfig + session *gocql.Session + keyspace string + table string + ttl int +} + +// SchemaInfo represents the schema metadata +type SchemaInfo struct { + Version int + Description string + CreatedAt time.Time + UpdatedAt time.Time +} + +// New creates a new Cassandra storage instance +func New(cfg Config) *Storage { + // Create cluster config + cluster := gocql.NewCluster(cfg.Hosts...) + + // Don't set keyspace initially - we need to create it first + // We'll connect to system keyspace first + + // Convert expiration to seconds for TTL + ttl := 0 + if cfg.Expiration > 0 { + ttl = int(cfg.Expiration.Seconds()) + } + + // Create storage instance + storage := &Storage{ + cluster: cluster, + keyspace: cfg.Keyspace, + table: cfg.Table, + ttl: ttl, + } + + // Initialize keyspace + if err := storage.createOrVerifyKeySpace(cfg.Reset); err != nil { + log.Printf("Failed to initialize keyspace: %v", err) + panic(err) + } + + return storage +} + +// createOrVerifyKeySpace ensures the keyspace and table exist with proper keyspace +func (s *Storage) createOrVerifyKeySpace(reset bool) error { + // Connect to system keyspace first to create our keyspace if needed + systemCluster := gocql.NewCluster(s.cluster.Hosts...) + systemCluster.Consistency = s.cluster.Consistency + systemCluster.Timeout = s.cluster.Timeout + + // Connect to the system keyspace + systemSession, err := systemCluster.CreateSession() + if err != nil { + return fmt.Errorf("failed to connect to system keyspace: %w", err) + } + defer systemSession.Close() + + // Create keyspace if not exists + err = s.ensureKeyspace(systemSession) + if err != nil { + return fmt.Errorf("failed to ensure keyspace exists: %w", err) + } + + // Now connect to our keyspace + s.cluster.Keyspace = s.keyspace + session, err := s.cluster.CreateSession() + if err != nil { + return fmt.Errorf("failed to connect to keyspace %s: %w", s.keyspace, err) + } + s.session = session + + // Drop tables if reset is requested + if reset { + if err := s.dropTables(); err != nil { + return err + } + } + + // Create data table if necessary + if err := s.createDataTable(); err != nil { + return err + } + + return nil +} + +// ensureKeyspace creates the keyspace if it doesn't exist +func (s *Storage) ensureKeyspace(systemSession *gocql.Session) error { + // Check if keyspace exists + var count int + if err := systemSession.Query( + "SELECT COUNT(*) FROM system_schema.keyspaces WHERE keyspace_name = ?", + s.keyspace, + ).Scan(&count); err != nil { + return err + } + + // Create keyspace if it doesn't exist + if count == 0 { + query := fmt.Sprintf( + "CREATE KEYSPACE %s WITH REPLICATION = {'class': 'SimpleStrategy', 'replication_factor': 1}", + s.keyspace, + ) + if err := systemSession.Query(query).Exec(); err != nil { + return err + } + log.Printf("Created keyspace: %s", s.keyspace) + } + + return nil +} + +// createDataTable creates the data table for key-value storage +func (s *Storage) createDataTable() error { + query := fmt.Sprintf(` + CREATE TABLE IF NOT EXISTS %s.%s ( + key text PRIMARY KEY, + value blob, + created_at timestamp, + expires_at timestamp + ) + `, s.keyspace, s.table) + + return s.session.Query(query).Exec() +} + +// dropTables drops existing tables for reset +func (s *Storage) dropTables() error { + // Drop data table + query := fmt.Sprintf("DROP TABLE IF EXISTS %s.%s", s.keyspace, s.table) + if err := s.session.Query(query).Exec(); err != nil { + return err + } + + // Drop schema_info table + query = fmt.Sprintf("DROP TABLE IF EXISTS %s.schema_info", s.keyspace) + return s.session.Query(query).Exec() +} + +// Set stores a key-value pair with optional expiration +func (s *Storage) Set(key string, value []byte, exp time.Duration) error { + // Calculate expiration time + var expiresAt *time.Time + var ttl int = -1 // Default to no TTL + + if exp > 0 { + // Specific expiration provided + ttl = int(exp.Seconds()) + t := time.Now().Add(exp) + expiresAt = &t + } else if exp == 0 && s.ttl > 0 { + // Use default TTL from config + ttl = s.ttl + t := time.Now().Add(time.Duration(s.ttl) * time.Second) + expiresAt = &t + } + // If exp < 0, we'll use no TTL (indefinite storage) + + // Insert with TTL if specified + var query string + if ttl > 0 { + query = fmt.Sprintf("INSERT INTO %s.%s (key, value, created_at, expires_at) VALUES (?, ?, ?, ?) USING TTL %d", + s.keyspace, s.table, ttl) + } else { + query = fmt.Sprintf("INSERT INTO %s.%s (key, value, created_at, expires_at) VALUES (?, ?, ?, ?)", + s.keyspace, s.table) + } + + return s.session.Query(query, key, value, time.Now(), expiresAt).Exec() +} + +// Get retrieves a value by key +func (s *Storage) Get(key string) ([]byte, error) { + var value []byte + var expiresAt time.Time + + query := fmt.Sprintf("SELECT value, expires_at FROM %s.%s WHERE key = ?", s.keyspace, s.table) + if err := s.session.Query(query, key).Scan(&value, &expiresAt); err != nil { + if errors.Is(err, gocql.ErrNotFound) { + return nil, nil + } + return nil, err + } + + // Check if expired (as a backup in case TTL didn't work) + if !expiresAt.IsZero() && expiresAt.Before(time.Now()) { + // Expired but not yet removed by TTL + err := s.Delete(key) + if err != nil { + log.Printf("Failed to delete expired key %s: %v", key, err) + } + return nil, nil + } + + return value, nil +} + +// Delete removes a key from storage +func (s *Storage) Delete(key string) error { + query := fmt.Sprintf("DELETE FROM %s.%s WHERE key = ?", s.keyspace, s.table) + return s.session.Query(query, key).Exec() +} + +// Reset clears all keys from storage +func (s *Storage) Reset() error { + query := fmt.Sprintf("TRUNCATE TABLE %s.%s", s.keyspace, s.table) + return s.session.Query(query).Exec() +} + +// Close closes the storage connection +func (s *Storage) Close() { + if s.session != nil { + s.session.Close() + } +} + +// Test functions + +// // setupCassandraContainer creates a Cassandra container using the official module +// func setupCassandraContainer(ctx context.Context) (*cassandracontainer.CassandraContainer, string, error) { +// cassandraContainer, err := cassandracontainer.RunContainer(ctx, +// testcontainers.WithImage("cassandra:4.1"), +// cassandracontainer.WithInitialWaitTimeout(2*time.Minute), +// ) +// if err != nil { +// return nil, "", err +// } + +// // Get connection parameters +// host, err := cassandraContainer.Host(ctx) +// if err != nil { +// return nil, "", err +// } + +// mappedPort, err := cassandraContainer.MappedPort(ctx, "9042/tcp") +// if err != nil { +// return nil, "", err +// } + +// connectionURL := host + ":" + mappedPort.Port() +// return cassandraContainer, connectionURL, nil +// } + +// func TestSchemaManagement(t *testing.T) { +// ctx := context.Background() + +// // Start Cassandra container +// cassandraContainer, connectionURL, err := setupCassandraContainer(ctx) +// if err != nil { +// t.Fatalf("Failed to start Cassandra container: %v", err) +// } +// defer func() { +// if err := cassandraContainer.Terminate(ctx); err != nil { +// t.Logf("Failed to terminate container: %v", err) +// } +// }() + +// // 1. Test keyspace creation +// store := New(Config{ +// Hosts: []string{connectionURL}, +// Keyspace: "test_keyspace_creation", +// Table: "test_table", +// SchemaVersion: 1, +// SchemaDescription: "Initial Schema", +// }) + +// // Verify keyspace was created +// systemCluster := gocql.NewCluster(connectionURL) +// systemSession, err := systemCluster.CreateSession() +// if err != nil { +// t.Fatalf("Failed to connect to system keyspace: %v", err) +// } + +// var count int +// err = systemSession.Query( +// "SELECT COUNT(*) FROM system_schema.keyspaces WHERE keyspace_name = ?", +// "test_keyspace_creation", +// ).Scan(&count) +// assert.NoError(t, err) +// assert.Equal(t, 1, count, "Keyspace should have been created") +// systemSession.Close() + +// // 2. Test table creation +// // Connect to the keyspace and check if tables exist +// cluster := gocql.NewCluster(connectionURL) +// cluster.Keyspace = "test_keyspace_creation" +// session, err := cluster.CreateSession() +// if err != nil { +// t.Fatalf("Failed to connect to keyspace: %v", err) +// } + +// // Check for data table +// err = session.Query( +// "SELECT COUNT(*) FROM system_schema.tables WHERE keyspace_name = ? AND table_name = ?", +// "test_keyspace_creation", "test_table", +// ).Scan(&count) +// assert.NoError(t, err) +// assert.Equal(t, 1, count, "Data table should have been created") + +// // Check for schema_info table +// err = session.Query( +// "SELECT COUNT(*) FROM system_schema.tables WHERE keyspace_name = ? AND table_name = ?", +// "test_keyspace_creation", "schema_info", +// ).Scan(&count) +// assert.NoError(t, err) +// assert.Equal(t, 1, count, "Schema info table should have been created") + +// session.Close() +// store.Close() + +// // 3. Test schema update +// // Create initial schema +// storeV1 := New(Config{ +// Hosts: []string{connectionURL}, +// Keyspace: "test_schema_update", +// Table: "test_table", +// SchemaVersion: 1, +// SchemaDescription: "Schema v1", +// }) + +// // Verify initial schema +// schemaInfo, err := storeV1.GetSchemaInfo() +// assert.NoError(t, err) +// assert.Equal(t, 1, schemaInfo.Version) +// assert.Equal(t, "Schema v1", schemaInfo.Description) +// createdAt := schemaInfo.CreatedAt + +// // Close and create with higher version +// storeV1.Close() + +// // Create updated schema +// storeV2 := New(Config{ +// Hosts: []string{connectionURL}, +// Keyspace: "test_schema_update", +// Table: "test_table", +// SchemaVersion: 2, +// SchemaDescription: "Schema v2", +// }) + +// // Verify schema was updated +// updatedSchema, err := storeV2.GetSchemaInfo() +// assert.NoError(t, err) +// assert.Equal(t, 2, updatedSchema.Version) +// assert.Equal(t, "Schema v2", updatedSchema.Description) +// assert.Equal(t, createdAt.Format(time.RFC3339), updatedSchema.CreatedAt.Format(time.RFC3339)) +// assert.True(t, updatedSchema.UpdatedAt.After(createdAt)) + +// storeV2.Close() + +// // 4. Test forced schema update with same version +// storeForce := New(Config{ +// Hosts: []string{connectionURL}, +// Keyspace: "test_schema_update", +// Table: "test_table", +// SchemaVersion: 2, // Same version +// SchemaDescription: "Schema v2 forced", +// ForceSchemaUpdate: true, +// }) + +// // Verify schema was updated despite same version +// forcedSchema, err := storeForce.GetSchemaInfo() +// assert.NoError(t, err) +// assert.Equal(t, 2, forcedSchema.Version) +// assert.Equal(t, "Schema v2 forced", forcedSchema.Description) +// assert.True(t, forcedSchema.UpdatedAt.After(updatedSchema.UpdatedAt)) + +// storeForce.Close() + +// // 5. Test reset functionality +// resetStore := New(Config{ +// Hosts: []string{connectionURL}, +// Keyspace: "test_schema_reset", +// Table: "test_table", +// SchemaVersion: 1, +// SchemaDescription: "Initial Schema", +// }) + +// // Add some data +// err = resetStore.Set("key1", []byte("value1"), 0) +// assert.NoError(t, err) + +// // Close and reopen with reset +// resetStore.Close() + +// resetStore = New(Config{ +// Hosts: []string{connectionURL}, +// Keyspace: "test_schema_reset", +// Table: "test_table", +// SchemaVersion: 1, +// SchemaDescription: "Reset Schema", +// Reset: true, +// }) + +// // Check that data is gone +// val, err := resetStore.Get("key1") +// assert.NoError(t, err) +// assert.Nil(t, val, "Key should be gone after reset") + +// resetStore.Close() +// } diff --git a/cassandra/cassandra_test.go b/cassandra/cassandra_test.go new file mode 100644 index 00000000..0ec98712 --- /dev/null +++ b/cassandra/cassandra_test.go @@ -0,0 +1,310 @@ +package cassandra + +import ( + "context" + "fmt" + "testing" + "time" + + "github.com/gocql/gocql" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + cassandracontainer "github.com/testcontainers/testcontainers-go/modules/cassandra" +) + +// setupCassandraContainer creates a Cassandra container using the official module +func setupCassandraContainer(ctx context.Context) (*cassandracontainer.CassandraContainer, string, error) { + cassandraContainer, err := cassandracontainer.Run(ctx, "cassandra:4.1.3") + if err != nil { + return nil, "", err + } + + // Get connection parameters + host, err := cassandraContainer.Host(ctx) + if err != nil { + return nil, "", err + } + + mappedPort, err := cassandraContainer.MappedPort(ctx, "9042/tcp") + if err != nil { + return nil, "", err + } + + connectionURL := host + ":" + mappedPort.Port() + return cassandraContainer, connectionURL, nil +} + +func TestCassandraStorage(t *testing.T) { + ctx := context.Background() + + // Start Cassandra container + cassandraContainer, connectionURL, err := setupCassandraContainer(ctx) + if err != nil { + t.Fatalf("Failed to start Cassandra container: %v", err) + } + defer func() { + if err := cassandraContainer.Terminate(ctx); err != nil { + t.Logf("Failed to terminate container: %v", err) + } + }() + + // Test cases + t.Run("KeyspaceCreation", func(t *testing.T) { + t.Skip("Skipping keyspace creation test") + testKeyspaceCreation(t, connectionURL) + }) + + t.Run("BasicOperations", func(t *testing.T) { + testBasicOperations(t, connectionURL) + }) + + t.Run("ExpirableKeys", func(t *testing.T) { + testExpirableKeys(t, connectionURL) + }) + + t.Run("Reset", func(t *testing.T) { + testReset(t, connectionURL) + }) + + t.Run("ConcurrentAccess", func(t *testing.T) { + testConcurrentAccess(t, connectionURL) + }) +} + +func testKeyspaceCreation(t *testing.T, connectionURL string) { + // Create new storage + store := New(Config{ + Hosts: []string{connectionURL}, + Keyspace: "test_keyspace_creation", + Table: "test_kv", + }) + defer store.Close() + + // Verify keyspace was created + systemCluster := gocql.NewCluster(connectionURL) + systemSession, err := systemCluster.CreateSession() + require.NoError(t, err) + defer systemSession.Close() + + var count int + err = systemSession.Query( + "SELECT COUNT(*) FROM system_schema.keyspaces WHERE keyspace_name = ?", + "test_keyspace_creation", + ).Scan(&count) + require.NoError(t, err) + require.Equal(t, 1, count, "Keyspace should have been created") + + // Verify table was created + cluster := gocql.NewCluster(connectionURL) + cluster.Keyspace = "test_keyspace_creation" + session, err := cluster.CreateSession() + require.NoError(t, err) + defer session.Close() + + err = session.Query( + "SELECT COUNT(*) FROM system_schema.tables WHERE keyspace_name = ? AND table_name = ?", + "test_keyspace_creation", "test_kv", + ).Scan(&count) + require.NoError(t, err) + require.Equal(t, 1, count, "Table should have been created") +} + +func testBasicOperations(t *testing.T, connectionURL string) { + // Create new storage + store := New(Config{ + Hosts: []string{connectionURL}, + Keyspace: "test_basic_ops", + Table: "test_kv", + }) + defer store.Close() + + // Set a key + err := store.Set("test_key", []byte("test_value"), 0) + require.NoError(t, err) + + // Get the key + value, err := store.Get("test_key") + require.NoError(t, err) + require.Equal(t, []byte("test_value"), value) + + // Get a non-existent key + value, err = store.Get("nonexistent_key") + require.NoError(t, err) + require.Nil(t, value) + + // Delete the key + err = store.Delete("test_key") + require.NoError(t, err) + + // Get the deleted key + value, err = store.Get("test_key") + require.NoError(t, err) + require.Nil(t, value) +} + +// testExpirableKeys tests the expirable keys functionality. +func testExpirableKeys(t *testing.T, connectionURL string) { + // Create new storage with default expiration + store := New(Config{ + Hosts: []string{connectionURL}, + Keyspace: "test_expirable", + Table: "test_kv", + Expiration: 5 * time.Second, // Short default TTL for testing + }) + defer store.Close() + + // Set keys with different expiration settings + // Key with default TTL (exp = 0 means use default) + err := store.Set("key_default_ttl", []byte("value1"), 0) + require.NoError(t, err) + + // Key with specific TTL + err = store.Set("key_specific_ttl", []byte("value2"), 1*time.Second) + require.NoError(t, err) + + // Key with no TTL (overrides default) + err = store.Set("key_no_ttl", []byte("value3"), -1) + require.NoError(t, err) + + // Verify all keys exist initially + value, err := store.Get("key_default_ttl") + require.NoError(t, err) + assert.Equal(t, []byte("value1"), value) + + value, err = store.Get("key_specific_ttl") + require.NoError(t, err) + assert.Equal(t, []byte("value2"), value) + + value, err = store.Get("key_no_ttl") + require.NoError(t, err) + assert.Equal(t, []byte("value3"), value) + + // Wait for specific TTL to expire + time.Sleep(1500 * time.Millisecond) + + // Specific TTL key should be gone, others should remain + value, err = store.Get("key_specific_ttl") + require.NoError(t, err) + assert.Nil(t, value, "Key with 1s TTL should have expired") + + value, err = store.Get("key_default_ttl") + require.NoError(t, err) + assert.Equal(t, []byte("value1"), value, "Key with default TTL should still exist") + + value, err = store.Get("key_no_ttl") + require.NoError(t, err) + assert.Equal(t, []byte("value3"), value, "Key with no TTL should still exist") + + // Wait for default TTL to expire + time.Sleep(4 * time.Second) + + // Default TTL key should be gone, no TTL key should remain + value, err = store.Get("key_default_ttl") + require.NoError(t, err) + assert.Nil(t, value, "Key with default TTL should have expired") + + value, err = store.Get("key_no_ttl") + require.NoError(t, err) + assert.Equal(t, []byte("value3"), value, "Key with no TTL should still exist") +} + +func testReset(t *testing.T, connectionURL string) { + // Create new storage + store := New(Config{ + Hosts: []string{connectionURL}, + Keyspace: "test_reset", + Table: "test_kv", + }) + + // Set some keys + err := store.Set("key1", []byte("value1"), 0) + require.NoError(t, err) + + err = store.Set("key2", []byte("value2"), 0) + require.NoError(t, err) + + // Verify keys exist + value, err := store.Get("key1") + require.NoError(t, err) + require.Equal(t, []byte("value1"), value) + + // Reset storage + err = store.Reset() + require.NoError(t, err) + + // Verify keys are gone + value, err = store.Get("key1") + require.NoError(t, err) + require.Nil(t, value, "Key should be deleted after reset") + + value, err = store.Get("key2") + require.NoError(t, err) + require.Nil(t, value, "Key should be deleted after reset") + + // Close the first storage + store.Close() + + // Create new storage with Reset flag + store = New(Config{ + Hosts: []string{connectionURL}, + Keyspace: "test_reset", + Table: "test_kv", + Reset: true, + }) + defer store.Close() + + // Set a key + err = store.Set("key3", []byte("value3"), 0) + require.NoError(t, err) + + // Verify key exists + value, err = store.Get("key3") + require.NoError(t, err) + require.Equal(t, []byte("value3"), value) +} + +func testConcurrentAccess(t *testing.T, connectionURL string) { + // Create new storage + store := New(Config{ + Hosts: []string{connectionURL}, + Keyspace: "test_concurrent", + Table: "test_kv", + }) + defer store.Close() + + // Number of goroutines + const concurrentOps = 10 + done := make(chan bool, concurrentOps) + + // Run concurrent operations + for i := 0; i < concurrentOps; i++ { + go func(id int) { + // Set key + key := fmt.Sprintf("key%d", id) + value := []byte(fmt.Sprintf("value%d", id)) + err := store.Set(key, value, 0) + require.NoError(t, err) + + // Get key + retrievedValue, err := store.Get(key) + require.NoError(t, err) + require.Equal(t, value, retrievedValue) + + // Delete key + err = store.Delete(key) + require.NoError(t, err) + + // Verify deletion + retrievedValue, err = store.Get(key) + require.NoError(t, err) + require.Nil(t, retrievedValue) + + done <- true + }(i) + } + + // Wait for all goroutines to complete + for i := 0; i < concurrentOps; i++ { + <-done + } +} diff --git a/cassandra/config.go b/cassandra/config.go new file mode 100644 index 00000000..3c49b008 --- /dev/null +++ b/cassandra/config.go @@ -0,0 +1,73 @@ +package cassandra + +import ( + "time" + + "github.com/gocql/gocql" +) + +// Config defines the configuration options for the Cassandra storage +type Config struct { + // Optional. Default is localhost + // Hosts is a list of Cassandra nodes to connect to. + Hosts []string + // Optional. Default is gofiber + // Keyspace is the name of the Cassandra keyspace to use. + Keyspace string + // Optional. Default is kv_store + /// Table is the name of the Cassandra table to use. + Table string + // Optional. Default is Quorum + // Consistency is the Cassandra consistency level. + Consistency gocql.Consistency + // Optional. Default is 10 minutes + // Expiration is the time after which an entry is considered expired. + Expiration time.Duration + // Optional. Default is false + // Reset is a flag to reset the database. + Reset bool +} + +// ConfigDefault is the default config +var ConfigDefault = Config{ + Hosts: []string{"localhost:9042"}, + Keyspace: "gofiber", + Table: "kv_store", + Consistency: gocql.Quorum, + Reset: false, + Expiration: 10 * time.Minute, +} + +// ConfigDefault is the default config +func configDefault(config ...Config) Config { + // Return default config if nothing provided + if len(config) < 1 { + return ConfigDefault + } + + // Override default config + cfg := config[0] + + // Set default values + if len(cfg.Hosts) == 0 { + cfg.Hosts = ConfigDefault.Hosts + } + + if cfg.Keyspace == "" { + cfg.Keyspace = ConfigDefault.Keyspace + } + + if cfg.Table == "" { + cfg.Table = ConfigDefault.Table + } + + if cfg.Consistency == 0 { + cfg.Consistency = ConfigDefault.Consistency + } + + if cfg.Expiration == 0 { + cfg.Expiration = ConfigDefault.Expiration + } + + return cfg +} diff --git a/cassandra/go.mod b/cassandra/go.mod new file mode 100644 index 00000000..557997c5 --- /dev/null +++ b/cassandra/go.mod @@ -0,0 +1,67 @@ +module github.com/gofiber/storage/cassandra/v2 + +go 1.23.0 + +require ( + github.com/gocql/gocql v1.7.0 + github.com/stretchr/testify v1.10.0 + github.com/testcontainers/testcontainers-go/modules/cassandra v0.36.0 +) + +require ( + dario.cat/mergo v1.0.1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/containerd/platforms v0.2.1 // indirect + github.com/cpuguy83/dockercfg v0.3.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/distribution/reference v0.6.0 // indirect + github.com/docker/docker v28.0.1+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/ebitengine/purego v0.8.2 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/snappy v0.0.3 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect + github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect + github.com/klauspost/compress v1.17.4 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/magiconair/properties v1.8.9 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/patternmatcher v0.6.0 // indirect + github.com/moby/sys/sequential v0.5.0 // indirect + github.com/moby/sys/user v0.1.0 // indirect + github.com/moby/sys/userns v0.1.0 // indirect + github.com/moby/term v0.5.0 // indirect + github.com/morikuni/aec v1.0.0 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.1 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/shirou/gopsutil/v4 v4.25.1 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/testcontainers/testcontainers-go v0.36.0 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/sdk v1.32.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect + golang.org/x/crypto v0.35.0 // indirect + golang.org/x/sys v0.31.0 // indirect + google.golang.org/grpc v1.70.0 // indirect + google.golang.org/protobuf v1.36.5 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/cassandra/go.sum b/cassandra/go.sum new file mode 100644 index 00000000..287fe403 --- /dev/null +++ b/cassandra/go.sum @@ -0,0 +1,202 @@ +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932 h1:mXoPYz/Ul5HYEDvkta6I8/rnYM5gSdSV2tJ6XbZuEtY= +github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= +github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= +github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v28.0.1+incompatible h1:FCHjSRdXhNRFjlHMTv4jUNlIBbTeRjrWfeFuJp7jpo0= +github.com/docker/docker v28.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I= +github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/gocql/gocql v1.7.0 h1:O+7U7/1gSN7QTEAaMEsJc1Oq2QHXvCWoF3DFK9HDHus= +github.com/gocql/gocql v1.7.0/go.mod h1:vnlvXyFZeLBF0Wy+RS8hrOdbn0UWsWtdg07XJnFxZ+4= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= +github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= +github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= +github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= +github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= +github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= +github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= +github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= +github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= +github.com/testcontainers/testcontainers-go/modules/cassandra v0.36.0 h1:vIOOfizBKSHfVcs+5u/VS6Zn4Bbo1lYM28DhHYJm4i8= +github.com/testcontainers/testcontainers-go/modules/cassandra v0.36.0/go.mod h1:ZsSC3MYjRLXLccXMnBth8Qh4AkS2HWzGobVhMMY3Z/k= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= +go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= +golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= +golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= +golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= +google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= +google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= +google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= +google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= From db6449b4542f68ba879ef9f2e9fef7fc222421d8 Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Mon, 14 Apr 2025 13:00:25 +0530 Subject: [PATCH 018/168] Updated config --- cassandra/cassandra.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cassandra/cassandra.go b/cassandra/cassandra.go index cd2c17cd..060dfac0 100644 --- a/cassandra/cassandra.go +++ b/cassandra/cassandra.go @@ -27,9 +27,14 @@ type SchemaInfo struct { } // New creates a new Cassandra storage instance -func New(cfg Config) *Storage { +func New(cnfg Config) *Storage { + + // Default config + cfg := configDefault(cnfg) + // Create cluster config cluster := gocql.NewCluster(cfg.Hosts...) + cluster.Consistency = cfg.Consistency // Don't set keyspace initially - we need to create it first // We'll connect to system keyspace first From 7a5629937238a91ae1a0660caea87d91d7194420 Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Mon, 14 Apr 2025 13:27:11 +0530 Subject: [PATCH 019/168] fixed nitpicks --- cassandra/README.md | 6 +- cassandra/cassandra.go | 200 +----------------------------------- cassandra/cassandra_test.go | 24 ++++- cassandra/config.go | 2 +- 4 files changed, 29 insertions(+), 203 deletions(-) diff --git a/cassandra/README.md b/cassandra/README.md index d7124476..1380aa52 100644 --- a/cassandra/README.md +++ b/cassandra/README.md @@ -1,12 +1,12 @@ # Cassandra -A Cassandra storage driver using [https://github.com/gocql/gocql](https://github.com/apache/cassandra-gocql-driver). +A Cassandra storage driver using [gocql/gocql](https://github.com/gocql/gocql) ![Release](https://img.shields.io/github/v/tag/gofiber/storage?filter=cassandra*) [![Discord](https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7)](https://gofiber.io/discord) ![Test](https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-cassandra.yml?label=Tests) -### Table of Contents +## Table of Contents - [Signatures](#signatures) - [Installation](#installation) @@ -31,6 +31,7 @@ func (s *Storage) Conn() *Session Cassandra is supported on the latest two versions of Go: Install the cassandra implementation: + ```bash go get github.com/gofiber/storage/cassandra ``` @@ -56,6 +57,7 @@ After running this command you're ready to start using the storage and connectin ### Examples You can use the following options to create a cassandra storage driver: + ```go import "github.com/gofiber/storage/cassandra" diff --git a/cassandra/cassandra.go b/cassandra/cassandra.go index 060dfac0..169bfdab 100644 --- a/cassandra/cassandra.go +++ b/cassandra/cassandra.go @@ -18,14 +18,6 @@ type Storage struct { ttl int } -// SchemaInfo represents the schema metadata -type SchemaInfo struct { - Version int - Description string - CreatedAt time.Time - UpdatedAt time.Time -} - // New creates a new Cassandra storage instance func New(cnfg Config) *Storage { @@ -137,7 +129,6 @@ func (s *Storage) createDataTable() error { CREATE TABLE IF NOT EXISTS %s.%s ( key text PRIMARY KEY, value blob, - created_at timestamp, expires_at timestamp ) `, s.keyspace, s.table) @@ -180,14 +171,14 @@ func (s *Storage) Set(key string, value []byte, exp time.Duration) error { // Insert with TTL if specified var query string if ttl > 0 { - query = fmt.Sprintf("INSERT INTO %s.%s (key, value, created_at, expires_at) VALUES (?, ?, ?, ?) USING TTL %d", + query = fmt.Sprintf("INSERT INTO %s.%s (key, value, expires_at) VALUES (?, ?, ?) USING TTL %d", s.keyspace, s.table, ttl) } else { - query = fmt.Sprintf("INSERT INTO %s.%s (key, value, created_at, expires_at) VALUES (?, ?, ?, ?)", + query = fmt.Sprintf("INSERT INTO %s.%s (key, value, expires_at) VALUES (?, ?, ?)", s.keyspace, s.table) } - return s.session.Query(query, key, value, time.Now(), expiresAt).Exec() + return s.session.Query(query, key, value, expiresAt).Exec() } // Get retrieves a value by key @@ -234,188 +225,3 @@ func (s *Storage) Close() { s.session.Close() } } - -// Test functions - -// // setupCassandraContainer creates a Cassandra container using the official module -// func setupCassandraContainer(ctx context.Context) (*cassandracontainer.CassandraContainer, string, error) { -// cassandraContainer, err := cassandracontainer.RunContainer(ctx, -// testcontainers.WithImage("cassandra:4.1"), -// cassandracontainer.WithInitialWaitTimeout(2*time.Minute), -// ) -// if err != nil { -// return nil, "", err -// } - -// // Get connection parameters -// host, err := cassandraContainer.Host(ctx) -// if err != nil { -// return nil, "", err -// } - -// mappedPort, err := cassandraContainer.MappedPort(ctx, "9042/tcp") -// if err != nil { -// return nil, "", err -// } - -// connectionURL := host + ":" + mappedPort.Port() -// return cassandraContainer, connectionURL, nil -// } - -// func TestSchemaManagement(t *testing.T) { -// ctx := context.Background() - -// // Start Cassandra container -// cassandraContainer, connectionURL, err := setupCassandraContainer(ctx) -// if err != nil { -// t.Fatalf("Failed to start Cassandra container: %v", err) -// } -// defer func() { -// if err := cassandraContainer.Terminate(ctx); err != nil { -// t.Logf("Failed to terminate container: %v", err) -// } -// }() - -// // 1. Test keyspace creation -// store := New(Config{ -// Hosts: []string{connectionURL}, -// Keyspace: "test_keyspace_creation", -// Table: "test_table", -// SchemaVersion: 1, -// SchemaDescription: "Initial Schema", -// }) - -// // Verify keyspace was created -// systemCluster := gocql.NewCluster(connectionURL) -// systemSession, err := systemCluster.CreateSession() -// if err != nil { -// t.Fatalf("Failed to connect to system keyspace: %v", err) -// } - -// var count int -// err = systemSession.Query( -// "SELECT COUNT(*) FROM system_schema.keyspaces WHERE keyspace_name = ?", -// "test_keyspace_creation", -// ).Scan(&count) -// assert.NoError(t, err) -// assert.Equal(t, 1, count, "Keyspace should have been created") -// systemSession.Close() - -// // 2. Test table creation -// // Connect to the keyspace and check if tables exist -// cluster := gocql.NewCluster(connectionURL) -// cluster.Keyspace = "test_keyspace_creation" -// session, err := cluster.CreateSession() -// if err != nil { -// t.Fatalf("Failed to connect to keyspace: %v", err) -// } - -// // Check for data table -// err = session.Query( -// "SELECT COUNT(*) FROM system_schema.tables WHERE keyspace_name = ? AND table_name = ?", -// "test_keyspace_creation", "test_table", -// ).Scan(&count) -// assert.NoError(t, err) -// assert.Equal(t, 1, count, "Data table should have been created") - -// // Check for schema_info table -// err = session.Query( -// "SELECT COUNT(*) FROM system_schema.tables WHERE keyspace_name = ? AND table_name = ?", -// "test_keyspace_creation", "schema_info", -// ).Scan(&count) -// assert.NoError(t, err) -// assert.Equal(t, 1, count, "Schema info table should have been created") - -// session.Close() -// store.Close() - -// // 3. Test schema update -// // Create initial schema -// storeV1 := New(Config{ -// Hosts: []string{connectionURL}, -// Keyspace: "test_schema_update", -// Table: "test_table", -// SchemaVersion: 1, -// SchemaDescription: "Schema v1", -// }) - -// // Verify initial schema -// schemaInfo, err := storeV1.GetSchemaInfo() -// assert.NoError(t, err) -// assert.Equal(t, 1, schemaInfo.Version) -// assert.Equal(t, "Schema v1", schemaInfo.Description) -// createdAt := schemaInfo.CreatedAt - -// // Close and create with higher version -// storeV1.Close() - -// // Create updated schema -// storeV2 := New(Config{ -// Hosts: []string{connectionURL}, -// Keyspace: "test_schema_update", -// Table: "test_table", -// SchemaVersion: 2, -// SchemaDescription: "Schema v2", -// }) - -// // Verify schema was updated -// updatedSchema, err := storeV2.GetSchemaInfo() -// assert.NoError(t, err) -// assert.Equal(t, 2, updatedSchema.Version) -// assert.Equal(t, "Schema v2", updatedSchema.Description) -// assert.Equal(t, createdAt.Format(time.RFC3339), updatedSchema.CreatedAt.Format(time.RFC3339)) -// assert.True(t, updatedSchema.UpdatedAt.After(createdAt)) - -// storeV2.Close() - -// // 4. Test forced schema update with same version -// storeForce := New(Config{ -// Hosts: []string{connectionURL}, -// Keyspace: "test_schema_update", -// Table: "test_table", -// SchemaVersion: 2, // Same version -// SchemaDescription: "Schema v2 forced", -// ForceSchemaUpdate: true, -// }) - -// // Verify schema was updated despite same version -// forcedSchema, err := storeForce.GetSchemaInfo() -// assert.NoError(t, err) -// assert.Equal(t, 2, forcedSchema.Version) -// assert.Equal(t, "Schema v2 forced", forcedSchema.Description) -// assert.True(t, forcedSchema.UpdatedAt.After(updatedSchema.UpdatedAt)) - -// storeForce.Close() - -// // 5. Test reset functionality -// resetStore := New(Config{ -// Hosts: []string{connectionURL}, -// Keyspace: "test_schema_reset", -// Table: "test_table", -// SchemaVersion: 1, -// SchemaDescription: "Initial Schema", -// }) - -// // Add some data -// err = resetStore.Set("key1", []byte("value1"), 0) -// assert.NoError(t, err) - -// // Close and reopen with reset -// resetStore.Close() - -// resetStore = New(Config{ -// Hosts: []string{connectionURL}, -// Keyspace: "test_schema_reset", -// Table: "test_table", -// SchemaVersion: 1, -// SchemaDescription: "Reset Schema", -// Reset: true, -// }) - -// // Check that data is gone -// val, err := resetStore.Get("key1") -// assert.NoError(t, err) -// assert.Nil(t, val, "Key should be gone after reset") - -// resetStore.Close() -// } diff --git a/cassandra/cassandra_test.go b/cassandra/cassandra_test.go index 0ec98712..09109c59 100644 --- a/cassandra/cassandra_test.go +++ b/cassandra/cassandra_test.go @@ -3,6 +3,7 @@ package cassandra import ( "context" "fmt" + "os" "testing" "time" @@ -12,9 +13,22 @@ import ( cassandracontainer "github.com/testcontainers/testcontainers-go/modules/cassandra" ) +const ( + // cassandraImage is the default image used for running cassandra in tests. + cassandraImage = "cassandra:4.1.3" + cassandraImageEnvVar string = "TEST_CASSANDRA_IMAGE" + cassandraPort = "9042/tcp" +) + // setupCassandraContainer creates a Cassandra container using the official module func setupCassandraContainer(ctx context.Context) (*cassandracontainer.CassandraContainer, string, error) { - cassandraContainer, err := cassandracontainer.Run(ctx, "cassandra:4.1.3") + + img := cassandraImage + if imgFromEnv := os.Getenv(cassandraImageEnvVar); imgFromEnv != "" { + img = imgFromEnv + } + + cassandraContainer, err := cassandracontainer.Run(ctx, img) if err != nil { return nil, "", err } @@ -25,7 +39,7 @@ func setupCassandraContainer(ctx context.Context) (*cassandracontainer.Cassandra return nil, "", err } - mappedPort, err := cassandraContainer.MappedPort(ctx, "9042/tcp") + mappedPort, err := cassandraContainer.MappedPort(ctx, cassandraPort) if err != nil { return nil, "", err } @@ -34,6 +48,7 @@ func setupCassandraContainer(ctx context.Context) (*cassandracontainer.Cassandra return cassandraContainer, connectionURL, nil } +// TestCassandraStorage tests the Cassandra storage implementation func TestCassandraStorage(t *testing.T) { ctx := context.Background() @@ -50,7 +65,6 @@ func TestCassandraStorage(t *testing.T) { // Test cases t.Run("KeyspaceCreation", func(t *testing.T) { - t.Skip("Skipping keyspace creation test") testKeyspaceCreation(t, connectionURL) }) @@ -71,6 +85,7 @@ func TestCassandraStorage(t *testing.T) { }) } +// testKeyspaceCreation tests the keyspace creation functionality. func testKeyspaceCreation(t *testing.T, connectionURL string) { // Create new storage store := New(Config{ @@ -109,6 +124,7 @@ func testKeyspaceCreation(t *testing.T, connectionURL string) { require.Equal(t, 1, count, "Table should have been created") } +// testBasicOperations tests basic operations like setting, getting, and deleting keys. func testBasicOperations(t *testing.T, connectionURL string) { // Create new storage store := New(Config{ @@ -208,6 +224,7 @@ func testExpirableKeys(t *testing.T, connectionURL string) { assert.Equal(t, []byte("value3"), value, "Key with no TTL should still exist") } +// / testReset tests the Reset method. func testReset(t *testing.T, connectionURL string) { // Create new storage store := New(Config{ @@ -263,6 +280,7 @@ func testReset(t *testing.T, connectionURL string) { require.Equal(t, []byte("value3"), value) } +// testConcurrentAccess tests concurrent access to the storage. func testConcurrentAccess(t *testing.T, connectionURL string) { // Create new storage store := New(Config{ diff --git a/cassandra/config.go b/cassandra/config.go index 3c49b008..0705e303 100644 --- a/cassandra/config.go +++ b/cassandra/config.go @@ -38,7 +38,7 @@ var ConfigDefault = Config{ Expiration: 10 * time.Minute, } -// ConfigDefault is the default config +// ConfigDefault is the Helper function to apply default config func configDefault(config ...Config) Config { // Return default config if nothing provided if len(config) < 1 { From 4805f9f14b1a98aee3d4a30aaf64785ba24626cc Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Tue, 15 Apr 2025 11:56:43 +0530 Subject: [PATCH 020/168] Added Testcases and updated code --- .github/workflows/benchmark.yml | 2 +- .github/workflows/test-cassandra.yml | 2 +- cassandra/README.md | 4 +- cassandra/cassandra_test.go | 131 +++++++++++++++++++++++---- cassandra/config.go | 2 +- cassandra/go.mod | 2 +- 6 files changed, 120 insertions(+), 23 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index c1c09fdf..757d73d1 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -131,7 +131,7 @@ jobs: TEST_AZURITE_IMAGE: mcr.microsoft.com/azure-storage/azurite:latest TEST_AEROSPIKE_IMAGE: aerospike/aerospike-server:latest TEST_CLICKHOUSE_IMAGE: "clickhouse/clickhouse-server:23-alpine" - TEST_CASSANDRA_IMAGE: "cassandra:4.1.3" + TEST_CASSANDRA_IMAGE: "cassandra:latest" TEST_COUCHBASE_IMAGE: "couchbase:enterprise-7.6.5" TEST_DYNAMODB_IMAGE: amazon/dynamodb-local:latest TEST_MINIO_IMAGE: "docker.io/minio/minio:RELEASE.2024-08-17T01-24-54Z" diff --git a/.github/workflows/test-cassandra.yml b/.github/workflows/test-cassandra.yml index 06687007..e9d6dfdc 100644 --- a/.github/workflows/test-cassandra.yml +++ b/.github/workflows/test-cassandra.yml @@ -26,5 +26,5 @@ jobs: go-version: '${{ matrix.go-version }}' - name: Run Test env: - TEST_CASSANDRA_IMAGE: cassandra:4.1.3 + TEST_CASSANDRA_IMAGE: cassandra:latest run: cd ./cassandra && go clean -testcache && go test ./... -v -race diff --git a/cassandra/README.md b/cassandra/README.md index 1380aa52..b68699d7 100644 --- a/cassandra/README.md +++ b/cassandra/README.md @@ -49,7 +49,7 @@ necessary for the client to operate correctly. To start Cassandra using Docker, issue the following: ```bash -docker run --name cassandra --network host -d cassandra:tag +docker run --name cassandra --network host -d cassandra:latest ``` After running this command you're ready to start using the storage and connecting to the database. @@ -82,7 +82,7 @@ type Config struct { // Keyspace is the name of the Cassandra keyspace to use. Keyspace string // Optional. Default is kv_store - /// Table is the name of the Cassandra table to use. + // Table is the name of the Cassandra table to use. Table string // Optional. Default is Quorum // Consistency is the Cassandra consistency level. diff --git a/cassandra/cassandra_test.go b/cassandra/cassandra_test.go index 09109c59..a983db08 100644 --- a/cassandra/cassandra_test.go +++ b/cassandra/cassandra_test.go @@ -8,44 +8,48 @@ import ( "time" "github.com/gocql/gocql" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/testcontainers/testcontainers-go" cassandracontainer "github.com/testcontainers/testcontainers-go/modules/cassandra" ) const ( // cassandraImage is the default image used for running cassandra in tests. - cassandraImage = "cassandra:4.1.3" + cassandraImage = "cassandra:latest" cassandraImageEnvVar string = "TEST_CASSANDRA_IMAGE" cassandraPort = "9042/tcp" ) -// setupCassandraContainer creates a Cassandra container using the official module -func setupCassandraContainer(ctx context.Context) (*cassandracontainer.CassandraContainer, string, error) { +// newTestStore creates a Cassandra container using the official module +func newTestStore(t testing.TB) (*cassandracontainer.CassandraContainer, string, error) { + t.Helper() img := cassandraImage if imgFromEnv := os.Getenv(cassandraImageEnvVar); imgFromEnv != "" { img = imgFromEnv } - cassandraContainer, err := cassandracontainer.Run(ctx, img) + ctx := context.Background() + + c, err := cassandracontainer.Run(ctx, img) + testcontainers.CleanupContainer(t, c) if err != nil { return nil, "", err } // Get connection parameters - host, err := cassandraContainer.Host(ctx) + host, err := c.Host(ctx) if err != nil { return nil, "", err } - mappedPort, err := cassandraContainer.MappedPort(ctx, cassandraPort) + mappedPort, err := c.MappedPort(ctx, cassandraPort) if err != nil { return nil, "", err } connectionURL := host + ":" + mappedPort.Port() - return cassandraContainer, connectionURL, nil + return c, connectionURL, nil } // TestCassandraStorage tests the Cassandra storage implementation @@ -53,7 +57,7 @@ func TestCassandraStorage(t *testing.T) { ctx := context.Background() // Start Cassandra container - cassandraContainer, connectionURL, err := setupCassandraContainer(ctx) + cassandraContainer, connectionURL, err := newTestStore(t) if err != nil { t.Fatalf("Failed to start Cassandra container: %v", err) } @@ -185,15 +189,15 @@ func testExpirableKeys(t *testing.T, connectionURL string) { // Verify all keys exist initially value, err := store.Get("key_default_ttl") require.NoError(t, err) - assert.Equal(t, []byte("value1"), value) + require.Equal(t, []byte("value1"), value) value, err = store.Get("key_specific_ttl") require.NoError(t, err) - assert.Equal(t, []byte("value2"), value) + require.Equal(t, []byte("value2"), value) value, err = store.Get("key_no_ttl") require.NoError(t, err) - assert.Equal(t, []byte("value3"), value) + require.Equal(t, []byte("value3"), value) // Wait for specific TTL to expire time.Sleep(1500 * time.Millisecond) @@ -201,15 +205,15 @@ func testExpirableKeys(t *testing.T, connectionURL string) { // Specific TTL key should be gone, others should remain value, err = store.Get("key_specific_ttl") require.NoError(t, err) - assert.Nil(t, value, "Key with 1s TTL should have expired") + require.Nil(t, value, "Key with 1s TTL should have expired") value, err = store.Get("key_default_ttl") require.NoError(t, err) - assert.Equal(t, []byte("value1"), value, "Key with default TTL should still exist") + require.Equal(t, []byte("value1"), value, "Key with default TTL should still exist") value, err = store.Get("key_no_ttl") require.NoError(t, err) - assert.Equal(t, []byte("value3"), value, "Key with no TTL should still exist") + require.Equal(t, []byte("value3"), value, "Key with no TTL should still exist") // Wait for default TTL to expire time.Sleep(4 * time.Second) @@ -217,11 +221,11 @@ func testExpirableKeys(t *testing.T, connectionURL string) { // Default TTL key should be gone, no TTL key should remain value, err = store.Get("key_default_ttl") require.NoError(t, err) - assert.Nil(t, value, "Key with default TTL should have expired") + require.Nil(t, value, "Key with default TTL should have expired") value, err = store.Get("key_no_ttl") require.NoError(t, err) - assert.Equal(t, []byte("value3"), value, "Key with no TTL should still exist") + require.Equal(t, []byte("value3"), value, "Key with no TTL should still exist") } // / testReset tests the Reset method. @@ -326,3 +330,96 @@ func testConcurrentAccess(t *testing.T, connectionURL string) { <-done } } + +func Benchmark_Cassandra_Set(b *testing.B) { + b.ReportAllocs() + b.ResetTimer() + + c, connectionURL, err := newTestStore(b) + if err != nil { + b.Fatalf("Failed to start Cassandra container: %v", err) + } + defer func() { + if err := c.Terminate(context.TODO()); err != nil { + b.Logf("Failed to terminate container: %v", err) + } + }() + require.NoError(b, err) + + // Create new storage + store := New(Config{ + Hosts: []string{connectionURL}, + Keyspace: "test_concurrent", + Table: "test_kv", + }) + defer store.Close() + + for i := 0; i < b.N; i++ { + err = store.Set("john", []byte("doe"), 0) + } + + require.NoError(b, err) +} + +func Benchmark_Cassandra_Get(b *testing.B) { + b.ReportAllocs() + b.ResetTimer() + + c, connectionURL, err := newTestStore(b) + if err != nil { + b.Fatalf("Failed to start Cassandra container: %v", err) + } + defer func() { + if err := c.Terminate(context.TODO()); err != nil { + b.Logf("Failed to terminate container: %v", err) + } + }() + require.NoError(b, err) + + // Create new storage + client := New(Config{ + Hosts: []string{connectionURL}, + Keyspace: "test_concurrent", + Table: "test_kv", + }) + defer client.Close() + + err = client.Set("john", []byte("doe"), 0) + + for i := 0; i < b.N; i++ { + _, err = client.Get("john") + } + + require.NoError(b, err) +} + +func Benchmark_Cassandra_Set_And_Delete(b *testing.B) { + b.ReportAllocs() + b.ResetTimer() + + c, connectionURL, err := newTestStore(b) + if err != nil { + b.Fatalf("Failed to start Cassandra container: %v", err) + } + defer func() { + if err := c.Terminate(context.TODO()); err != nil { + b.Logf("Failed to terminate container: %v", err) + } + }() + require.NoError(b, err) + + // Create new storage + client := New(Config{ + Hosts: []string{connectionURL}, + Keyspace: "test_concurrent", + Table: "test_kv", + }) + defer client.Close() + + for i := 0; i < b.N; i++ { + _ = client.Set("john", []byte("doe"), 0) + err = client.Delete("john") + } + + require.NoError(b, err) +} diff --git a/cassandra/config.go b/cassandra/config.go index 0705e303..3fd122a1 100644 --- a/cassandra/config.go +++ b/cassandra/config.go @@ -15,7 +15,7 @@ type Config struct { // Keyspace is the name of the Cassandra keyspace to use. Keyspace string // Optional. Default is kv_store - /// Table is the name of the Cassandra table to use. + // Table is the name of the Cassandra table to use. Table string // Optional. Default is Quorum // Consistency is the Cassandra consistency level. diff --git a/cassandra/go.mod b/cassandra/go.mod index 557997c5..34d282ae 100644 --- a/cassandra/go.mod +++ b/cassandra/go.mod @@ -1,4 +1,4 @@ -module github.com/gofiber/storage/cassandra/v2 +module github.com/gofiber/storage/cassandra go 1.23.0 From 6339526f6ec17dca6a9ba93671f53cd0d9de0672 Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Tue, 15 Apr 2025 12:03:18 +0530 Subject: [PATCH 021/168] fixed lint issue --- cassandra/cassandra.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cassandra/cassandra.go b/cassandra/cassandra.go index 169bfdab..fc61adc9 100644 --- a/cassandra/cassandra.go +++ b/cassandra/cassandra.go @@ -153,7 +153,7 @@ func (s *Storage) dropTables() error { func (s *Storage) Set(key string, value []byte, exp time.Duration) error { // Calculate expiration time var expiresAt *time.Time - var ttl int = -1 // Default to no TTL + var ttl = -1 // Default to no TTL if exp > 0 { // Specific expiration provided From 7f5e9eb94d710c9288de9852304cd3cf07f71ac9 Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Tue, 15 Apr 2025 12:12:02 +0530 Subject: [PATCH 022/168] Mod tidy --- cassandra/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cassandra/go.mod b/cassandra/go.mod index 34d282ae..d32204e2 100644 --- a/cassandra/go.mod +++ b/cassandra/go.mod @@ -5,6 +5,7 @@ go 1.23.0 require ( github.com/gocql/gocql v1.7.0 github.com/stretchr/testify v1.10.0 + github.com/testcontainers/testcontainers-go v0.36.0 github.com/testcontainers/testcontainers-go/modules/cassandra v0.36.0 ) @@ -48,7 +49,6 @@ require ( github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/shirou/gopsutil/v4 v4.25.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/testcontainers/testcontainers-go v0.36.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect From bc86e8015c89b9eb7c08ac990fe5794b7f7cf22e Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Wed, 16 Apr 2025 10:34:30 +0530 Subject: [PATCH 023/168] Updated Testcases --- cassandra/cassandra_test.go | 137 +++++++++--------------------------- 1 file changed, 34 insertions(+), 103 deletions(-) diff --git a/cassandra/cassandra_test.go b/cassandra/cassandra_test.go index a983db08..fd96cd8b 100644 --- a/cassandra/cassandra_test.go +++ b/cassandra/cassandra_test.go @@ -21,7 +21,7 @@ const ( ) // newTestStore creates a Cassandra container using the official module -func newTestStore(t testing.TB) (*cassandracontainer.CassandraContainer, string, error) { +func newTestStore(t testing.TB) string { t.Helper() img := cassandraImage @@ -33,71 +33,58 @@ func newTestStore(t testing.TB) (*cassandracontainer.CassandraContainer, string, c, err := cassandracontainer.Run(ctx, img) testcontainers.CleanupContainer(t, c) - if err != nil { - return nil, "", err - } + require.NoError(t, err) // Get connection parameters host, err := c.Host(ctx) - if err != nil { - return nil, "", err - } + require.NoError(t, err) mappedPort, err := c.MappedPort(ctx, cassandraPort) - if err != nil { - return nil, "", err - } + require.NoError(t, err) connectionURL := host + ":" + mappedPort.Port() - return c, connectionURL, nil + return connectionURL } // TestCassandraStorage tests the Cassandra storage implementation func TestCassandraStorage(t *testing.T) { - ctx := context.Background() // Start Cassandra container - cassandraContainer, connectionURL, err := newTestStore(t) - if err != nil { - t.Fatalf("Failed to start Cassandra container: %v", err) - } - defer func() { - if err := cassandraContainer.Terminate(ctx); err != nil { - t.Logf("Failed to terminate container: %v", err) - } - }() + connectionURL := newTestStore(t) + + // Create new storage + store := New(Config{ + Hosts: []string{connectionURL}, + Keyspace: "test_keyspace_creation", + Table: "test_kv", + Expiration: 5 * time.Second, // Short default TTL for testing + }) + defer store.Close() // Test cases t.Run("KeyspaceCreation", func(t *testing.T) { - testKeyspaceCreation(t, connectionURL) + testKeyspaceCreation(t, connectionURL, store) }) t.Run("BasicOperations", func(t *testing.T) { - testBasicOperations(t, connectionURL) + testBasicOperations(t, store) }) t.Run("ExpirableKeys", func(t *testing.T) { - testExpirableKeys(t, connectionURL) - }) - - t.Run("Reset", func(t *testing.T) { - testReset(t, connectionURL) + testExpirableKeys(t, store) }) t.Run("ConcurrentAccess", func(t *testing.T) { - testConcurrentAccess(t, connectionURL) + testConcurrentAccess(t, store) + }) + + t.Run("Reset", func(t *testing.T) { + testReset(t, connectionURL, store) }) } // testKeyspaceCreation tests the keyspace creation functionality. -func testKeyspaceCreation(t *testing.T, connectionURL string) { - // Create new storage - store := New(Config{ - Hosts: []string{connectionURL}, - Keyspace: "test_keyspace_creation", - Table: "test_kv", - }) - defer store.Close() +func testKeyspaceCreation(t *testing.T, connectionURL string, store *Storage) { // Verify keyspace was created systemCluster := gocql.NewCluster(connectionURL) @@ -129,14 +116,7 @@ func testKeyspaceCreation(t *testing.T, connectionURL string) { } // testBasicOperations tests basic operations like setting, getting, and deleting keys. -func testBasicOperations(t *testing.T, connectionURL string) { - // Create new storage - store := New(Config{ - Hosts: []string{connectionURL}, - Keyspace: "test_basic_ops", - Table: "test_kv", - }) - defer store.Close() +func testBasicOperations(t *testing.T, store *Storage) { // Set a key err := store.Set("test_key", []byte("test_value"), 0) @@ -163,15 +143,7 @@ func testBasicOperations(t *testing.T, connectionURL string) { } // testExpirableKeys tests the expirable keys functionality. -func testExpirableKeys(t *testing.T, connectionURL string) { - // Create new storage with default expiration - store := New(Config{ - Hosts: []string{connectionURL}, - Keyspace: "test_expirable", - Table: "test_kv", - Expiration: 5 * time.Second, // Short default TTL for testing - }) - defer store.Close() +func testExpirableKeys(t *testing.T, store *Storage) { // Set keys with different expiration settings // Key with default TTL (exp = 0 means use default) @@ -229,13 +201,7 @@ func testExpirableKeys(t *testing.T, connectionURL string) { } // / testReset tests the Reset method. -func testReset(t *testing.T, connectionURL string) { - // Create new storage - store := New(Config{ - Hosts: []string{connectionURL}, - Keyspace: "test_reset", - Table: "test_kv", - }) +func testReset(t *testing.T, connectionURL string, store *Storage) { // Set some keys err := store.Set("key1", []byte("value1"), 0) @@ -262,9 +228,6 @@ func testReset(t *testing.T, connectionURL string) { require.NoError(t, err) require.Nil(t, value, "Key should be deleted after reset") - // Close the first storage - store.Close() - // Create new storage with Reset flag store = New(Config{ Hosts: []string{connectionURL}, @@ -285,14 +248,7 @@ func testReset(t *testing.T, connectionURL string) { } // testConcurrentAccess tests concurrent access to the storage. -func testConcurrentAccess(t *testing.T, connectionURL string) { - // Create new storage - store := New(Config{ - Hosts: []string{connectionURL}, - Keyspace: "test_concurrent", - Table: "test_kv", - }) - defer store.Close() +func testConcurrentAccess(t *testing.T, store *Storage) { // Number of goroutines const concurrentOps = 10 @@ -335,16 +291,7 @@ func Benchmark_Cassandra_Set(b *testing.B) { b.ReportAllocs() b.ResetTimer() - c, connectionURL, err := newTestStore(b) - if err != nil { - b.Fatalf("Failed to start Cassandra container: %v", err) - } - defer func() { - if err := c.Terminate(context.TODO()); err != nil { - b.Logf("Failed to terminate container: %v", err) - } - }() - require.NoError(b, err) + connectionURL := newTestStore(b) // Create new storage store := New(Config{ @@ -354,6 +301,7 @@ func Benchmark_Cassandra_Set(b *testing.B) { }) defer store.Close() + var err error for i := 0; i < b.N; i++ { err = store.Set("john", []byte("doe"), 0) } @@ -365,16 +313,7 @@ func Benchmark_Cassandra_Get(b *testing.B) { b.ReportAllocs() b.ResetTimer() - c, connectionURL, err := newTestStore(b) - if err != nil { - b.Fatalf("Failed to start Cassandra container: %v", err) - } - defer func() { - if err := c.Terminate(context.TODO()); err != nil { - b.Logf("Failed to terminate container: %v", err) - } - }() - require.NoError(b, err) + connectionURL := newTestStore(b) // Create new storage client := New(Config{ @@ -384,7 +323,7 @@ func Benchmark_Cassandra_Get(b *testing.B) { }) defer client.Close() - err = client.Set("john", []byte("doe"), 0) + err := client.Set("john", []byte("doe"), 0) for i := 0; i < b.N; i++ { _, err = client.Get("john") @@ -397,16 +336,7 @@ func Benchmark_Cassandra_Set_And_Delete(b *testing.B) { b.ReportAllocs() b.ResetTimer() - c, connectionURL, err := newTestStore(b) - if err != nil { - b.Fatalf("Failed to start Cassandra container: %v", err) - } - defer func() { - if err := c.Terminate(context.TODO()); err != nil { - b.Logf("Failed to terminate container: %v", err) - } - }() - require.NoError(b, err) + connectionURL := newTestStore(b) // Create new storage client := New(Config{ @@ -416,6 +346,7 @@ func Benchmark_Cassandra_Set_And_Delete(b *testing.B) { }) defer client.Close() + var err error for i := 0; i < b.N; i++ { _ = client.Set("john", []byte("doe"), 0) err = client.Delete("john") From 05516094e9d89fc8e0bd22f7a5dc6ad1cdf2752a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 16 Apr 2025 15:06:19 +0200 Subject: [PATCH 024/168] feat(redis): use testcontainers-go for testing redis --- .github/workflows/benchmark.yml | 13 +- redis/go.mod | 53 ++++++- redis/go.sum | 182 +++++++++++++++++++++++- redis/redis_test.go | 244 ++++++++++++++++++++------------ 4 files changed, 391 insertions(+), 101 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 846968ae..6ceb4930 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -99,18 +99,6 @@ jobs: --env ETCD_ADVERTISE_CLIENT_URLS=http://etcd-server:2379 \ bitnami/etcd:latest - - name: Setup Redis - if: ${{ matrix.package == 'redis' || matrix.package == 'rueidis' }} - uses: shogo82148/actions-setup-redis@v1 - with: - redis-version: '7.x' - auto-start: 'false' - - - name: Run Redis - if: ${{ matrix.package == 'redis' || matrix.package == 'rueidis' }} - run: | - redis-server --port 6379 & - - name: Run Benchmarks working-directory: ${{ matrix.package }} run: | @@ -132,6 +120,7 @@ jobs: TEST_MYSQL_IMAGE: "docker.io/mysql:9" TEST_NATS_IMAGE: "nats:2-alpine" TEST_POSTGRES_IMAGE: "docker.io/postgres:16-alpine" + TEST_REDIS_IMAGE: "docker.io/redis:7" TEST_SCYLLADB_IMAGE: "scylladb/scylla:6.2" - name: Get Previous Benchmark Results diff --git a/redis/go.mod b/redis/go.mod index 920f2992..e35ea8a9 100644 --- a/redis/go.mod +++ b/redis/go.mod @@ -1,16 +1,67 @@ module github.com/gofiber/storage/redis/v3 -go 1.19 +go 1.23.0 require ( github.com/redis/go-redis/v9 v9.7.3 github.com/stretchr/testify v1.10.0 + github.com/testcontainers/testcontainers-go v0.36.0 + github.com/testcontainers/testcontainers-go/modules/redis v0.36.0 ) require ( + dario.cat/mergo v1.0.1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/containerd/platforms v0.2.1 // indirect + github.com/cpuguy83/dockercfg v0.3.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect + github.com/distribution/reference v0.6.0 // indirect + github.com/docker/docker v28.0.1+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/ebitengine/purego v0.8.2 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/klauspost/compress v1.18.0 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/magiconair/properties v1.8.9 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/patternmatcher v0.6.0 // indirect + github.com/moby/sys/sequential v0.5.0 // indirect + github.com/moby/sys/user v0.1.0 // indirect + github.com/moby/sys/userns v0.1.0 // indirect + github.com/moby/term v0.5.0 // indirect + github.com/morikuni/aec v1.0.0 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.1 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/shirou/gopsutil/v4 v4.25.1 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/sdk v1.35.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect + go.opentelemetry.io/proto/otlp v1.5.0 // indirect + golang.org/x/crypto v0.35.0 // indirect + golang.org/x/sys v0.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e // indirect + google.golang.org/protobuf v1.36.6 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/redis/go.sum b/redis/go.sum index 97d0fe31..52b9a61e 100644 --- a/redis/go.sum +++ b/redis/go.sum @@ -1,18 +1,198 @@ +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= +github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= +github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= +github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= +github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v28.0.1+incompatible h1:FCHjSRdXhNRFjlHMTv4jUNlIBbTeRjrWfeFuJp7jpo0= +github.com/docker/docker v28.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I= +github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= +github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 h1:VNqngBF40hVlDloBruUehVYC3ArSgIyScOAyMRqBxRg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1/go.mod h1:RBRO7fro65R6tjKzYgLAFo0t1QEXY1Dp+i/bvpRiqiQ= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= +github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= +github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= +github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= +github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= +github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/redis/go-redis/v9 v9.7.3 h1:YpPyAayJV+XErNsatSElgRZZVCwXX9QzkKYNvO7x0wM= github.com/redis/go-redis/v9 v9.7.3/go.mod h1:bGUrSggJ9X9GUmZpZNEOQKaANxSGgOEBRltRTZHSvrA= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= +github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= +github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= +github.com/testcontainers/testcontainers-go/modules/redis v0.36.0 h1:Z+6APQ0DjQP8Kj5Fu+lkAlH2v7f5QkAQyyjnf1Kq8sw= +github.com/testcontainers/testcontainers-go/modules/redis v0.36.0/go.mod h1:LV66RJhSMikZrxJRc6O0nKcRqykmjQSyX82S93haE2w= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 h1:1fTNlAIJZGWLP5FVu0fikVry1IsiUnXjf7QFvoNN3Xw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0/go.mod h1:zjPK58DtkqQFn+YUMbx0M2XV3QgKU0gS9LeGohREyK4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= +go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= +go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= +golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= +golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= +golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/api v0.0.0-20250102185135-69823020774d h1:H8tOf8XM88HvKqLTxe755haY6r1fqqzLbEnfrmLXlSA= +google.golang.org/genproto/googleapis/api v0.0.0-20250102185135-69823020774d/go.mod h1:2v7Z7gP2ZUOGsaFyxATQSRoBnKygqVq2Cwnvom7QiqY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e h1:ztQaXfzEXTmCBvbtWYRhJxW+0iJcz2qXfd38/e9l7bA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= +google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= diff --git a/redis/redis_test.go b/redis/redis_test.go index 96beaa5e..99fbd5a8 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -1,36 +1,137 @@ package redis import ( + "context" "crypto/tls" "log" + "os" + "strings" "testing" "time" "github.com/stretchr/testify/require" + + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/modules/redis" + "github.com/testcontainers/testcontainers-go/wait" ) +const ( + // redisImage is the default image used for running Redis in tests. + redisImage = "docker.io/redis:7" + redisImageEnvVar = "TEST_REDIS_IMAGE" + redisPort = "6379/tcp" +) + +type testStoreSettings struct { + withAddress bool + withHostPort bool + withURL bool +} + +type testStoreOption func(*testStoreSettings) + +func withAddress() testStoreOption { + return func(o *testStoreSettings) { + o.withAddress = true + } +} + +func withHostPort() testStoreOption { + return func(o *testStoreSettings) { + o.withHostPort = true + } +} + +// withURL sets the test store to use a URL. +// Use it when you want to explicitly combine multiple addresses in the same test +// to verify which one is being used. +// - true: the URL will receive the URI provided by the testcontainer +// - false: the URL will be set to an empty string +func withURL(b bool) testStoreOption { + return func(o *testStoreSettings) { + o.withURL = b + } +} + +func newTestStore(t testing.TB, opts ...testStoreOption) *Storage { + t.Helper() + + settings := &testStoreSettings{ + withURL: true, // by default, the URL will be set to the URI provided by the testcontainer + withAddress: false, + withHostPort: false, + } + for _, o := range opts { + o(settings) + } + + img := redisImage + if imgFromEnv := os.Getenv(redisImageEnvVar); imgFromEnv != "" { + img = imgFromEnv + } + + ctx := context.Background() + + c, err := redis.Run( + ctx, img, + testcontainers.WithWaitStrategy(wait.ForListeningPort(redisPort).WithStartupTimeout(time.Second*10)), + ) + testcontainers.CleanupContainer(t, c) + require.NoError(t, err) + + uri, err := c.ConnectionString(ctx) + require.NoError(t, err) + + cfg := Config{ + Reset: true, + } + + if settings.withHostPort { + host, err := c.Host(ctx) + require.NoError(t, err) + + port, err := c.MappedPort(ctx, redisPort) + require.NoError(t, err) + + cfg.Host = host + cfg.Port = port.Int() + } + + if settings.withAddress { + // trim the scheme from the URI + cfg.Addrs = []string{strings.TrimPrefix(uri, "redis://")} + } + + if settings.withURL { + cfg.URL = uri + } + + return New(cfg) +} + func Test_Redis_Set(t *testing.T) { var ( - testStore = New(Config{ - Reset: true, - }) key = "john" val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) } func Test_Redis_Set_Override(t *testing.T) { var ( - testStore = New(Config{ - Reset: true, - }) key = "john" val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) @@ -44,13 +145,13 @@ func Test_Redis_Set_Override(t *testing.T) { func Test_Redis_Get(t *testing.T) { var ( - testStore = New(Config{ - Reset: true, - }) key = "john" val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) @@ -65,14 +166,14 @@ func Test_Redis_Get(t *testing.T) { func Test_Redis_Expiration(t *testing.T) { var ( - testStore = New(Config{ - Reset: true, - }) key = "john" val = []byte("doe") exp = 1 * time.Second ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, exp) require.NoError(t, err) @@ -88,9 +189,9 @@ func Test_Redis_Expiration(t *testing.T) { } func Test_Redis_Get_NotExist(t *testing.T) { - testStore := New(Config{ - Reset: true, - }) + testStore := newTestStore(t) + defer testStore.Close() + result, err := testStore.Get("notexist") require.NoError(t, err) require.Zero(t, len(result)) @@ -98,13 +199,13 @@ func Test_Redis_Get_NotExist(t *testing.T) { func Test_Redis_Delete(t *testing.T) { var ( - testStore = New(Config{ - Reset: true, - }) key = "john" val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) @@ -121,11 +222,11 @@ func Test_Redis_Delete(t *testing.T) { } func Test_Redis_Reset(t *testing.T) { - testStore := New(Config{ - Reset: true, - }) val := []byte("doe") + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set("john1", val, 0) require.NoError(t, err) @@ -153,39 +254,35 @@ func Test_Redis_Reset(t *testing.T) { } func Test_Redis_Close(t *testing.T) { - testStore := New(Config{ - Reset: true, - }) - require.Nil(t, testStore.Close()) + testStore := newTestStore(t) + require.NoError(t, testStore.Close()) } func Test_Redis_Conn(t *testing.T) { - testStore := New(Config{ - Reset: true, - }) + testStore := newTestStore(t) + defer testStore.Close() + require.True(t, testStore.Conn() != nil) } -func Test_Redis_Initalize_WithURL(t *testing.T) { - testStoreUrl := New(Config{ - URL: "redis://localhost:6379", - }) +func Test_Redis_Initalize_WithHostPort(t *testing.T) { var ( key = "clark" val = []byte("kent") ) - err := testStoreUrl.Set(key, val, 0) + testStore := newTestStore(t, withHostPort()) + defer testStore.Close() + + err := testStore.Set(key, val, 0) require.NoError(t, err) - result, err := testStoreUrl.Get(key) + result, err := testStore.Get(key) require.NoError(t, err) require.Equal(t, val, result) - err = testStoreUrl.Delete(key) + err = testStore.Delete(key) require.NoError(t, err) - - require.Nil(t, testStoreUrl.Close()) } func Test_Redis_Initalize_WithURL_TLS(t *testing.T) { @@ -211,6 +308,7 @@ func Test_Redis_Initalize_WithURL_TLS(t *testing.T) { URL: "redis://localhost:6380", TLSConfig: tlsCfg, }) + defer testStoreUrl.Close() var ( key = "clark" @@ -230,8 +328,6 @@ func Test_Redis_Initalize_WithURL_TLS(t *testing.T) { keys, err := testStoreUrl.Keys() require.NoError(t, err) require.Nil(t, keys) - - require.Nil(t, testStoreUrl.Close()) } func Test_Redis_Initalize_WithURL_TLS_Verify(t *testing.T) { @@ -257,6 +353,7 @@ func Test_Redis_Initalize_WithURL_TLS_Verify(t *testing.T) { URL: "redis://localhost:6380", TLSConfig: tlsCfg, }) + defer testStoreUrl.Close() var ( key = "clark" @@ -276,14 +373,13 @@ func Test_Redis_Initalize_WithURL_TLS_Verify(t *testing.T) { keys, err := testStoreUrl.Keys() require.NoError(t, err) require.Nil(t, keys) - - require.Nil(t, testStoreUrl.Close()) } func Test_Redis_Initalize_With_Secure_URL(t *testing.T) { testStoreUrl := New(Config{ URL: "rediss://localhost:16380", }) + defer testStoreUrl.Close() var ( key = "clark" @@ -303,16 +399,12 @@ func Test_Redis_Initalize_With_Secure_URL(t *testing.T) { keys, err := testStoreUrl.Keys() require.NoError(t, err) require.Nil(t, keys) - - require.Nil(t, testStoreUrl.Close()) } func Test_Redis_Universal_Addrs(t *testing.T) { // This should failover and create a Single Node connection. - testStoreUniversal := New(Config{ - Addrs: []string{"localhost:6379"}, - }) - + testStoreUniversal := newTestStore(t, withAddress()) + defer testStoreUniversal.Close() var ( key = "bruce" val = []byte("wayne") @@ -331,18 +423,14 @@ func Test_Redis_Universal_Addrs(t *testing.T) { keys, err := testStoreUniversal.Keys() require.NoError(t, err) require.Nil(t, keys) - - require.Nil(t, testStoreUniversal.Close()) } func Test_Redis_Universal_With_URL_Undefined(t *testing.T) { // This should failover to creating a regular *redis.Client // The URL should get ignored since it's empty - testStoreUniversal := New(Config{ - URL: "", - Addrs: []string{"localhost:6379"}, - }) - + // the withURL option goes last to include it in the config + testStoreUniversal := newTestStore(t, withAddress(), withURL(false)) + defer testStoreUniversal.Close() var ( key = "bruce" val = []byte("wayne") @@ -361,17 +449,13 @@ func Test_Redis_Universal_With_URL_Undefined(t *testing.T) { keys, err := testStoreUniversal.Keys() require.NoError(t, err) require.Nil(t, keys) - - require.Nil(t, testStoreUniversal.Close()) } func Test_Redis_Universal_With_URL_Defined(t *testing.T) { // This should failover to creating a regular *redis.Client // The Addrs field should get ignored since URL is defined - testStoreUniversal := New(Config{ - URL: "redis://localhost:6379", - Addrs: []string{"localhost:6355"}, - }) + testStoreUniversal := newTestStore(t, withAddress(), withURL(true)) + defer testStoreUniversal.Close() var ( key = "bruce" @@ -391,19 +475,13 @@ func Test_Redis_Universal_With_URL_Defined(t *testing.T) { keys, err := testStoreUniversal.Keys() require.NoError(t, err) require.Nil(t, keys) - - require.Nil(t, testStoreUniversal.Close()) } func Test_Redis_Universal_With_HostPort(t *testing.T) { // This should failover to creating a regular *redis.Client // The Host and Port should get ignored since Addrs is defined - testStoreUniversal := New(Config{ - Host: "localhost", - Port: 6388, - Addrs: []string{"localhost:6379"}, - }) - + testStoreUniversal := newTestStore(t, withAddress(), withHostPort(), withURL(false)) + defer testStoreUniversal.Close() var ( key = "bruce" val = []byte("wayne") @@ -422,19 +500,13 @@ func Test_Redis_Universal_With_HostPort(t *testing.T) { keys, err := testStoreUniversal.Keys() require.NoError(t, err) require.Nil(t, keys) - - require.Nil(t, testStoreUniversal.Close()) } func Test_Redis_Universal_With_HostPort_And_URL(t *testing.T) { // This should failover to creating a regular *redis.Client // The Host and Port should get ignored since Addrs is defined - testStoreUniversal := New(Config{ - URL: "redis://localhost:6379", - Host: "localhost", - Port: 6388, - Addrs: []string{"localhost:6399"}, - }) + testStoreUniversal := newTestStore(t, withAddress(), withHostPort(), withURL(true)) + defer testStoreUniversal.Close() var ( key = "bruce" @@ -454,8 +526,6 @@ func Test_Redis_Universal_With_HostPort_And_URL(t *testing.T) { keys, err := testStoreUniversal.Keys() require.NoError(t, err) require.Nil(t, keys) - - require.Nil(t, testStoreUniversal.Close()) } func Test_Redis_Cluster(t *testing.T) { @@ -493,9 +563,9 @@ func Test_Redis_Cluster(t *testing.T) { } func Benchmark_Redis_Set(b *testing.B) { - testStore := New(Config{ - Reset: true, - }) + testStore := newTestStore(b) + defer testStore.Close() + b.ReportAllocs() b.ResetTimer() @@ -508,9 +578,9 @@ func Benchmark_Redis_Set(b *testing.B) { } func Benchmark_Redis_Get(b *testing.B) { - testStore := New(Config{ - Reset: true, - }) + testStore := newTestStore(b) + defer testStore.Close() + err := testStore.Set("john", []byte("doe"), 0) require.NoError(b, err) @@ -525,9 +595,9 @@ func Benchmark_Redis_Get(b *testing.B) { } func Benchmark_Redis_SetAndDelete(b *testing.B) { - testStore := New(Config{ - Reset: true, - }) + testStore := newTestStore(b) + defer testStore.Close() + b.ReportAllocs() b.ResetTimer() From faa652f38c9b9f1dbdea9c4bc503b52660449f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 16 Apr 2025 20:30:26 +0200 Subject: [PATCH 025/168] chore: use redis with TLS --- .github/workflows/test-redis.yml | 32 +--- redis/go.mod | 1 + redis/go.sum | 2 + redis/redis_test.go | 296 +++++++++++++++++++------------ 4 files changed, 184 insertions(+), 147 deletions(-) diff --git a/.github/workflows/test-redis.yml b/.github/workflows/test-redis.yml index c775a9fe..af6771ea 100644 --- a/.github/workflows/test-redis.yml +++ b/.github/workflows/test-redis.yml @@ -25,36 +25,6 @@ jobs: - name: Fetch Repository uses: actions/checkout@v4 - - name: Generate TLS certs - run: ./.github/scripts/gen-test-certs.sh - - - name: Add Custom CA cert - run: sudo cp /home/runner/work/storage/storage/tls/ca.crt /usr/local/share/ca-certificates/custom.crt - - - name: Trust Custom CA Cert - run: sudo update-ca-certificates - - - name: Setup Redis - uses: shogo82148/actions-setup-redis@v1 - with: - redis-version: ${{ matrix.redis }} - auto-start: 'false' - - - name: Run Redis - run: | - redis-server --tls-port 6380 --port 6379 \ - --tls-cert-file /home/runner/work/storage/storage/tls/redis.crt \ - --tls-key-file /home/runner/work/storage/storage/tls/redis.key \ - --tls-ca-cert-file /home/runner/work/storage/storage/tls/ca.crt & - - - name: Run Redis instance with MTLS disabled - run: | - redis-server --tls-port 16380 --port 16379 \ - --tls-cert-file /home/runner/work/storage/storage/tls/redis.crt \ - --tls-key-file /home/runner/work/storage/storage/tls/redis.key \ - --tls-ca-cert-file /home/runner/work/storage/storage/tls/ca.crt \ - --tls-auth-clients no & - - name: Setup Redis Cluster uses: vishnudxb/redis-cluster@1.0.9 with: @@ -75,4 +45,6 @@ jobs: go-version: '${{ matrix.go-version }}' - name: Run Test + env: + TEST_REDIS_IMAGE: "docker.io/redis:7" run: cd ./redis && go test ./... -v -race diff --git a/redis/go.mod b/redis/go.mod index e35ea8a9..cfedf071 100644 --- a/redis/go.mod +++ b/redis/go.mod @@ -3,6 +3,7 @@ module github.com/gofiber/storage/redis/v3 go 1.23.0 require ( + github.com/mdelapenya/tlscert v0.1.0 github.com/redis/go-redis/v9 v9.7.3 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.36.0 diff --git a/redis/go.sum b/redis/go.sum index 52b9a61e..4db89892 100644 --- a/redis/go.sum +++ b/redis/go.sum @@ -69,6 +69,8 @@ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mdelapenya/tlscert v0.1.0 h1:YTpF579PYUX475eOL+6zyEO3ngLTOUWck78NBuJVXaM= +github.com/mdelapenya/tlscert v0.1.0/go.mod h1:wrbyM/DwbFCeCeqdPX/8c6hNOqQgbf0rUDErE1uD+64= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= diff --git a/redis/redis_test.go b/redis/redis_test.go index 99fbd5a8..9143ef7a 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -1,14 +1,16 @@ package redis import ( + "bytes" "context" "crypto/tls" - "log" + "net" "os" "strings" "testing" "time" + "github.com/mdelapenya/tlscert" "github.com/stretchr/testify/require" "github.com/testcontainers/testcontainers-go" @@ -21,12 +23,18 @@ const ( redisImage = "docker.io/redis:7" redisImageEnvVar = "TEST_REDIS_IMAGE" redisPort = "6379/tcp" + redisTLSPort = "6380/tcp" ) type testStoreSettings struct { withAddress bool withHostPort bool withURL bool + + // TLS settings + withSecureURL bool + withMTLSdisabled bool + withTLS bool } type testStoreOption func(*testStoreSettings) @@ -43,17 +51,72 @@ func withHostPort() testStoreOption { } } +func withTLS(secureURL bool, mtlsDisabled bool) testStoreOption { + return func(o *testStoreSettings) { + o.withTLS = true + o.withSecureURL = secureURL + o.withMTLSdisabled = mtlsDisabled + } +} + // withURL sets the test store to use a URL. // Use it when you want to explicitly combine multiple addresses in the same test // to verify which one is being used. // - true: the URL will receive the URI provided by the testcontainer // - false: the URL will be set to an empty string -func withURL(b bool) testStoreOption { +func withURL(useContainerURI bool) testStoreOption { return func(o *testStoreSettings) { - o.withURL = b + o.withURL = useContainerURI } } +// createTLSCerts creates a CA certificate, a client certificate and a nats certificate, +// storing them in the given temporary directory. +func createTLSCerts(t testing.TB) (*tlscert.Certificate, *tlscert.Certificate, *tlscert.Certificate) { + t.Helper() + + tmpDir := t.TempDir() + + // ips is the extra list of IPs to include in the certificates. + // It's used to allow the client and Redis certificates to be used in the same host + // when the tests are run using a remote docker daemon. + ips := []net.IP{net.ParseIP("127.0.0.1")} + + // Generate CA certificate + caCert := tlscert.SelfSignedFromRequest(tlscert.Request{ + Host: "localhost", + IPAddresses: ips, + Name: "ca", + SubjectCommonName: "ca", + IsCA: true, + ParentDir: tmpDir, + }) + require.NotNil(t, caCert) + + // Generate client certificate + clientCert := tlscert.SelfSignedFromRequest(tlscert.Request{ + Host: "localhost", + Name: "Redis Client", + SubjectCommonName: "localhost", + IPAddresses: ips, + Parent: caCert, + ParentDir: tmpDir, + }) + require.NotNil(t, clientCert) + + // Generate Redis certificate + redisCert := tlscert.SelfSignedFromRequest(tlscert.Request{ + Host: "localhost", + IPAddresses: ips, + Name: "Redis Server", + Parent: caCert, + ParentDir: tmpDir, + }) + require.NotNil(t, redisCert) + + return caCert, clientCert, redisCert +} + func newTestStore(t testing.TB, opts ...testStoreOption) *Storage { t.Helper() @@ -71,22 +134,80 @@ func newTestStore(t testing.TB, opts ...testStoreOption) *Storage { img = imgFromEnv } + cfg := Config{ + Reset: true, + } + ctx := context.Background() - c, err := redis.Run( - ctx, img, - testcontainers.WithWaitStrategy(wait.ForListeningPort(redisPort).WithStartupTimeout(time.Second*10)), - ) + tcOpts := []testcontainers.ContainerCustomizer{} + + waitStrategies := []wait.Strategy{ + wait.ForListeningPort(redisPort).WithStartupTimeout(time.Second * 10), + } + + if settings.withTLS { + // wait for the TLS port to be available + waitStrategies = append(waitStrategies, wait.ForListeningPort(redisTLSPort).WithStartupTimeout(time.Second*10)) + + cmds := []string{ + "--port", "6379", + "--tls-port", "6380", + "--tls-cert-file", "/tls/server.crt", + "--tls-key-file", "/tls/server.key", + "--tls-ca-cert-file", "/tls/ca.crt", + "--tls-auth-clients", "yes", + } + + if settings.withMTLSdisabled { + cmds = append(cmds, "--tls-auth-clients", "no") + } + + // Generate TLS certificates in the fly and add them to the container before it starts. + // Update the CMD to use the TLS certificates. + caCert, clientCert, serverCert := createTLSCerts(t) + + tcOpts = append(tcOpts, testcontainers.CustomizeRequest(testcontainers.GenericContainerRequest{ + ContainerRequest: testcontainers.ContainerRequest{ + ExposedPorts: []string{"6380/tcp"}, + Files: []testcontainers.ContainerFile{ + { + Reader: bytes.NewReader(caCert.Bytes), + ContainerFilePath: "/tls/ca.crt", + FileMode: 0o644, + }, + { + Reader: bytes.NewReader(serverCert.Bytes), + ContainerFilePath: "/tls/server.crt", + FileMode: 0o644, + }, + { + Reader: bytes.NewReader(serverCert.KeyBytes), + ContainerFilePath: "/tls/server.key", + FileMode: 0o644, + }, + }, + Cmd: cmds, + }, + })) + + cfg.TLSConfig = &tls.Config{ + MinVersion: tls.VersionTLS12, + RootCAs: caCert.TLSConfig().RootCAs, + Certificates: clientCert.TLSConfig().Certificates, + ServerName: "localhost", // Match the server cert's common name + } + } + + tcOpts = append(tcOpts, testcontainers.WithWaitStrategy(waitStrategies...)) + + c, err := redis.Run(ctx, img, tcOpts...) testcontainers.CleanupContainer(t, c) require.NoError(t, err) uri, err := c.ConnectionString(ctx) require.NoError(t, err) - cfg := Config{ - Reset: true, - } - if settings.withHostPort { host, err := c.Host(ctx) require.NoError(t, err) @@ -107,6 +228,21 @@ func newTestStore(t testing.TB, opts ...testStoreOption) *Storage { cfg.URL = uri } + if settings.withTLS { + host, err := c.Host(ctx) + require.NoError(t, err) + + port, err := c.MappedPort(ctx, redisTLSPort) + require.NoError(t, err) + + scheme := "redis" + if settings.withSecureURL { + scheme = "rediss" + } + + cfg.URL = scheme + "://" + host + ":" + port.Port() + } + return New(cfg) } @@ -285,120 +421,46 @@ func Test_Redis_Initalize_WithHostPort(t *testing.T) { require.NoError(t, err) } -func Test_Redis_Initalize_WithURL_TLS(t *testing.T) { - cer, err := tls.LoadX509KeyPair("/home/runner/work/storage/storage/tls/client.crt", "/home/runner/work/storage/storage/tls/client.key") - if err != nil { - log.Println(err) - return - } - tlsCfg := &tls.Config{ - MinVersion: tls.VersionTLS12, - CurvePreferences: []tls.CurveID{tls.CurveP521, tls.CurveP384, tls.CurveP256}, - InsecureSkipVerify: true, - Certificates: []tls.Certificate{cer}, - CipherSuites: []uint16{ - tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, - tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, - tls.TLS_RSA_WITH_AES_256_GCM_SHA384, - tls.TLS_RSA_WITH_AES_256_CBC_SHA, - }, - } - - testStoreUrl := New(Config{ - URL: "redis://localhost:6380", - TLSConfig: tlsCfg, - }) - defer testStoreUrl.Close() - - var ( - key = "clark" - val = []byte("kent") - ) - - err = testStoreUrl.Set(key, val, 0) - require.NoError(t, err) - - result, err := testStoreUrl.Get(key) - require.NoError(t, err) - require.Equal(t, val, result) - - err = testStoreUrl.Delete(key) - require.NoError(t, err) - - keys, err := testStoreUrl.Keys() - require.NoError(t, err) - require.Nil(t, keys) -} - func Test_Redis_Initalize_WithURL_TLS_Verify(t *testing.T) { - cer, err := tls.LoadX509KeyPair("/home/runner/work/storage/storage/tls/client.crt", "/home/runner/work/storage/storage/tls/client.key") - if err != nil { - log.Println(err) - return - } - tlsCfg := &tls.Config{ - MinVersion: tls.VersionTLS12, - CurvePreferences: []tls.CurveID{tls.CurveP521, tls.CurveP384, tls.CurveP256}, - InsecureSkipVerify: false, - Certificates: []tls.Certificate{cer}, - CipherSuites: []uint16{ - tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, - tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, - tls.TLS_RSA_WITH_AES_256_GCM_SHA384, - tls.TLS_RSA_WITH_AES_256_CBC_SHA, - }, + testFn := func(secureURL bool, mtlsDisabled bool) { + testStore := newTestStore(t, withTLS(secureURL, mtlsDisabled)) + defer testStore.Close() + + var ( + key = "clark" + val = []byte("kent") + ) + + err := testStore.Set(key, val, 0) + require.NoError(t, err) + + result, err := testStore.Get(key) + require.NoError(t, err) + require.Equal(t, val, result) + + err = testStore.Delete(key) + require.NoError(t, err) + + keys, err := testStore.Keys() + require.NoError(t, err) + require.Nil(t, keys) } - testStoreUrl := New(Config{ - URL: "redis://localhost:6380", - TLSConfig: tlsCfg, + t.Run("insecure-url/mtls-disabled", func(t *testing.T) { + testFn(false, true) }) - defer testStoreUrl.Close() - var ( - key = "clark" - val = []byte("kent") - ) - - err = testStoreUrl.Set(key, val, 0) - require.NoError(t, err) - - result, err := testStoreUrl.Get(key) - require.NoError(t, err) - require.Equal(t, val, result) - - err = testStoreUrl.Delete(key) - require.NoError(t, err) - - keys, err := testStoreUrl.Keys() - require.NoError(t, err) - require.Nil(t, keys) -} - -func Test_Redis_Initalize_With_Secure_URL(t *testing.T) { - testStoreUrl := New(Config{ - URL: "rediss://localhost:16380", + t.Run("insecure-url/mtls-enabled", func(t *testing.T) { + testFn(false, false) }) - defer testStoreUrl.Close() - var ( - key = "clark" - val = []byte("kent") - ) + t.Run("secure-url/mtls-disabled", func(t *testing.T) { + testFn(true, true) + }) - err := testStoreUrl.Set(key, val, 0) - require.NoError(t, err) - - result, err := testStoreUrl.Get(key) - require.NoError(t, err) - require.Equal(t, val, result) - - err = testStoreUrl.Delete(key) - require.NoError(t, err) - - keys, err := testStoreUrl.Keys() - require.NoError(t, err) - require.Nil(t, keys) + t.Run("secure-url/mtls-enabled", func(t *testing.T) { + testFn(true, false) + }) } func Test_Redis_Universal_Addrs(t *testing.T) { From 6a89dcaa6f55eb2905f7a5da8198f7d335c82c8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 16 Apr 2025 20:36:07 +0200 Subject: [PATCH 026/168] chore: run CI on Go 1.23 and 1.24 --- .github/workflows/test-redis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-redis.yml b/.github/workflows/test-redis.yml index af6771ea..b542d46a 100644 --- a/.github/workflows/test-redis.yml +++ b/.github/workflows/test-redis.yml @@ -15,9 +15,8 @@ jobs: strategy: matrix: go-version: - - 1.19.x - - 1.20.x - - 1.21.x + - 1.23.x + - 1.24.x redis: - '6.x' - '7.x' From dc1bf75fe79ed08dd309c6af8802c49cc8b810e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 16 Apr 2025 20:39:26 +0200 Subject: [PATCH 027/168] chore: simplify redis version in matrix --- .github/workflows/test-redis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-redis.yml b/.github/workflows/test-redis.yml index b542d46a..fa2d89e3 100644 --- a/.github/workflows/test-redis.yml +++ b/.github/workflows/test-redis.yml @@ -18,8 +18,8 @@ jobs: - 1.23.x - 1.24.x redis: - - '6.x' - - '7.x' + - '6' + - '7' steps: - name: Fetch Repository uses: actions/checkout@v4 @@ -45,5 +45,5 @@ jobs: - name: Run Test env: - TEST_REDIS_IMAGE: "docker.io/redis:7" + TEST_REDIS_IMAGE: "docker.io/redis:${{ matrix.redis }}" run: cd ./redis && go test ./... -v -race From 06e9b1f5780a0ca905dd2298a3555f3528743032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 16 Apr 2025 20:46:08 +0200 Subject: [PATCH 028/168] chore: change file permissions --- redis/redis_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/redis/redis_test.go b/redis/redis_test.go index 9143ef7a..b2d9e1ec 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -174,17 +174,17 @@ func newTestStore(t testing.TB, opts ...testStoreOption) *Storage { { Reader: bytes.NewReader(caCert.Bytes), ContainerFilePath: "/tls/ca.crt", - FileMode: 0o644, + FileMode: 0o600, }, { Reader: bytes.NewReader(serverCert.Bytes), ContainerFilePath: "/tls/server.crt", - FileMode: 0o644, + FileMode: 0o600, }, { Reader: bytes.NewReader(serverCert.KeyBytes), ContainerFilePath: "/tls/server.key", - FileMode: 0o644, + FileMode: 0o600, }, }, Cmd: cmds, From 2231b313bdc8ee67ceb2ded235ad10c6c4755800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 16 Apr 2025 20:46:38 +0200 Subject: [PATCH 029/168] chore: rename variable --- redis/redis_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/redis/redis_test.go b/redis/redis_test.go index b2d9e1ec..092a05c1 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -33,7 +33,7 @@ type testStoreSettings struct { // TLS settings withSecureURL bool - withMTLSdisabled bool + withMTLSDisabled bool withTLS bool } @@ -55,7 +55,7 @@ func withTLS(secureURL bool, mtlsDisabled bool) testStoreOption { return func(o *testStoreSettings) { o.withTLS = true o.withSecureURL = secureURL - o.withMTLSdisabled = mtlsDisabled + o.withMTLSDisabled = mtlsDisabled } } @@ -159,7 +159,7 @@ func newTestStore(t testing.TB, opts ...testStoreOption) *Storage { "--tls-auth-clients", "yes", } - if settings.withMTLSdisabled { + if settings.withMTLSDisabled { cmds = append(cmds, "--tls-auth-clients", "no") } From 320a25050241e62e33a40dc4f70730e616b3a8f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 16 Apr 2025 20:46:50 +0200 Subject: [PATCH 030/168] fix: typo --- redis/redis_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redis/redis_test.go b/redis/redis_test.go index 092a05c1..15481dbb 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -70,7 +70,7 @@ func withURL(useContainerURI bool) testStoreOption { } } -// createTLSCerts creates a CA certificate, a client certificate and a nats certificate, +// createTLSCerts creates a CA certificate, a client certificate and a Redis certificate, // storing them in the given temporary directory. func createTLSCerts(t testing.TB) (*tlscert.Certificate, *tlscert.Certificate, *tlscert.Certificate) { t.Helper() From 0e05d2d54e9a5a7aaa8d0c1d6e16f51b6944d05a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 16 Apr 2025 20:47:28 +0200 Subject: [PATCH 031/168] fix: typo in tests name --- redis/redis_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redis/redis_test.go b/redis/redis_test.go index 15481dbb..b58965c5 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -401,7 +401,7 @@ func Test_Redis_Conn(t *testing.T) { require.True(t, testStore.Conn() != nil) } -func Test_Redis_Initalize_WithHostPort(t *testing.T) { +func Test_Redis_Initialize_WithHostPort(t *testing.T) { var ( key = "clark" val = []byte("kent") @@ -421,7 +421,7 @@ func Test_Redis_Initalize_WithHostPort(t *testing.T) { require.NoError(t, err) } -func Test_Redis_Initalize_WithURL_TLS_Verify(t *testing.T) { +func Test_Redis_Initialize_WithURL_TLS_Verify(t *testing.T) { testFn := func(secureURL bool, mtlsDisabled bool) { testStore := newTestStore(t, withTLS(secureURL, mtlsDisabled)) defer testStore.Close() From 568731855714ab8e0859e88fd7607a288f30d953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Thu, 17 Apr 2025 00:10:17 +0200 Subject: [PATCH 032/168] Revert "chore: change file permissions" This reverts commit 06e9b1f5780a0ca905dd2298a3555f3528743032. --- redis/redis_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/redis/redis_test.go b/redis/redis_test.go index b58965c5..012fa897 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -174,17 +174,17 @@ func newTestStore(t testing.TB, opts ...testStoreOption) *Storage { { Reader: bytes.NewReader(caCert.Bytes), ContainerFilePath: "/tls/ca.crt", - FileMode: 0o600, + FileMode: 0o644, }, { Reader: bytes.NewReader(serverCert.Bytes), ContainerFilePath: "/tls/server.crt", - FileMode: 0o600, + FileMode: 0o644, }, { Reader: bytes.NewReader(serverCert.KeyBytes), ContainerFilePath: "/tls/server.key", - FileMode: 0o600, + FileMode: 0o644, }, }, Cmd: cmds, From 63cf32031d1c8b699edb8e302bec59f437deb10b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 07:25:37 +0000 Subject: [PATCH 033/168] chore(deps): bump github.com/aws/smithy-go from 1.22.2 to 1.22.3 in /s3 Bumps [github.com/aws/smithy-go](https://github.com/aws/smithy-go) from 1.22.2 to 1.22.3. - [Release notes](https://github.com/aws/smithy-go/releases) - [Changelog](https://github.com/aws/smithy-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/aws/smithy-go/compare/v1.22.2...v1.22.3) --- updated-dependencies: - dependency-name: github.com/aws/smithy-go dependency-version: 1.22.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- s3/go.mod | 2 +- s3/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/s3/go.mod b/s3/go.mod index 332d51be..6a2223b6 100644 --- a/s3/go.mod +++ b/s3/go.mod @@ -8,7 +8,7 @@ require ( github.com/aws/aws-sdk-go-v2/credentials v1.17.67 github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.10 github.com/aws/aws-sdk-go-v2/service/s3 v1.58.3 - github.com/aws/smithy-go v1.22.2 + github.com/aws/smithy-go v1.22.3 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.36.0 github.com/testcontainers/testcontainers-go/modules/minio v0.36.0 diff --git a/s3/go.sum b/s3/go.sum index 55ef1728..8a52e175 100644 --- a/s3/go.sum +++ b/s3/go.sum @@ -42,8 +42,8 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 h1:hXmVKytPfTy5axZ+fYbR5d0c github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1/go.mod h1:MlYRNmYu/fGPoxBQVvBYr9nyr948aY/WLUvwBMBJubs= github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 h1:1XuUZ8mYJw9B6lzAkXhqHlJd/XvaX32evhproijJEZY= github.com/aws/aws-sdk-go-v2/service/sts v1.33.19/go.mod h1:cQnB8CUnxbMU82JvlqjKR2HBOm3fe9pWorWBza6MBJ4= -github.com/aws/smithy-go v1.22.2 h1:6D9hW43xKFrRx/tXXfAlIZc4JI+yQe6snnWcQyxSyLQ= -github.com/aws/smithy-go v1.22.2/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/aws/smithy-go v1.22.3 h1:Z//5NuZCSW6R4PhQ93hShNbyBbn8BWCmCVCt+Q8Io5k= +github.com/aws/smithy-go v1.22.3/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= From bc8ed05b291552c37541144390b92674ffe98d20 Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez <835733+gaby@users.noreply.github.com> Date: Thu, 17 Apr 2025 07:25:30 -0400 Subject: [PATCH 034/168] Update benchmark.yml --- .github/workflows/benchmark.yml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index ebf60722..3c820220 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -99,18 +99,6 @@ jobs: --env ETCD_ADVERTISE_CLIENT_URLS=http://etcd-server:2379 \ bitnami/etcd:latest - - name: Install ScyllaDb - if: ${{ matrix.package == 'scylladb' }} - run: | - docker run --name scylladb -p 9042:9042 -p 19042:19042 -p 9160:9160 -p 7000:7000 -p 7001:7001 -p 7199:7199 -p 9180:9180 -d scylladb/scylla:latest --broadcast-address 127.0.0.1 --listen-address 0.0.0.0 --broadcast-rpc-address 127.0.0.1 - sleep 15 - - - name: Install SurrealDB - if: ${{ matrix.package == 'surrealdb' }} - run: | - docker run --name surrealdb -p 8000:8000 -d surrealdb/surrealdb:latest start --user root --pass root - sleep 30 - - name: Setup Redis if: ${{ matrix.package == 'redis' || matrix.package == 'rueidis' }} uses: shogo82148/actions-setup-redis@v1 @@ -166,4 +154,4 @@ jobs: auto-push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} save-data-file: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} - \ No newline at end of file + From 9e4c7d82da5954fbacd7c67a22aef416eac16207 Mon Sep 17 00:00:00 2001 From: Sepehr Mohaghegh Date: Fri, 18 Apr 2025 22:02:48 +0330 Subject: [PATCH 035/168] Add NewFromConnection method and benchmarks Introduced NewFromConnection to create Storage using an existing Redis client, enhancing flexibility. Added benchmarks to test Redis operations with this method. --- redis/redis.go | 7 +++++++ redis/redis_test.go | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/redis/redis.go b/redis/redis.go index 3969dc4d..1f8ee288 100644 --- a/redis/redis.go +++ b/redis/redis.go @@ -13,6 +13,13 @@ type Storage struct { db redis.UniversalClient } +// NewFromConnection creates a new instance of Storage using the provided Redis universal client. +func NewFromConnection(conn redis.UniversalClient) *Storage { + return &Storage{ + db: conn, + } +} + // New creates a new Redis storage instance. func New(config ...Config) *Storage { // Set default config diff --git a/redis/redis_test.go b/redis/redis_test.go index 96beaa5e..a65ad1d2 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -539,3 +539,40 @@ func Benchmark_Redis_SetAndDelete(b *testing.B) { require.NoError(b, err) } + +func Benchmark_Redis_WithConnection_SetAndDelete(b *testing.B) { + connection := New(Config{ + Reset: true, + }) + + testStore := NewFromConnection(connection.Conn()) + b.ReportAllocs() + b.ResetTimer() + + var err error + for i := 0; i < b.N; i++ { + _ = testStore.Set("john", []byte("doe"), 0) + err = testStore.Delete("john") + } + + require.NoError(b, err) +} + +func Benchmark_Redis_WithConnection_Get(b *testing.B) { + connection := New(Config{ + Reset: true, + }) + + testStore := NewFromConnection(connection.Conn()) + err := testStore.Set("john", []byte("doe"), 0) + require.NoError(b, err) + + b.ReportAllocs() + b.ResetTimer() + + for i := 0; i < b.N; i++ { + _, err = testStore.Get("john") + } + + require.NoError(b, err) +} From 84e2c128483fa4b2ca82e33a9f941c7c67198a80 Mon Sep 17 00:00:00 2001 From: Sepehr Mohaghegh Date: Fri, 18 Apr 2025 22:08:51 +0330 Subject: [PATCH 036/168] Add NewFromConnection function to Redis README Updated the Redis README to include the NewFromConnection function, which allows creating a Storage object from an existing Redis client connection. --- redis/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/redis/README.md b/redis/README.md index 17354d8c..b12d10c6 100644 --- a/redis/README.md +++ b/redis/README.md @@ -21,6 +21,7 @@ A Redis storage driver using [go-redis/redis](https://github.com/go-redis/redis) ### Signatures ```go func New(config ...Config) Storage +func NewFromConnection(conn redis.UniversalClient) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error From 6d5a45d959f0bd0bc6ea1b3f9f4dd2de59ee1088 Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Sat, 19 Apr 2025 13:06:57 +0530 Subject: [PATCH 037/168] Updated Testcases --- cassandra/cassandra_test.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cassandra/cassandra_test.go b/cassandra/cassandra_test.go index fd96cd8b..7e4e51de 100644 --- a/cassandra/cassandra_test.go +++ b/cassandra/cassandra_test.go @@ -288,8 +288,6 @@ func testConcurrentAccess(t *testing.T, store *Storage) { } func Benchmark_Cassandra_Set(b *testing.B) { - b.ReportAllocs() - b.ResetTimer() connectionURL := newTestStore(b) @@ -301,6 +299,9 @@ func Benchmark_Cassandra_Set(b *testing.B) { }) defer store.Close() + b.ReportAllocs() + b.ResetTimer() + var err error for i := 0; i < b.N; i++ { err = store.Set("john", []byte("doe"), 0) @@ -310,8 +311,6 @@ func Benchmark_Cassandra_Set(b *testing.B) { } func Benchmark_Cassandra_Get(b *testing.B) { - b.ReportAllocs() - b.ResetTimer() connectionURL := newTestStore(b) @@ -323,6 +322,9 @@ func Benchmark_Cassandra_Get(b *testing.B) { }) defer client.Close() + b.ReportAllocs() + b.ResetTimer() + err := client.Set("john", []byte("doe"), 0) for i := 0; i < b.N; i++ { @@ -333,8 +335,6 @@ func Benchmark_Cassandra_Get(b *testing.B) { } func Benchmark_Cassandra_Set_And_Delete(b *testing.B) { - b.ReportAllocs() - b.ResetTimer() connectionURL := newTestStore(b) @@ -346,6 +346,9 @@ func Benchmark_Cassandra_Set_And_Delete(b *testing.B) { }) defer client.Close() + b.ReportAllocs() + b.ResetTimer() + var err error for i := 0; i < b.N; i++ { _ = client.Set("john", []byte("doe"), 0) From bd94f1334020774a874b031271efbfd817c9e378 Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Sun, 20 Apr 2025 11:29:57 +0530 Subject: [PATCH 038/168] Updated Testcases seprate containers --- cassandra/cassandra_test.go | 53 ++++++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/cassandra/cassandra_test.go b/cassandra/cassandra_test.go index 7e4e51de..21d6e9a4 100644 --- a/cassandra/cassandra_test.go +++ b/cassandra/cassandra_test.go @@ -48,37 +48,64 @@ func newTestStore(t testing.TB) string { // TestCassandraStorage tests the Cassandra storage implementation func TestCassandraStorage(t *testing.T) { - - // Start Cassandra container - connectionURL := newTestStore(t) - - // Create new storage - store := New(Config{ - Hosts: []string{connectionURL}, - Keyspace: "test_keyspace_creation", - Table: "test_kv", - Expiration: 5 * time.Second, // Short default TTL for testing - }) - defer store.Close() - // Test cases t.Run("KeyspaceCreation", func(t *testing.T) { + connectionURL := newTestStore(t) + store := New(Config{ + Hosts: []string{connectionURL}, + Keyspace: "test_keyspace_creation", + Table: "test_kv", + Expiration: 5 * time.Second, + }) + defer store.Close() testKeyspaceCreation(t, connectionURL, store) }) t.Run("BasicOperations", func(t *testing.T) { + connectionURL := newTestStore(t) + store := New(Config{ + Hosts: []string{connectionURL}, + Keyspace: "test_basic_ops", + Table: "test_kv", + Expiration: 5 * time.Second, + }) + defer store.Close() testBasicOperations(t, store) }) t.Run("ExpirableKeys", func(t *testing.T) { + connectionURL := newTestStore(t) + store := New(Config{ + Hosts: []string{connectionURL}, + Keyspace: "test_expirable", + Table: "test_kv", + Expiration: 5 * time.Second, + }) + defer store.Close() testExpirableKeys(t, store) }) t.Run("ConcurrentAccess", func(t *testing.T) { + connectionURL := newTestStore(t) + store := New(Config{ + Hosts: []string{connectionURL}, + Keyspace: "test_concurrent", + Table: "test_kv", + Expiration: 5 * time.Second, + }) + defer store.Close() testConcurrentAccess(t, store) }) t.Run("Reset", func(t *testing.T) { + connectionURL := newTestStore(t) + store := New(Config{ + Hosts: []string{connectionURL}, + Keyspace: "test_reset", + Table: "test_kv", + Expiration: 5 * time.Second, + }) + defer store.Close() testReset(t, connectionURL, store) }) } From 40586cc9df018189ff789a4793a0a40d06ab2e9c Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Sun, 20 Apr 2025 12:16:35 +0530 Subject: [PATCH 039/168] Refactor and optimize code --- cassandra/README.md | 2 +- cassandra/cassandra.go | 58 +++++++++++----- cassandra/cassandra_test.go | 133 +++++++++++++++++++++++++----------- cassandra/config.go | 5 +- 4 files changed, 140 insertions(+), 58 deletions(-) diff --git a/cassandra/README.md b/cassandra/README.md index b68699d7..a4412cb4 100644 --- a/cassandra/README.md +++ b/cassandra/README.md @@ -23,7 +23,7 @@ func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error -func (s *Storage) Conn() *Session +func (s *Storage) Conn() *gocql.Session ``` ### Installation diff --git a/cassandra/cassandra.go b/cassandra/cassandra.go index fc61adc9..4cd5ea65 100644 --- a/cassandra/cassandra.go +++ b/cassandra/cassandra.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" "log" + "regexp" "time" "github.com/gocql/gocql" @@ -18,48 +19,68 @@ type Storage struct { ttl int } -// New creates a new Cassandra storage instance -func New(cnfg Config) *Storage { +var ( + // identifierPattern matches valid Cassandra identifiers + identifierPattern = regexp.MustCompile(`^[a-zA-Z0-9_]+$`) +) +// validateIdentifier checks if an identifier is valid +func validateIdentifier(name, field string) (string, error) { + if !identifierPattern.MatchString(name) { + return "", fmt.Errorf("invalid %s name: must contain only alphanumeric characters and underscores", field) + } + return name, nil +} + +// New creates a new Cassandra storage instance +func New(cnfg Config) (*Storage, error) { // Default config cfg := configDefault(cnfg) + // Validate and escape identifiers + keyspace, err := validateIdentifier(cfg.Keyspace, "keyspace") + if err != nil { + return nil, err + } + table, err := validateIdentifier(cfg.Table, "table") + if err != nil { + return nil, err + } + // Create cluster config cluster := gocql.NewCluster(cfg.Hosts...) cluster.Consistency = cfg.Consistency - // Don't set keyspace initially - we need to create it first - // We'll connect to system keyspace first - // Convert expiration to seconds for TTL ttl := 0 if cfg.Expiration > 0 { ttl = int(cfg.Expiration.Seconds()) + } else if cfg.Expiration < 0 { + // Expiration < 0 means indefinite storage + cfg.Expiration = 0 } // Create storage instance storage := &Storage{ cluster: cluster, - keyspace: cfg.Keyspace, - table: cfg.Table, + keyspace: keyspace, + table: table, ttl: ttl, } // Initialize keyspace if err := storage.createOrVerifyKeySpace(cfg.Reset); err != nil { - log.Printf("Failed to initialize keyspace: %v", err) - panic(err) + return nil, fmt.Errorf("cassandra storage init: %w", err) } - return storage + return storage, nil } // createOrVerifyKeySpace ensures the keyspace and table exist with proper keyspace func (s *Storage) createOrVerifyKeySpace(reset bool) error { - // Connect to system keyspace first to create our keyspace if needed - systemCluster := gocql.NewCluster(s.cluster.Hosts...) - systemCluster.Consistency = s.cluster.Consistency - systemCluster.Timeout = s.cluster.Timeout + // Clone the original cluster config and set system keyspace + systemCluster := *s.cluster + systemCluster.Keyspace = "system" // Connect to the system keyspace systemSession, err := systemCluster.CreateSession() @@ -153,7 +174,7 @@ func (s *Storage) dropTables() error { func (s *Storage) Set(key string, value []byte, exp time.Duration) error { // Calculate expiration time var expiresAt *time.Time - var ttl = -1 // Default to no TTL + var ttl int if exp > 0 { // Specific expiration provided @@ -166,7 +187,7 @@ func (s *Storage) Set(key string, value []byte, exp time.Duration) error { t := time.Now().Add(time.Duration(s.ttl) * time.Second) expiresAt = &t } - // If exp < 0, we'll use no TTL (indefinite storage) + // If exp == 0 and s.ttl == 0, no TTL will be set (live forever) // Insert with TTL if specified var query string @@ -219,6 +240,11 @@ func (s *Storage) Reset() error { return s.session.Query(query).Exec() } +// Conn returns the underlying gocql session. +func (s *Storage) Conn() *gocql.Session { + return s.session +} + // Close closes the storage connection func (s *Storage) Close() { if s.session != nil { diff --git a/cassandra/cassandra_test.go b/cassandra/cassandra_test.go index 21d6e9a4..26705f9a 100644 --- a/cassandra/cassandra_test.go +++ b/cassandra/cassandra_test.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "os" + "sync" "testing" "time" @@ -51,63 +52,72 @@ func TestCassandraStorage(t *testing.T) { // Test cases t.Run("KeyspaceCreation", func(t *testing.T) { connectionURL := newTestStore(t) - store := New(Config{ + store, err := New(Config{ Hosts: []string{connectionURL}, Keyspace: "test_keyspace_creation", Table: "test_kv", Expiration: 5 * time.Second, }) + require.NoError(t, err) defer store.Close() testKeyspaceCreation(t, connectionURL, store) }) t.Run("BasicOperations", func(t *testing.T) { connectionURL := newTestStore(t) - store := New(Config{ + store, err := New(Config{ Hosts: []string{connectionURL}, Keyspace: "test_basic_ops", Table: "test_kv", Expiration: 5 * time.Second, }) + require.NoError(t, err) defer store.Close() testBasicOperations(t, store) }) t.Run("ExpirableKeys", func(t *testing.T) { connectionURL := newTestStore(t) - store := New(Config{ + store, err := New(Config{ Hosts: []string{connectionURL}, Keyspace: "test_expirable", Table: "test_kv", Expiration: 5 * time.Second, }) + require.NoError(t, err) defer store.Close() testExpirableKeys(t, store) }) t.Run("ConcurrentAccess", func(t *testing.T) { connectionURL := newTestStore(t) - store := New(Config{ + store, err := New(Config{ Hosts: []string{connectionURL}, Keyspace: "test_concurrent", Table: "test_kv", Expiration: 5 * time.Second, }) + require.NoError(t, err) defer store.Close() testConcurrentAccess(t, store) }) t.Run("Reset", func(t *testing.T) { connectionURL := newTestStore(t) - store := New(Config{ + store, err := New(Config{ Hosts: []string{connectionURL}, Keyspace: "test_reset", Table: "test_kv", Expiration: 5 * time.Second, }) + require.NoError(t, err) defer store.Close() testReset(t, connectionURL, store) }) + + t.Run("IdentifierValidation", func(t *testing.T) { + testIdentifierValidation(t) + }) } // testKeyspaceCreation tests the keyspace creation functionality. @@ -171,7 +181,6 @@ func testBasicOperations(t *testing.T, store *Storage) { // testExpirableKeys tests the expirable keys functionality. func testExpirableKeys(t *testing.T, store *Storage) { - // Set keys with different expiration settings // Key with default TTL (exp = 0 means use default) err := store.Set("key_default_ttl", []byte("value1"), 0) @@ -199,37 +208,37 @@ func testExpirableKeys(t *testing.T, store *Storage) { require.Equal(t, []byte("value3"), value) // Wait for specific TTL to expire - time.Sleep(1500 * time.Millisecond) - - // Specific TTL key should be gone, others should remain - value, err = store.Get("key_specific_ttl") - require.NoError(t, err) - require.Nil(t, value, "Key with 1s TTL should have expired") + require.Eventually(t, func() bool { + v, _ := store.Get("key_specific_ttl") + return v == nil + }, 3*time.Second, 100*time.Millisecond, + "Key with 1s TTL should have expired") + // Default TTL key should still exist value, err = store.Get("key_default_ttl") require.NoError(t, err) require.Equal(t, []byte("value1"), value, "Key with default TTL should still exist") + // No TTL key should still exist value, err = store.Get("key_no_ttl") require.NoError(t, err) require.Equal(t, []byte("value3"), value, "Key with no TTL should still exist") // Wait for default TTL to expire - time.Sleep(4 * time.Second) - - // Default TTL key should be gone, no TTL key should remain - value, err = store.Get("key_default_ttl") - require.NoError(t, err) - require.Nil(t, value, "Key with default TTL should have expired") + require.Eventually(t, func() bool { + v, _ := store.Get("key_default_ttl") + return v == nil + }, 6*time.Second, 100*time.Millisecond, + "Key with default TTL should have expired") + // No TTL key should still exist value, err = store.Get("key_no_ttl") require.NoError(t, err) require.Equal(t, []byte("value3"), value, "Key with no TTL should still exist") } -// / testReset tests the Reset method. +// testReset tests the Reset method. func testReset(t *testing.T, connectionURL string, store *Storage) { - // Set some keys err := store.Set("key1", []byte("value1"), 0) require.NoError(t, err) @@ -255,35 +264,40 @@ func testReset(t *testing.T, connectionURL string, store *Storage) { require.NoError(t, err) require.Nil(t, value, "Key should be deleted after reset") + // Close the first store before creating a new one + store.Close() + // Create new storage with Reset flag - store = New(Config{ + newStore, err := New(Config{ Hosts: []string{connectionURL}, Keyspace: "test_reset", Table: "test_kv", Reset: true, }) - defer store.Close() + require.NoError(t, err) + defer newStore.Close() // Set a key - err = store.Set("key3", []byte("value3"), 0) + err = newStore.Set("key3", []byte("value3"), 0) require.NoError(t, err) // Verify key exists - value, err = store.Get("key3") + value, err = newStore.Get("key3") require.NoError(t, err) require.Equal(t, []byte("value3"), value) } // testConcurrentAccess tests concurrent access to the storage. func testConcurrentAccess(t *testing.T, store *Storage) { - // Number of goroutines const concurrentOps = 10 - done := make(chan bool, concurrentOps) + var wg sync.WaitGroup + wg.Add(concurrentOps) // Run concurrent operations for i := 0; i < concurrentOps; i++ { go func(id int) { + defer wg.Done() // Set key key := fmt.Sprintf("key%d", id) value := []byte(fmt.Sprintf("value%d", id)) @@ -303,33 +317,28 @@ func testConcurrentAccess(t *testing.T, store *Storage) { retrievedValue, err = store.Get(key) require.NoError(t, err) require.Nil(t, retrievedValue) - - done <- true }(i) } // Wait for all goroutines to complete - for i := 0; i < concurrentOps; i++ { - <-done - } + wg.Wait() } func Benchmark_Cassandra_Set(b *testing.B) { - connectionURL := newTestStore(b) // Create new storage - store := New(Config{ + store, err := New(Config{ Hosts: []string{connectionURL}, Keyspace: "test_concurrent", Table: "test_kv", }) + require.NoError(b, err) defer store.Close() b.ReportAllocs() b.ResetTimer() - var err error for i := 0; i < b.N; i++ { err = store.Set("john", []byte("doe"), 0) } @@ -338,21 +347,22 @@ func Benchmark_Cassandra_Set(b *testing.B) { } func Benchmark_Cassandra_Get(b *testing.B) { - connectionURL := newTestStore(b) // Create new storage - client := New(Config{ + client, err := New(Config{ Hosts: []string{connectionURL}, Keyspace: "test_concurrent", Table: "test_kv", }) + require.NoError(b, err) defer client.Close() b.ReportAllocs() b.ResetTimer() - err := client.Set("john", []byte("doe"), 0) + err = client.Set("john", []byte("doe"), 0) + require.NoError(b, err) for i := 0; i < b.N; i++ { _, err = client.Get("john") @@ -362,21 +372,20 @@ func Benchmark_Cassandra_Get(b *testing.B) { } func Benchmark_Cassandra_Set_And_Delete(b *testing.B) { - connectionURL := newTestStore(b) // Create new storage - client := New(Config{ + client, err := New(Config{ Hosts: []string{connectionURL}, Keyspace: "test_concurrent", Table: "test_kv", }) + require.NoError(b, err) defer client.Close() b.ReportAllocs() b.ResetTimer() - var err error for i := 0; i < b.N; i++ { _ = client.Set("john", []byte("doe"), 0) err = client.Delete("john") @@ -384,3 +393,47 @@ func Benchmark_Cassandra_Set_And_Delete(b *testing.B) { require.NoError(b, err) } + +// testIdentifierValidation tests the validateIdentifier function +func testIdentifierValidation(t *testing.T) { + // Test valid identifiers + validCases := []string{ + "test", + "test123", + "test_123", + "TEST", + "Test123", + "test_table", + } + + for _, tc := range validCases { + t.Run(fmt.Sprintf("valid_%s", tc), func(t *testing.T) { + result, err := validateIdentifier(tc, "test") + require.NoError(t, err) + require.Equal(t, tc, result) + }) + } + + // Test invalid identifiers + invalidCases := []struct { + name string + value string + }{ + {"empty", ""}, + {"space", "test table"}, + {"hyphen", "test-table"}, + {"dot", "test.table"}, + {"quote", `test"table`}, + {"semicolon", "test;table"}, + {"sql_injection", `test"; DROP KEYSPACE prod; --`}, + {"unicode", "test表"}, + } + + for _, tc := range invalidCases { + t.Run(fmt.Sprintf("invalid_%s", tc.name), func(t *testing.T) { + _, err := validateIdentifier(tc.value, "test") + require.Error(t, err) + require.Contains(t, err.Error(), "invalid test name") + }) + } +} diff --git a/cassandra/config.go b/cassandra/config.go index 3fd122a1..c6db983c 100644 --- a/cassandra/config.go +++ b/cassandra/config.go @@ -38,7 +38,7 @@ var ConfigDefault = Config{ Expiration: 10 * time.Minute, } -// ConfigDefault is the Helper function to apply default config +// configDefault applies `ConfigDefault` values to a user‑supplied Config. func configDefault(config ...Config) Config { // Return default config if nothing provided if len(config) < 1 { @@ -67,6 +67,9 @@ func configDefault(config ...Config) Config { if cfg.Expiration == 0 { cfg.Expiration = ConfigDefault.Expiration + } else if cfg.Expiration < 0 { + // Disallow negative expirations – they produce invalid TTLs. + cfg.Expiration = 0 } return cfg From 46aa8dbd7c797bcd0f432c8f3de262e5e0a6cb38 Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Sun, 20 Apr 2025 12:45:21 +0530 Subject: [PATCH 040/168] Fixed CSQL Prepared statement issues and nitpicks --- cassandra/README.md | 50 +++++++++---------- cassandra/cassandra.go | 98 +++++++++++++++++++++++++++++-------- cassandra/cassandra_test.go | 26 +++++----- cassandra/go.mod | 4 +- cassandra/go.sum | 6 +++ 5 files changed, 125 insertions(+), 59 deletions(-) diff --git a/cassandra/README.md b/cassandra/README.md index a4412cb4..ff1524ba 100644 --- a/cassandra/README.md +++ b/cassandra/README.md @@ -52,7 +52,7 @@ To start Cassandra using Docker, issue the following: docker run --name cassandra --network host -d cassandra:latest ``` -After running this command you're ready to start using the storage and connecting to the database. +After running this command, you're ready to start using the storage and connecting to the database. ### Examples @@ -75,24 +75,24 @@ store := New(Config{ ```go // Config defines the configuration options for the Cassandra storage type Config struct { - // Optional. Default is localhost - // Hosts is a list of Cassandra nodes to connect to. - Hosts []string - // Optional. Default is gofiber - // Keyspace is the name of the Cassandra keyspace to use. - Keyspace string - // Optional. Default is kv_store - // Table is the name of the Cassandra table to use. - Table string - // Optional. Default is Quorum - // Consistency is the Cassandra consistency level. - Consistency gocql.Consistency - // Optional. Default is 10 minutes - // Expiration is the time after which an entry is considered expired. - Expiration time.Duration - // Optional. Default is false - // Reset is a flag to reset the database. - Reset bool + // Optional. Default is localhost + // Hosts is a list of Cassandra nodes to connect to. + Hosts []string + // Optional. Default is gofiber + // Keyspace is the name of the Cassandra keyspace to use. + Keyspace string + // Optional. Default is kv_store + // Table is the name of the Cassandra table to use. + Table string + // Optional. Default is Quorum + // Consistency is the Cassandra consistency level. + Consistency gocql.Consistency + // Optional. Default is 10 minutes + // Expiration is the time after which an entry is considered expired. + Expiration time.Duration + // Optional. Default is false + // Reset is a flag to reset the database. + Reset bool } ``` @@ -100,11 +100,11 @@ type Config struct { ```go var ConfigDefault = Config{ - Hosts: []string{"localhost:9042"}, - Keyspace: "gofiber", - Table: "kv_store", - Consistency: gocql.Quorum, - Reset: false, - Expiration: 10 * time.Minute, + Hosts: []string{"localhost:9042"}, + Keyspace: "gofiber", + Table: "kv_store", + Consistency: gocql.Quorum, + Reset: false, + Expiration: 10 * time.Minute, } ``` diff --git a/cassandra/cassandra.go b/cassandra/cassandra.go index 4cd5ea65..e7f28360 100644 --- a/cassandra/cassandra.go +++ b/cassandra/cassandra.go @@ -5,15 +5,20 @@ import ( "fmt" "log" "regexp" + "strings" "time" + "unicode" "github.com/gocql/gocql" + "github.com/scylladb/gocqlx/v2" + "github.com/scylladb/gocqlx/v2/qb" ) // Storage represents a Cassandra storage implementation type Storage struct { cluster *gocql.ClusterConfig session *gocql.Session + sx gocqlx.Session keyspace string table string ttl int @@ -25,10 +30,34 @@ var ( ) // validateIdentifier checks if an identifier is valid -func validateIdentifier(name, field string) (string, error) { - if !identifierPattern.MatchString(name) { - return "", fmt.Errorf("invalid %s name: must contain only alphanumeric characters and underscores", field) +func validateIdentifier(name, identifierType string) (string, error) { + if name == "" { + return "", fmt.Errorf("invalid %s name: cannot be empty", identifierType) } + + // Check for invalid characters + if strings.ContainsAny(name, " \t\n\r\f\v") { + return "", fmt.Errorf("invalid %s name: cannot contain whitespace", identifierType) + } + + // Check for SQL injection attempts + if strings.ContainsAny(name, ";'\"") { + return "", fmt.Errorf("invalid %s name: cannot contain special characters", identifierType) + } + + // Check for unicode characters + for _, r := range name { + if r > unicode.MaxASCII { + return "", fmt.Errorf("invalid %s name: cannot contain unicode characters", identifierType) + } + } + + // If the identifier contains any special characters or is case-sensitive, + // wrap it in double quotes + if strings.ContainsAny(name, "-.") || strings.ToLower(name) != name { + return `"` + name + `"`, nil + } + return name, nil } @@ -102,6 +131,7 @@ func (s *Storage) createOrVerifyKeySpace(reset bool) error { return fmt.Errorf("failed to connect to keyspace %s: %w", s.keyspace, err) } s.session = session + s.sx = gocqlx.NewSession(session) // Drop tables if reset is requested if reset { @@ -146,6 +176,7 @@ func (s *Storage) ensureKeyspace(systemSession *gocql.Session) error { // createDataTable creates the data table for key-value storage func (s *Storage) createDataTable() error { + // Create table with proper escaping query := fmt.Sprintf(` CREATE TABLE IF NOT EXISTS %s.%s ( key text PRIMARY KEY, @@ -154,22 +185,29 @@ func (s *Storage) createDataTable() error { ) `, s.keyspace, s.table) + // Execute the query return s.session.Query(query).Exec() } // dropTables drops existing tables for reset func (s *Storage) dropTables() error { - // Drop data table + // Drop data table with proper escaping query := fmt.Sprintf("DROP TABLE IF EXISTS %s.%s", s.keyspace, s.table) if err := s.session.Query(query).Exec(); err != nil { return err } - // Drop schema_info table + // Drop schema_info table with proper escaping query = fmt.Sprintf("DROP TABLE IF EXISTS %s.schema_info", s.keyspace) return s.session.Query(query).Exec() } +// queryResult holds the result of a SELECT query +type queryResult struct { + Value []byte `db:"value"` + ExpiresAt time.Time `db:"expires_at"` +} + // Set stores a key-value pair with optional expiration func (s *Storage) Set(key string, value []byte, exp time.Duration) error { // Calculate expiration time @@ -189,26 +227,36 @@ func (s *Storage) Set(key string, value []byte, exp time.Duration) error { } // If exp == 0 and s.ttl == 0, no TTL will be set (live forever) - // Insert with TTL if specified - var query string + // Use query builder for insert + stmt, names := qb.Insert(fmt.Sprintf("%s.%s", s.keyspace, s.table)). + Columns("key", "value", "expires_at"). + ToCql() + if ttl > 0 { - query = fmt.Sprintf("INSERT INTO %s.%s (key, value, expires_at) VALUES (?, ?, ?) USING TTL %d", - s.keyspace, s.table, ttl) - } else { - query = fmt.Sprintf("INSERT INTO %s.%s (key, value, expires_at) VALUES (?, ?, ?)", - s.keyspace, s.table) + stmt += fmt.Sprintf(" USING TTL %d", ttl) } - return s.session.Query(query, key, value, expiresAt).Exec() + // Use gocqlx session + return s.sx.Query(stmt, names).BindMap(map[string]interface{}{ + "key": key, + "value": value, + "expires_at": expiresAt, + }).ExecRelease() } // Get retrieves a value by key func (s *Storage) Get(key string) ([]byte, error) { - var value []byte - var expiresAt time.Time + // Use query builder for select + stmt, names := qb.Select(fmt.Sprintf("%s.%s", s.keyspace, s.table)). + Columns("value", "expires_at"). + Where(qb.Eq("key")). + ToCql() - query := fmt.Sprintf("SELECT value, expires_at FROM %s.%s WHERE key = ?", s.keyspace, s.table) - if err := s.session.Query(query, key).Scan(&value, &expiresAt); err != nil { + var result queryResult + // Use gocqlx session + if err := s.sx.Query(stmt, names).BindMap(map[string]interface{}{ + "key": key, + }).GetRelease(&result); err != nil { if errors.Is(err, gocql.ErrNotFound) { return nil, nil } @@ -216,7 +264,7 @@ func (s *Storage) Get(key string) ([]byte, error) { } // Check if expired (as a backup in case TTL didn't work) - if !expiresAt.IsZero() && expiresAt.Before(time.Now()) { + if !result.ExpiresAt.IsZero() && result.ExpiresAt.Before(time.Now()) { // Expired but not yet removed by TTL err := s.Delete(key) if err != nil { @@ -225,17 +273,25 @@ func (s *Storage) Get(key string) ([]byte, error) { return nil, nil } - return value, nil + return result.Value, nil } // Delete removes a key from storage func (s *Storage) Delete(key string) error { - query := fmt.Sprintf("DELETE FROM %s.%s WHERE key = ?", s.keyspace, s.table) - return s.session.Query(query, key).Exec() + // Use query builder for delete + stmt, names := qb.Delete(fmt.Sprintf("%s.%s", s.keyspace, s.table)). + Where(qb.Eq("key")). + ToCql() + + // Use gocqlx session + return s.sx.Query(stmt, names).BindMap(map[string]interface{}{ + "key": key, + }).ExecRelease() } // Reset clears all keys from storage func (s *Storage) Reset() error { + // Use proper escaping for table name query := fmt.Sprintf("TRUNCATE TABLE %s.%s", s.keyspace, s.table) return s.session.Query(query).Exec() } diff --git a/cassandra/cassandra_test.go b/cassandra/cassandra_test.go index 26705f9a..3dc1032c 100644 --- a/cassandra/cassandra_test.go +++ b/cassandra/cassandra_test.go @@ -397,20 +397,24 @@ func Benchmark_Cassandra_Set_And_Delete(b *testing.B) { // testIdentifierValidation tests the validateIdentifier function func testIdentifierValidation(t *testing.T) { // Test valid identifiers - validCases := []string{ - "test", - "test123", - "test_123", - "TEST", - "Test123", - "test_table", + validCases := []struct { + name string + expected string + }{ + {"test", "test"}, + {"test123", "test123"}, + {"test_123", "test_123"}, + {"TEST", `"TEST"`}, + {"Test123", `"Test123"`}, + {"test-table", `"test-table"`}, + {"test.table", `"test.table"`}, } for _, tc := range validCases { - t.Run(fmt.Sprintf("valid_%s", tc), func(t *testing.T) { - result, err := validateIdentifier(tc, "test") + t.Run(fmt.Sprintf("valid_%s", tc.name), func(t *testing.T) { + result, err := validateIdentifier(tc.name, "test") require.NoError(t, err) - require.Equal(t, tc, result) + require.Equal(t, tc.expected, result) }) } @@ -421,8 +425,6 @@ func testIdentifierValidation(t *testing.T) { }{ {"empty", ""}, {"space", "test table"}, - {"hyphen", "test-table"}, - {"dot", "test.table"}, {"quote", `test"table`}, {"semicolon", "test;table"}, {"sql_injection", `test"; DROP KEYSPACE prod; --`}, diff --git a/cassandra/go.mod b/cassandra/go.mod index d32204e2..a239c2f7 100644 --- a/cassandra/go.mod +++ b/cassandra/go.mod @@ -28,7 +28,7 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/snappy v0.0.3 // indirect + github.com/golang/snappy v0.0.4 // indirect github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect @@ -47,6 +47,8 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/scylladb/go-reflectx v1.0.1 // indirect + github.com/scylladb/gocqlx/v2 v2.8.0 // indirect github.com/shirou/gopsutil/v4 v4.25.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect diff --git a/cassandra/go.sum b/cassandra/go.sum index 287fe403..47ca9050 100644 --- a/cassandra/go.sum +++ b/cassandra/go.sum @@ -48,6 +48,8 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= @@ -98,6 +100,10 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/scylladb/go-reflectx v1.0.1 h1:b917wZM7189pZdlND9PbIJ6NQxfDPfBvUaQ7cjj1iZQ= +github.com/scylladb/go-reflectx v1.0.1/go.mod h1:rWnOfDIRWBGN0miMLIcoPt/Dhi2doCMZqwMCJ3KupFc= +github.com/scylladb/gocqlx/v2 v2.8.0 h1:f/oIgoEPjKDKd+RIoeHqexsIQVIbalVmT+axwvUqQUg= +github.com/scylladb/gocqlx/v2 v2.8.0/go.mod h1:4/+cga34PVqjhgSoo5Nr2fX1MQIqZB5eCE5DK4xeDig= github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= From d4312394375e794046abc8f6f613f34c289b09f5 Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Sun, 20 Apr 2025 12:52:46 +0530 Subject: [PATCH 041/168] fixed lint issue --- cassandra/cassandra.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cassandra/cassandra.go b/cassandra/cassandra.go index e7f28360..4d006eee 100644 --- a/cassandra/cassandra.go +++ b/cassandra/cassandra.go @@ -4,7 +4,6 @@ import ( "errors" "fmt" "log" - "regexp" "strings" "time" "unicode" @@ -24,11 +23,6 @@ type Storage struct { ttl int } -var ( - // identifierPattern matches valid Cassandra identifiers - identifierPattern = regexp.MustCompile(`^[a-zA-Z0-9_]+$`) -) - // validateIdentifier checks if an identifier is valid func validateIdentifier(name, identifierType string) (string, error) { if name == "" { From 755952554749195f87b89f8798ff913c37f56129 Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Mon, 21 Apr 2025 09:36:38 +0530 Subject: [PATCH 042/168] Updated Testcases --- cassandra/cassandra.go | 75 ++++-- cassandra/cassandra_test.go | 516 +++++++++++++----------------------- 2 files changed, 237 insertions(+), 354 deletions(-) diff --git a/cassandra/cassandra.go b/cassandra/cassandra.go index 4d006eee..4264a9b7 100644 --- a/cassandra/cassandra.go +++ b/cassandra/cassandra.go @@ -1,7 +1,6 @@ package cassandra import ( - "errors" "fmt" "log" "strings" @@ -34,8 +33,8 @@ func validateIdentifier(name, identifierType string) (string, error) { return "", fmt.Errorf("invalid %s name: cannot contain whitespace", identifierType) } - // Check for SQL injection attempts - if strings.ContainsAny(name, ";'\"") { + // Check for SQL injection attempts and special characters + if strings.ContainsAny(name, ";'\"-.") { return "", fmt.Errorf("invalid %s name: cannot contain special characters", identifierType) } @@ -46,10 +45,11 @@ func validateIdentifier(name, identifierType string) (string, error) { } } - // If the identifier contains any special characters or is case-sensitive, - // wrap it in double quotes - if strings.ContainsAny(name, "-.") || strings.ToLower(name) != name { - return `"` + name + `"`, nil + // Only allow alphanumeric characters and underscores + for _, r := range name { + if !unicode.IsLetter(r) && !unicode.IsDigit(r) && r != '_' { + return "", fmt.Errorf("invalid %s name: can only contain letters, numbers, and underscores", identifierType) + } } return name, nil @@ -204,6 +204,28 @@ type queryResult struct { // Set stores a key-value pair with optional expiration func (s *Storage) Set(key string, value []byte, exp time.Duration) error { + // Validate key + if key == "" { + return fmt.Errorf("key may not be empty") + } + + // Check for invalid characters + if strings.ContainsAny(key, " \t\n\r\f\v") { + return fmt.Errorf("invalid test name: cannot contain whitespace") + } + + // Check for SQL injection attempts and special characters + if strings.ContainsAny(key, ";'\"-.") { + return fmt.Errorf("invalid test name: cannot contain special characters") + } + + // Check for unicode characters + for _, r := range key { + if r > unicode.MaxASCII { + return fmt.Errorf("invalid test name: cannot contain unicode characters") + } + } + // Calculate expiration time var expiresAt *time.Time var ttl int @@ -251,20 +273,19 @@ func (s *Storage) Get(key string) ([]byte, error) { if err := s.sx.Query(stmt, names).BindMap(map[string]interface{}{ "key": key, }).GetRelease(&result); err != nil { - if errors.Is(err, gocql.ErrNotFound) { - return nil, nil + if err == gocql.ErrNotFound { + return nil, fmt.Errorf("key not found") } return nil, err } - // Check if expired (as a backup in case TTL didn't work) - if !result.ExpiresAt.IsZero() && result.ExpiresAt.Before(time.Now()) { - // Expired but not yet removed by TTL - err := s.Delete(key) - if err != nil { - log.Printf("Failed to delete expired key %s: %v", key, err) + // Check if the key has expired + if !result.ExpiresAt.IsZero() && time.Now().After(result.ExpiresAt) { + // Delete the expired key + if err := s.Delete(key); err != nil { + return nil, err } - return nil, nil + return nil, fmt.Errorf("key expired") } return result.Value, nil @@ -272,8 +293,24 @@ func (s *Storage) Get(key string) ([]byte, error) { // Delete removes a key from storage func (s *Storage) Delete(key string) error { + // First check if the key exists + stmt, names := qb.Select(fmt.Sprintf("%s.%s", s.keyspace, s.table)). + Columns("key"). + Where(qb.Eq("key")). + ToCql() + + var exists string + if err := s.sx.Query(stmt, names).BindMap(map[string]interface{}{ + "key": key, + }).GetRelease(&exists); err != nil { + if err == gocql.ErrNotFound { + return fmt.Errorf("key not found") + } + return err + } + // Use query builder for delete - stmt, names := qb.Delete(fmt.Sprintf("%s.%s", s.keyspace, s.table)). + stmt, names = qb.Delete(fmt.Sprintf("%s.%s", s.keyspace, s.table)). Where(qb.Eq("key")). ToCql() @@ -285,9 +322,9 @@ func (s *Storage) Delete(key string) error { // Reset clears all keys from storage func (s *Storage) Reset() error { - // Use proper escaping for table name + // Use direct TRUNCATE query with proper escaping query := fmt.Sprintf("TRUNCATE TABLE %s.%s", s.keyspace, s.table) - return s.session.Query(query).Exec() + return s.sx.Query(query, []string{}).ExecRelease() } // Conn returns the underlying gocql session. diff --git a/cassandra/cassandra_test.go b/cassandra/cassandra_test.go index 3dc1032c..254155f6 100644 --- a/cassandra/cassandra_test.go +++ b/cassandra/cassandra_test.go @@ -22,7 +22,7 @@ const ( ) // newTestStore creates a Cassandra container using the official module -func newTestStore(t testing.TB) string { +func newTestStore(t testing.TB, keyspace string) *Storage { t.Helper() img := cassandraImage @@ -36,406 +36,252 @@ func newTestStore(t testing.TB) string { testcontainers.CleanupContainer(t, c) require.NoError(t, err) - // Get connection parameters host, err := c.Host(ctx) require.NoError(t, err) - mappedPort, err := c.MappedPort(ctx, cassandraPort) + port, err := c.MappedPort(ctx, cassandraPort) require.NoError(t, err) - connectionURL := host + ":" + mappedPort.Port() - return connectionURL + store, err := New(Config{ + Hosts: []string{fmt.Sprintf("%s:%d", host, port.Int())}, + Keyspace: keyspace, + Table: "test_kv", + Consistency: gocql.One, + Expiration: 5 * time.Second, + }) + require.NoError(t, err) + + t.Cleanup(func() { + store.Close() + }) + + return store } -// TestCassandraStorage tests the Cassandra storage implementation -func TestCassandraStorage(t *testing.T) { - // Test cases - t.Run("KeyspaceCreation", func(t *testing.T) { - connectionURL := newTestStore(t) - store, err := New(Config{ - Hosts: []string{connectionURL}, - Keyspace: "test_keyspace_creation", - Table: "test_kv", - Expiration: 5 * time.Second, - }) - require.NoError(t, err) - defer store.Close() - testKeyspaceCreation(t, connectionURL, store) - }) - - t.Run("BasicOperations", func(t *testing.T) { - connectionURL := newTestStore(t) - store, err := New(Config{ - Hosts: []string{connectionURL}, - Keyspace: "test_basic_ops", - Table: "test_kv", - Expiration: 5 * time.Second, - }) - require.NoError(t, err) - defer store.Close() - testBasicOperations(t, store) - }) - - t.Run("ExpirableKeys", func(t *testing.T) { - connectionURL := newTestStore(t) - store, err := New(Config{ - Hosts: []string{connectionURL}, - Keyspace: "test_expirable", - Table: "test_kv", - Expiration: 5 * time.Second, - }) - require.NoError(t, err) - defer store.Close() - testExpirableKeys(t, store) - }) - - t.Run("ConcurrentAccess", func(t *testing.T) { - connectionURL := newTestStore(t) - store, err := New(Config{ - Hosts: []string{connectionURL}, - Keyspace: "test_concurrent", - Table: "test_kv", - Expiration: 5 * time.Second, - }) - require.NoError(t, err) - defer store.Close() - testConcurrentAccess(t, store) - }) - - t.Run("Reset", func(t *testing.T) { - connectionURL := newTestStore(t) - store, err := New(Config{ - Hosts: []string{connectionURL}, - Keyspace: "test_reset", - Table: "test_kv", - Expiration: 5 * time.Second, - }) - require.NoError(t, err) - defer store.Close() - testReset(t, connectionURL, store) - }) - - t.Run("IdentifierValidation", func(t *testing.T) { - testIdentifierValidation(t) - }) +// Test_keyspace_creation tests the keyspace creation functionality +func Test_keyspace_creation(t *testing.T) { + store := newTestStore(t, "test_keyspace_creation") + require.NotNil(t, store) + //store.Close() } -// testKeyspaceCreation tests the keyspace creation functionality. -func testKeyspaceCreation(t *testing.T, connectionURL string, store *Storage) { +// Test_set tests the Set operation +func Test_set(t *testing.T) { + store := newTestStore(t, "test_basic_ops") + require.NotNil(t, store) + //defer store.Close() - // Verify keyspace was created - systemCluster := gocql.NewCluster(connectionURL) - systemSession, err := systemCluster.CreateSession() + // Test Set + err := store.Set("test", []byte("value"), 0) require.NoError(t, err) - defer systemSession.Close() - var count int - err = systemSession.Query( - "SELECT COUNT(*) FROM system_schema.keyspaces WHERE keyspace_name = ?", - "test_keyspace_creation", - ).Scan(&count) + // Verify the value was set + val, err := store.Get("test") require.NoError(t, err) - require.Equal(t, 1, count, "Keyspace should have been created") - - // Verify table was created - cluster := gocql.NewCluster(connectionURL) - cluster.Keyspace = "test_keyspace_creation" - session, err := cluster.CreateSession() - require.NoError(t, err) - defer session.Close() - - err = session.Query( - "SELECT COUNT(*) FROM system_schema.tables WHERE keyspace_name = ? AND table_name = ?", - "test_keyspace_creation", "test_kv", - ).Scan(&count) - require.NoError(t, err) - require.Equal(t, 1, count, "Table should have been created") + require.Equal(t, []byte("value"), val) } -// testBasicOperations tests basic operations like setting, getting, and deleting keys. -func testBasicOperations(t *testing.T, store *Storage) { +// Test_get tests the Get operation +func Test_get(t *testing.T) { + store := newTestStore(t, "test_basic_ops") + require.NotNil(t, store) + //defer store.Close() - // Set a key - err := store.Set("test_key", []byte("test_value"), 0) + // Set a value first + err := store.Set("test", []byte("value"), 0) require.NoError(t, err) - // Get the key - value, err := store.Get("test_key") + // Test Get + val, err := store.Get("test") require.NoError(t, err) - require.Equal(t, []byte("test_value"), value) + require.Equal(t, []byte("value"), val) - // Get a non-existent key - value, err = store.Get("nonexistent_key") - require.NoError(t, err) - require.Nil(t, value) - - // Delete the key - err = store.Delete("test_key") - require.NoError(t, err) - - // Get the deleted key - value, err = store.Get("test_key") - require.NoError(t, err) - require.Nil(t, value) + // Test Get non-existent key + val, err = store.Get("nonexistent") + require.Error(t, err) + require.Nil(t, val) } -// testExpirableKeys tests the expirable keys functionality. -func testExpirableKeys(t *testing.T, store *Storage) { - // Set keys with different expiration settings - // Key with default TTL (exp = 0 means use default) - err := store.Set("key_default_ttl", []byte("value1"), 0) +// Test_delete tests the Delete operation +func Test_delete(t *testing.T) { + store := newTestStore(t, "test_basic_ops") + require.NotNil(t, store) + //defer store.Close() + + // Set a value first + err := store.Set("test", []byte("value"), 0) require.NoError(t, err) - // Key with specific TTL - err = store.Set("key_specific_ttl", []byte("value2"), 1*time.Second) + // Verify the value exists + val, err := store.Get("test") + require.NoError(t, err) + require.Equal(t, []byte("value"), val) + + // Test Delete + err = store.Delete("test") require.NoError(t, err) - // Key with no TTL (overrides default) - err = store.Set("key_no_ttl", []byte("value3"), -1) + // Verify deletion + val, err = store.Get("test") + require.Error(t, err) + require.Nil(t, val) +} + +// Test_expirable_keys tests the expirable keys functionality +func Test_expirable_keys(t *testing.T) { + store := newTestStore(t, "test_expirable") + require.NotNil(t, store) + //defer store.Close() + + // Set key with 1 second expiration + err := store.Set("test", []byte("value"), time.Second) require.NoError(t, err) - // Verify all keys exist initially - value, err := store.Get("key_default_ttl") + // Verify key exists + val, err := store.Get("test") require.NoError(t, err) - require.Equal(t, []byte("value1"), value) + require.Equal(t, []byte("value"), val) - value, err = store.Get("key_specific_ttl") - require.NoError(t, err) - require.Equal(t, []byte("value2"), value) - - value, err = store.Get("key_no_ttl") - require.NoError(t, err) - require.Equal(t, []byte("value3"), value) - - // Wait for specific TTL to expire + // Wait for expiration using Eventually require.Eventually(t, func() bool { - v, _ := store.Get("key_specific_ttl") - return v == nil - }, 3*time.Second, 100*time.Millisecond, - "Key with 1s TTL should have expired") - - // Default TTL key should still exist - value, err = store.Get("key_default_ttl") - require.NoError(t, err) - require.Equal(t, []byte("value1"), value, "Key with default TTL should still exist") - - // No TTL key should still exist - value, err = store.Get("key_no_ttl") - require.NoError(t, err) - require.Equal(t, []byte("value3"), value, "Key with no TTL should still exist") - - // Wait for default TTL to expire - require.Eventually(t, func() bool { - v, _ := store.Get("key_default_ttl") - return v == nil - }, 6*time.Second, 100*time.Millisecond, - "Key with default TTL should have expired") - - // No TTL key should still exist - value, err = store.Get("key_no_ttl") - require.NoError(t, err) - require.Equal(t, []byte("value3"), value, "Key with no TTL should still exist") + val, err := store.Get("test") + return err != nil && val == nil + }, 3*time.Second, 100*time.Millisecond, "Key should expire within 3 seconds") } -// testReset tests the Reset method. -func testReset(t *testing.T, connectionURL string, store *Storage) { - // Set some keys - err := store.Set("key1", []byte("value1"), 0) - require.NoError(t, err) +// Test_concurrent_access tests concurrent access to the storage +func Test_concurrent_access(t *testing.T) { + store := newTestStore(t, "test_concurrent") + require.NotNil(t, store) + //defer store.Close() - err = store.Set("key2", []byte("value2"), 0) - require.NoError(t, err) + var wg sync.WaitGroup + for i := 0; i < 10; i++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + key := fmt.Sprintf("key%d", i) + value := []byte(fmt.Sprintf("value%d", i)) - // Verify keys exist - value, err := store.Get("key1") + err := store.Set(key, value, 0) + require.NoError(t, err) + + val, err := store.Get(key) + require.NoError(t, err) + require.Equal(t, value, val) + }(i) + } + wg.Wait() +} + +// Test_reset tests the Reset method +func Test_reset(t *testing.T) { + store := newTestStore(t, "test_reset") + require.NotNil(t, store) + //defer store.Close() + + // Add some data + err := store.Set("test1", []byte("value1"), 0) + require.NoError(t, err) + err = store.Set("test2", []byte("value2"), 0) require.NoError(t, err) - require.Equal(t, []byte("value1"), value) // Reset storage err = store.Reset() require.NoError(t, err) - // Verify keys are gone - value, err = store.Get("key1") - require.NoError(t, err) - require.Nil(t, value, "Key should be deleted after reset") + // Verify data is gone + val, err := store.Get("test1") + require.Error(t, err) + require.Nil(t, val) - value, err = store.Get("key2") - require.NoError(t, err) - require.Nil(t, value, "Key should be deleted after reset") - - // Close the first store before creating a new one - store.Close() - - // Create new storage with Reset flag - newStore, err := New(Config{ - Hosts: []string{connectionURL}, - Keyspace: "test_reset", - Table: "test_kv", - Reset: true, - }) - require.NoError(t, err) - defer newStore.Close() - - // Set a key - err = newStore.Set("key3", []byte("value3"), 0) - require.NoError(t, err) - - // Verify key exists - value, err = newStore.Get("key3") - require.NoError(t, err) - require.Equal(t, []byte("value3"), value) + val, err = store.Get("test2") + require.Error(t, err) + require.Nil(t, val) } -// testConcurrentAccess tests concurrent access to the storage. -func testConcurrentAccess(t *testing.T, store *Storage) { - // Number of goroutines - const concurrentOps = 10 - var wg sync.WaitGroup - wg.Add(concurrentOps) +// Test_valid_identifiers tests valid identifier cases +func Test_valid_identifiers(t *testing.T) { + store := newTestStore(t, "test_validation") + require.NotNil(t, store) - // Run concurrent operations - for i := 0; i < concurrentOps; i++ { - go func(id int) { - defer wg.Done() - // Set key - key := fmt.Sprintf("key%d", id) - value := []byte(fmt.Sprintf("value%d", id)) - err := store.Set(key, value, 0) - require.NoError(t, err) - - // Get key - retrievedValue, err := store.Get(key) - require.NoError(t, err) - require.Equal(t, value, retrievedValue) - - // Delete key - err = store.Delete(key) - require.NoError(t, err) - - // Verify deletion - retrievedValue, err = store.Get(key) - require.NoError(t, err) - require.Nil(t, retrievedValue) - }(i) - } - - // Wait for all goroutines to complete - wg.Wait() -} - -func Benchmark_Cassandra_Set(b *testing.B) { - connectionURL := newTestStore(b) - - // Create new storage - store, err := New(Config{ - Hosts: []string{connectionURL}, - Keyspace: "test_concurrent", - Table: "test_kv", - }) - require.NoError(b, err) - defer store.Close() - - b.ReportAllocs() - b.ResetTimer() - - for i := 0; i < b.N; i++ { - err = store.Set("john", []byte("doe"), 0) - } - - require.NoError(b, err) -} - -func Benchmark_Cassandra_Get(b *testing.B) { - connectionURL := newTestStore(b) - - // Create new storage - client, err := New(Config{ - Hosts: []string{connectionURL}, - Keyspace: "test_concurrent", - Table: "test_kv", - }) - require.NoError(b, err) - defer client.Close() - - b.ReportAllocs() - b.ResetTimer() - - err = client.Set("john", []byte("doe"), 0) - require.NoError(b, err) - - for i := 0; i < b.N; i++ { - _, err = client.Get("john") - } - - require.NoError(b, err) -} - -func Benchmark_Cassandra_Set_And_Delete(b *testing.B) { - connectionURL := newTestStore(b) - - // Create new storage - client, err := New(Config{ - Hosts: []string{connectionURL}, - Keyspace: "test_concurrent", - Table: "test_kv", - }) - require.NoError(b, err) - defer client.Close() - - b.ReportAllocs() - b.ResetTimer() - - for i := 0; i < b.N; i++ { - _ = client.Set("john", []byte("doe"), 0) - err = client.Delete("john") - } - - require.NoError(b, err) -} - -// testIdentifierValidation tests the validateIdentifier function -func testIdentifierValidation(t *testing.T) { - // Test valid identifiers validCases := []struct { - name string - expected string + name string + key string }{ {"test", "test"}, {"test123", "test123"}, {"test_123", "test_123"}, - {"TEST", `"TEST"`}, - {"Test123", `"Test123"`}, - {"test-table", `"test-table"`}, - {"test.table", `"test.table"`}, + {"TEST", "TEST"}, + {"Test123", "Test123"}, + {"test-table", "test-table"}, + {"test.table", "test.table"}, } for _, tc := range validCases { - t.Run(fmt.Sprintf("valid_%s", tc.name), func(t *testing.T) { - result, err := validateIdentifier(tc.name, "test") + t.Run(tc.name, func(t *testing.T) { + err := store.Set(tc.key, []byte("value"), 0) require.NoError(t, err) - require.Equal(t, tc.expected, result) }) } +} - // Test invalid identifiers +// Test_invalid_identifiers tests invalid identifier cases +func Test_invalid_identifiers(t *testing.T) { invalidCases := []struct { - name string - value string + name string + key string }{ {"empty", ""}, - {"space", "test table"}, - {"quote", `test"table`}, - {"semicolon", "test;table"}, - {"sql_injection", `test"; DROP KEYSPACE prod; --`}, - {"unicode", "test表"}, + {"space", "test key"}, + {"quote", `test"key`}, + {"semicolon", "test;key"}, + {"sql_injection", "test' OR '1'='1"}, + {"unicode", "test\u2028key"}, } for _, tc := range invalidCases { t.Run(fmt.Sprintf("invalid_%s", tc.name), func(t *testing.T) { - _, err := validateIdentifier(tc.value, "test") + _, err := validateIdentifier(tc.key, "test") require.Error(t, err) require.Contains(t, err.Error(), "invalid test name") }) } } + +func Benchmark_Cassandra_Set(b *testing.B) { + connectionURL := newTestStore(b, "test_concurrent") + + b.ReportAllocs() + b.ResetTimer() + + for i := 0; i < b.N; i++ { + err := connectionURL.Set("john", []byte("doe"), 0) + require.NoError(b, err) + } +} + +func Benchmark_Cassandra_Get(b *testing.B) { + connectionURL := newTestStore(b, "test_concurrent") + + b.ReportAllocs() + b.ResetTimer() + + for i := 0; i < b.N; i++ { + _, err := connectionURL.Get("john") + require.NoError(b, err) + } +} + +func Benchmark_Cassandra_Set_And_Delete(b *testing.B) { + connectionURL := newTestStore(b, "test_concurrent") + + b.ReportAllocs() + b.ResetTimer() + + for i := 0; i < b.N; i++ { + _ = connectionURL.Set("john", []byte("doe"), 0) + err := connectionURL.Delete("john") + require.NoError(b, err) + } +} From 1fd56464e1824962c261c2daab5b01f4dd31908d Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Mon, 21 Apr 2025 09:37:59 +0530 Subject: [PATCH 043/168] removed commented code --- cassandra/cassandra_test.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/cassandra/cassandra_test.go b/cassandra/cassandra_test.go index 254155f6..9b504793 100644 --- a/cassandra/cassandra_test.go +++ b/cassandra/cassandra_test.go @@ -62,14 +62,12 @@ func newTestStore(t testing.TB, keyspace string) *Storage { func Test_keyspace_creation(t *testing.T) { store := newTestStore(t, "test_keyspace_creation") require.NotNil(t, store) - //store.Close() } // Test_set tests the Set operation func Test_set(t *testing.T) { store := newTestStore(t, "test_basic_ops") require.NotNil(t, store) - //defer store.Close() // Test Set err := store.Set("test", []byte("value"), 0) @@ -85,7 +83,6 @@ func Test_set(t *testing.T) { func Test_get(t *testing.T) { store := newTestStore(t, "test_basic_ops") require.NotNil(t, store) - //defer store.Close() // Set a value first err := store.Set("test", []byte("value"), 0) @@ -106,7 +103,6 @@ func Test_get(t *testing.T) { func Test_delete(t *testing.T) { store := newTestStore(t, "test_basic_ops") require.NotNil(t, store) - //defer store.Close() // Set a value first err := store.Set("test", []byte("value"), 0) @@ -131,7 +127,6 @@ func Test_delete(t *testing.T) { func Test_expirable_keys(t *testing.T) { store := newTestStore(t, "test_expirable") require.NotNil(t, store) - //defer store.Close() // Set key with 1 second expiration err := store.Set("test", []byte("value"), time.Second) @@ -153,7 +148,6 @@ func Test_expirable_keys(t *testing.T) { func Test_concurrent_access(t *testing.T) { store := newTestStore(t, "test_concurrent") require.NotNil(t, store) - //defer store.Close() var wg sync.WaitGroup for i := 0; i < 10; i++ { @@ -178,7 +172,6 @@ func Test_concurrent_access(t *testing.T) { func Test_reset(t *testing.T) { store := newTestStore(t, "test_reset") require.NotNil(t, store) - //defer store.Close() // Add some data err := store.Set("test1", []byte("value1"), 0) From 0a96159376ddf7108f9301f7741e4501dd3a6d52 Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Mon, 21 Apr 2025 10:02:41 +0530 Subject: [PATCH 044/168] fixed nitpicks --- cassandra/cassandra.go | 29 ++++++----------------------- cassandra/cassandra_test.go | 24 +++++++++++++----------- 2 files changed, 19 insertions(+), 34 deletions(-) diff --git a/cassandra/cassandra.go b/cassandra/cassandra.go index 4264a9b7..095f6982 100644 --- a/cassandra/cassandra.go +++ b/cassandra/cassandra.go @@ -179,21 +179,21 @@ func (s *Storage) createDataTable() error { ) `, s.keyspace, s.table) - // Execute the query - return s.session.Query(query).Exec() + // Use gocqlx session + return s.sx.Query(query, []string{}).ExecRelease() } // dropTables drops existing tables for reset func (s *Storage) dropTables() error { // Drop data table with proper escaping query := fmt.Sprintf("DROP TABLE IF EXISTS %s.%s", s.keyspace, s.table) - if err := s.session.Query(query).Exec(); err != nil { + if err := s.sx.Query(query, []string{}).ExecRelease(); err != nil { return err } // Drop schema_info table with proper escaping query = fmt.Sprintf("DROP TABLE IF EXISTS %s.schema_info", s.keyspace) - return s.session.Query(query).Exec() + return s.sx.Query(query, []string{}).ExecRelease() } // queryResult holds the result of a SELECT query @@ -205,25 +205,8 @@ type queryResult struct { // Set stores a key-value pair with optional expiration func (s *Storage) Set(key string, value []byte, exp time.Duration) error { // Validate key - if key == "" { - return fmt.Errorf("key may not be empty") - } - - // Check for invalid characters - if strings.ContainsAny(key, " \t\n\r\f\v") { - return fmt.Errorf("invalid test name: cannot contain whitespace") - } - - // Check for SQL injection attempts and special characters - if strings.ContainsAny(key, ";'\"-.") { - return fmt.Errorf("invalid test name: cannot contain special characters") - } - - // Check for unicode characters - for _, r := range key { - if r > unicode.MaxASCII { - return fmt.Errorf("invalid test name: cannot contain unicode characters") - } + if _, err := validateIdentifier(key, "key"); err != nil { + return err } // Calculate expiration time diff --git a/cassandra/cassandra_test.go b/cassandra/cassandra_test.go index 9b504793..7ced88e7 100644 --- a/cassandra/cassandra_test.go +++ b/cassandra/cassandra_test.go @@ -207,8 +207,6 @@ func Test_valid_identifiers(t *testing.T) { {"test_123", "test_123"}, {"TEST", "TEST"}, {"Test123", "Test123"}, - {"test-table", "test-table"}, - {"test.table", "test.table"}, } for _, tc := range validCases { @@ -221,6 +219,10 @@ func Test_valid_identifiers(t *testing.T) { // Test_invalid_identifiers tests invalid identifier cases func Test_invalid_identifiers(t *testing.T) { + + store := newTestStore(t, "test_validation") + require.NotNil(t, store) + invalidCases := []struct { name string key string @@ -235,46 +237,46 @@ func Test_invalid_identifiers(t *testing.T) { for _, tc := range invalidCases { t.Run(fmt.Sprintf("invalid_%s", tc.name), func(t *testing.T) { - _, err := validateIdentifier(tc.key, "test") + err := store.Set(tc.key, []byte("value"), 0) require.Error(t, err) - require.Contains(t, err.Error(), "invalid test name") + require.Contains(t, err.Error(), "invalid key name") }) } } func Benchmark_Cassandra_Set(b *testing.B) { - connectionURL := newTestStore(b, "test_concurrent") + store := newTestStore(b, "test_concurrent") b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - err := connectionURL.Set("john", []byte("doe"), 0) + err := store.Set("john", []byte("doe"), 0) require.NoError(b, err) } } func Benchmark_Cassandra_Get(b *testing.B) { - connectionURL := newTestStore(b, "test_concurrent") + store := newTestStore(b, "test_concurrent") b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - _, err := connectionURL.Get("john") + _, err := store.Get("john") require.NoError(b, err) } } func Benchmark_Cassandra_Set_And_Delete(b *testing.B) { - connectionURL := newTestStore(b, "test_concurrent") + store := newTestStore(b, "test_concurrent") b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - _ = connectionURL.Set("john", []byte("doe"), 0) - err := connectionURL.Delete("john") + _ = store.Set("john", []byte("doe"), 0) + err := store.Delete("john") require.NoError(b, err) } } From 978e9decb9a4dbf8bc6c84733b1bc63fbbd4cbf5 Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Mon, 21 Apr 2025 10:23:05 +0530 Subject: [PATCH 045/168] fixed nitpicks --- cassandra/cassandra.go | 34 ++++++++++++++-------------------- cassandra/config.go | 6 ++++++ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/cassandra/cassandra.go b/cassandra/cassandra.go index 095f6982..32ed2fb2 100644 --- a/cassandra/cassandra.go +++ b/cassandra/cassandra.go @@ -12,6 +12,13 @@ import ( "github.com/scylladb/gocqlx/v2/qb" ) +var ( + // ErrNotFound is returned when the key does not exist + ErrNotFound = fmt.Errorf("key not found") + // ErrKeyExpired is returned when the key has expired + ErrKeyExpired = fmt.Errorf("key expired") +) + // Storage represents a Cassandra storage implementation type Storage struct { cluster *gocql.ClusterConfig @@ -73,6 +80,8 @@ func New(cnfg Config) (*Storage, error) { // Create cluster config cluster := gocql.NewCluster(cfg.Hosts...) cluster.Consistency = cfg.Consistency + cluster.ConnectTimeout = cfg.ConnectTimeout + cluster.RetryPolicy = &gocql.SimpleRetryPolicy{NumRetries: cfg.MaxRetries} // Convert expiration to seconds for TTL ttl := 0 @@ -257,7 +266,7 @@ func (s *Storage) Get(key string) ([]byte, error) { "key": key, }).GetRelease(&result); err != nil { if err == gocql.ErrNotFound { - return nil, fmt.Errorf("key not found") + return nil, ErrNotFound } return nil, err } @@ -268,7 +277,7 @@ func (s *Storage) Get(key string) ([]byte, error) { if err := s.Delete(key); err != nil { return nil, err } - return nil, fmt.Errorf("key expired") + return nil, ErrKeyExpired } return result.Value, nil @@ -276,24 +285,8 @@ func (s *Storage) Get(key string) ([]byte, error) { // Delete removes a key from storage func (s *Storage) Delete(key string) error { - // First check if the key exists - stmt, names := qb.Select(fmt.Sprintf("%s.%s", s.keyspace, s.table)). - Columns("key"). - Where(qb.Eq("key")). - ToCql() - - var exists string - if err := s.sx.Query(stmt, names).BindMap(map[string]interface{}{ - "key": key, - }).GetRelease(&exists); err != nil { - if err == gocql.ErrNotFound { - return fmt.Errorf("key not found") - } - return err - } - // Use query builder for delete - stmt, names = qb.Delete(fmt.Sprintf("%s.%s", s.keyspace, s.table)). + stmt, names := qb.Delete(fmt.Sprintf("%s.%s", s.keyspace, s.table)). Where(qb.Eq("key")). ToCql() @@ -315,7 +308,8 @@ func (s *Storage) Conn() *gocql.Session { return s.session } -// Close closes the storage connection +// Close closes the storage connection. +// This method is not thread-safe and should not be called concurrently with other methods. func (s *Storage) Close() { if s.session != nil { s.session.Close() diff --git a/cassandra/config.go b/cassandra/config.go index c6db983c..74102716 100644 --- a/cassandra/config.go +++ b/cassandra/config.go @@ -26,6 +26,12 @@ type Config struct { // Optional. Default is false // Reset is a flag to reset the database. Reset bool + // Optional. Default is 3 + // MaxRetries is the maximum number of retries for a query. + MaxRetries int + // Optional. Default is 5 seconds + // ConnectTimeout is the timeout for connecting to the Cassandra cluster. + ConnectTimeout time.Duration } // ConfigDefault is the default config From 1b79f1941d96ac63a293f88afac7016a201b7a57 Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Mon, 21 Apr 2025 10:33:44 +0530 Subject: [PATCH 046/168] fixed nitpicks --- cassandra/config.go | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/cassandra/config.go b/cassandra/config.go index 74102716..3732c565 100644 --- a/cassandra/config.go +++ b/cassandra/config.go @@ -36,12 +36,14 @@ type Config struct { // ConfigDefault is the default config var ConfigDefault = Config{ - Hosts: []string{"localhost:9042"}, - Keyspace: "gofiber", - Table: "kv_store", - Consistency: gocql.Quorum, - Reset: false, - Expiration: 10 * time.Minute, + Hosts: []string{"localhost:9042"}, + Keyspace: "gofiber", + Table: "kv_store", + Consistency: gocql.Quorum, + Reset: false, + Expiration: 10 * time.Minute, + MaxRetries: 3, + ConnectTimeout: 5 * time.Second, } // configDefault applies `ConfigDefault` values to a user‑supplied Config. @@ -78,5 +80,13 @@ func configDefault(config ...Config) Config { cfg.Expiration = 0 } + if cfg.MaxRetries == 0 { + cfg.MaxRetries = ConfigDefault.MaxRetries + } + + if cfg.ConnectTimeout == 0 { + cfg.ConnectTimeout = ConfigDefault.ConnectTimeout + } + return cfg } From 51ed2951e66d1d6d9884bcaba1779f8bff0a9f87 Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Tue, 22 Apr 2025 11:27:03 +0530 Subject: [PATCH 047/168] fix benchmark test --- cassandra/cassandra_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cassandra/cassandra_test.go b/cassandra/cassandra_test.go index 7ced88e7..cf443c84 100644 --- a/cassandra/cassandra_test.go +++ b/cassandra/cassandra_test.go @@ -259,6 +259,9 @@ func Benchmark_Cassandra_Set(b *testing.B) { func Benchmark_Cassandra_Get(b *testing.B) { store := newTestStore(b, "test_concurrent") + err := store.Set("john", []byte("doe"), 0) + require.NoError(b, err) + b.ReportAllocs() b.ResetTimer() From c07f9034d86232dc1996185a9fe8410042a17982 Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Tue, 22 Apr 2025 11:41:51 +0530 Subject: [PATCH 048/168] fix test cases --- cassandra/cassandra_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cassandra/cassandra_test.go b/cassandra/cassandra_test.go index cf443c84..e1fbdc8b 100644 --- a/cassandra/cassandra_test.go +++ b/cassandra/cassandra_test.go @@ -47,7 +47,7 @@ func newTestStore(t testing.TB, keyspace string) *Storage { Keyspace: keyspace, Table: "test_kv", Consistency: gocql.One, - Expiration: 5 * time.Second, + Expiration: 10 * time.Second, }) require.NoError(t, err) From 034736306cae457198b16e2c36f0cd2ad4cece17 Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez <835733+gaby@users.noreply.github.com> Date: Tue, 22 Apr 2025 07:39:15 -0400 Subject: [PATCH 049/168] Remove logger --- cassandra/cassandra.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/cassandra/cassandra.go b/cassandra/cassandra.go index 32ed2fb2..0c04fc54 100644 --- a/cassandra/cassandra.go +++ b/cassandra/cassandra.go @@ -2,7 +2,6 @@ package cassandra import ( "fmt" - "log" "strings" "time" "unicode" @@ -171,7 +170,6 @@ func (s *Storage) ensureKeyspace(systemSession *gocql.Session) error { if err := systemSession.Query(query).Exec(); err != nil { return err } - log.Printf("Created keyspace: %s", s.keyspace) } return nil From c914bf3107fb22abcb1884a7c07ed54a3a724052 Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Tue, 22 Apr 2025 18:09:42 +0530 Subject: [PATCH 050/168] fix test cases --- cassandra/README.md | 2 +- cassandra/cassandra_test.go | 78 ++++++++++++++++++------------------- 2 files changed, 38 insertions(+), 42 deletions(-) diff --git a/cassandra/README.md b/cassandra/README.md index ff1524ba..1bffefaf 100644 --- a/cassandra/README.md +++ b/cassandra/README.md @@ -49,7 +49,7 @@ necessary for the client to operate correctly. To start Cassandra using Docker, issue the following: ```bash -docker run --name cassandra --network host -d cassandra:latest +docker run --name cassandra -p 9042:9042 -d cassandra:latest ``` After running this command, you're ready to start using the storage and connecting to the database. diff --git a/cassandra/cassandra_test.go b/cassandra/cassandra_test.go index e1fbdc8b..7c41d71f 100644 --- a/cassandra/cassandra_test.go +++ b/cassandra/cassandra_test.go @@ -22,7 +22,7 @@ const ( ) // newTestStore creates a Cassandra container using the official module -func newTestStore(t testing.TB, keyspace string) *Storage { +func newTestStore(t testing.TB) *Storage { t.Helper() img := cassandraImage @@ -44,7 +44,7 @@ func newTestStore(t testing.TB, keyspace string) *Storage { store, err := New(Config{ Hosts: []string{fmt.Sprintf("%s:%d", host, port.Int())}, - Keyspace: keyspace, + Keyspace: "test_cassandra", Table: "test_kv", Consistency: gocql.One, Expiration: 10 * time.Second, @@ -58,15 +58,9 @@ func newTestStore(t testing.TB, keyspace string) *Storage { return store } -// Test_keyspace_creation tests the keyspace creation functionality -func Test_keyspace_creation(t *testing.T) { - store := newTestStore(t, "test_keyspace_creation") - require.NotNil(t, store) -} - -// Test_set tests the Set operation -func Test_set(t *testing.T) { - store := newTestStore(t, "test_basic_ops") +// Test_Set tests the Set operation +func Test_Set(t *testing.T) { + store := newTestStore(t) require.NotNil(t, store) // Test Set @@ -79,9 +73,9 @@ func Test_set(t *testing.T) { require.Equal(t, []byte("value"), val) } -// Test_get tests the Get operation -func Test_get(t *testing.T) { - store := newTestStore(t, "test_basic_ops") +// Test_Get tests the Get operation +func Test_Get(t *testing.T) { + store := newTestStore(t) require.NotNil(t, store) // Set a value first @@ -99,9 +93,9 @@ func Test_get(t *testing.T) { require.Nil(t, val) } -// Test_delete tests the Delete operation -func Test_delete(t *testing.T) { - store := newTestStore(t, "test_basic_ops") +// Test_Delete tests the Delete operation +func Test_Delete(t *testing.T) { + store := newTestStore(t) require.NotNil(t, store) // Set a value first @@ -123,9 +117,9 @@ func Test_delete(t *testing.T) { require.Nil(t, val) } -// Test_expirable_keys tests the expirable keys functionality -func Test_expirable_keys(t *testing.T) { - store := newTestStore(t, "test_expirable") +// Test_Expirable_Keys tests the expirable keys functionality +func Test_Expirable_Keys(t *testing.T) { + store := newTestStore(t) require.NotNil(t, store) // Set key with 1 second expiration @@ -144,9 +138,9 @@ func Test_expirable_keys(t *testing.T) { }, 3*time.Second, 100*time.Millisecond, "Key should expire within 3 seconds") } -// Test_concurrent_access tests concurrent access to the storage -func Test_concurrent_access(t *testing.T) { - store := newTestStore(t, "test_concurrent") +// Test_Concurrent_Access tests concurrent access to the storage +func Test_Concurrent_Access(t *testing.T) { + store := newTestStore(t) require.NotNil(t, store) var wg sync.WaitGroup @@ -168,9 +162,9 @@ func Test_concurrent_access(t *testing.T) { wg.Wait() } -// Test_reset tests the Reset method -func Test_reset(t *testing.T) { - store := newTestStore(t, "test_reset") +// Test_Reset tests the Reset method +func Test_Reset(t *testing.T) { + store := newTestStore(t) require.NotNil(t, store) // Add some data @@ -193,9 +187,9 @@ func Test_reset(t *testing.T) { require.Nil(t, val) } -// Test_valid_identifiers tests valid identifier cases -func Test_valid_identifiers(t *testing.T) { - store := newTestStore(t, "test_validation") +// Test_Valid_Identifiers tests valid identifier cases +func Test_Valid_Identifiers(t *testing.T) { + store := newTestStore(t) require.NotNil(t, store) validCases := []struct { @@ -217,10 +211,10 @@ func Test_valid_identifiers(t *testing.T) { } } -// Test_invalid_identifiers tests invalid identifier cases -func Test_invalid_identifiers(t *testing.T) { +// Test_Invalid_Identifiers tests invalid identifier cases +func Test_Invalid_Identifiers(t *testing.T) { - store := newTestStore(t, "test_validation") + store := newTestStore(t) require.NotNil(t, store) invalidCases := []struct { @@ -245,19 +239,20 @@ func Test_invalid_identifiers(t *testing.T) { } func Benchmark_Cassandra_Set(b *testing.B) { - store := newTestStore(b, "test_concurrent") + store := newTestStore(b) b.ReportAllocs() b.ResetTimer() + var err error for i := 0; i < b.N; i++ { - err := store.Set("john", []byte("doe"), 0) - require.NoError(b, err) + err = store.Set("john", []byte("doe"), 0) } + require.NoError(b, err) } func Benchmark_Cassandra_Get(b *testing.B) { - store := newTestStore(b, "test_concurrent") + store := newTestStore(b) err := store.Set("john", []byte("doe"), 0) require.NoError(b, err) @@ -266,20 +261,21 @@ func Benchmark_Cassandra_Get(b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ { - _, err := store.Get("john") - require.NoError(b, err) + _, err = store.Get("john") } + require.NoError(b, err) } func Benchmark_Cassandra_Set_And_Delete(b *testing.B) { - store := newTestStore(b, "test_concurrent") + store := newTestStore(b) b.ReportAllocs() b.ResetTimer() + var err error for i := 0; i < b.N; i++ { _ = store.Set("john", []byte("doe"), 0) - err := store.Delete("john") - require.NoError(b, err) + err = store.Delete("john") } + require.NoError(b, err) } From 68e6ee57eb7f2f367d1f8cd30e5468f85f78f004 Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Wed, 23 Apr 2025 09:15:51 +0530 Subject: [PATCH 051/168] fix test cases nits --- cassandra/cassandra_test.go | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/cassandra/cassandra_test.go b/cassandra/cassandra_test.go index 7c41d71f..5b59a63b 100644 --- a/cassandra/cassandra_test.go +++ b/cassandra/cassandra_test.go @@ -51,17 +51,13 @@ func newTestStore(t testing.TB) *Storage { }) require.NoError(t, err) - t.Cleanup(func() { - store.Close() - }) - return store } // Test_Set tests the Set operation func Test_Set(t *testing.T) { store := newTestStore(t) - require.NotNil(t, store) + defer store.Close() // Test Set err := store.Set("test", []byte("value"), 0) @@ -76,7 +72,7 @@ func Test_Set(t *testing.T) { // Test_Get tests the Get operation func Test_Get(t *testing.T) { store := newTestStore(t) - require.NotNil(t, store) + defer store.Close() // Set a value first err := store.Set("test", []byte("value"), 0) @@ -96,7 +92,7 @@ func Test_Get(t *testing.T) { // Test_Delete tests the Delete operation func Test_Delete(t *testing.T) { store := newTestStore(t) - require.NotNil(t, store) + defer store.Close() // Set a value first err := store.Set("test", []byte("value"), 0) @@ -120,7 +116,7 @@ func Test_Delete(t *testing.T) { // Test_Expirable_Keys tests the expirable keys functionality func Test_Expirable_Keys(t *testing.T) { store := newTestStore(t) - require.NotNil(t, store) + defer store.Close() // Set key with 1 second expiration err := store.Set("test", []byte("value"), time.Second) @@ -141,7 +137,7 @@ func Test_Expirable_Keys(t *testing.T) { // Test_Concurrent_Access tests concurrent access to the storage func Test_Concurrent_Access(t *testing.T) { store := newTestStore(t) - require.NotNil(t, store) + defer store.Close() var wg sync.WaitGroup for i := 0; i < 10; i++ { @@ -165,7 +161,7 @@ func Test_Concurrent_Access(t *testing.T) { // Test_Reset tests the Reset method func Test_Reset(t *testing.T) { store := newTestStore(t) - require.NotNil(t, store) + defer store.Close() // Add some data err := store.Set("test1", []byte("value1"), 0) @@ -190,7 +186,7 @@ func Test_Reset(t *testing.T) { // Test_Valid_Identifiers tests valid identifier cases func Test_Valid_Identifiers(t *testing.T) { store := newTestStore(t) - require.NotNil(t, store) + defer store.Close() validCases := []struct { name string @@ -213,9 +209,8 @@ func Test_Valid_Identifiers(t *testing.T) { // Test_Invalid_Identifiers tests invalid identifier cases func Test_Invalid_Identifiers(t *testing.T) { - store := newTestStore(t) - require.NotNil(t, store) + defer store.Close() invalidCases := []struct { name string @@ -240,6 +235,7 @@ func Test_Invalid_Identifiers(t *testing.T) { func Benchmark_Cassandra_Set(b *testing.B) { store := newTestStore(b) + defer store.Close() b.ReportAllocs() b.ResetTimer() @@ -253,6 +249,7 @@ func Benchmark_Cassandra_Set(b *testing.B) { func Benchmark_Cassandra_Get(b *testing.B) { store := newTestStore(b) + defer store.Close() err := store.Set("john", []byte("doe"), 0) require.NoError(b, err) @@ -268,6 +265,7 @@ func Benchmark_Cassandra_Get(b *testing.B) { func Benchmark_Cassandra_Set_And_Delete(b *testing.B) { store := newTestStore(b) + defer store.Close() b.ReportAllocs() b.ResetTimer() From 7d6aec5b4abdc7a55d049d291b2e05631086a530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 23 Apr 2025 10:56:30 +0200 Subject: [PATCH 052/168] chore: apply suggestions from code review --- cassandra/cassandra_test.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cassandra/cassandra_test.go b/cassandra/cassandra_test.go index 5b59a63b..f360737e 100644 --- a/cassandra/cassandra_test.go +++ b/cassandra/cassandra_test.go @@ -11,7 +11,7 @@ import ( "github.com/gocql/gocql" "github.com/stretchr/testify/require" "github.com/testcontainers/testcontainers-go" - cassandracontainer "github.com/testcontainers/testcontainers-go/modules/cassandra" + "github.com/testcontainers/testcontainers-go/modules/cassandra" ) const ( @@ -32,18 +32,15 @@ func newTestStore(t testing.TB) *Storage { ctx := context.Background() - c, err := cassandracontainer.Run(ctx, img) + c, err := cassandra.Run(ctx, img) testcontainers.CleanupContainer(t, c) require.NoError(t, err) - host, err := c.Host(ctx) - require.NoError(t, err) - - port, err := c.MappedPort(ctx, cassandraPort) + connectionHost, err := c.ConnectionHost(ctx) require.NoError(t, err) store, err := New(Config{ - Hosts: []string{fmt.Sprintf("%s:%d", host, port.Int())}, + Hosts: []string{connectionHost}, Keyspace: "test_cassandra", Table: "test_kv", Consistency: gocql.One, From d153ddd17b862d75d0128e0b636e98a428fb143b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Yasir=20Na=C3=A7?= <76746351+aliyasirnac@users.noreply.github.com> Date: Wed, 23 Apr 2025 16:54:13 +0300 Subject: [PATCH 053/168] feat(surrealdb): add operational mode configuration and update tests --- .github/workflows/benchmark.yml | 1 + .github/workflows/test-surrealdb.yml | 4 +++- README.md | 3 ++- surrealdb/config.go | 8 ++++++++ surrealdb/surrealdb_test.go | 26 +++++++++++--------------- 5 files changed, 25 insertions(+), 17 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 3c820220..ad80ae08 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -133,6 +133,7 @@ jobs: TEST_NATS_IMAGE: "nats:2-alpine" TEST_POSTGRES_IMAGE: "docker.io/postgres:16-alpine" TEST_SCYLLADB_IMAGE: "scylladb/scylla:6.2" + TEST_SURREALDB_IMAGE: "surrealdb/surrealdb:latest" - name: Get Previous Benchmark Results uses: actions/cache@v4 diff --git a/.github/workflows/test-surrealdb.yml b/.github/workflows/test-surrealdb.yml index e98e7e9a..740385ee 100644 --- a/.github/workflows/test-surrealdb.yml +++ b/.github/workflows/test-surrealdb.yml @@ -26,4 +26,6 @@ jobs: go-version: '${{ matrix.go-version }}' - name: Run Test - run: cd ./surrealdb && go test ./... -v -race + env: + TEST_SURREALDB_IMAGE: surrealdb/surrealdb:latest + run: cd ./surrealdb && go test ./... -v -race \ No newline at end of file diff --git a/README.md b/README.md index 699b16e6..71f60c31 100644 --- a/README.md +++ b/README.md @@ -77,4 +77,5 @@ type Storage interface { - [ScyllaDB](./scylladb/README.md) - [SQLite3](./sqlite3/README.md) - [ClickHouse](./clickhouse/README.md) -- [Valkey](./valkey/README.md) \ No newline at end of file +- [Valkey](./valkey/README.md) +- [SurrealDB](./surrealdb/README.md) \ No newline at end of file diff --git a/surrealdb/config.go b/surrealdb/config.go index bae58cbf..301b1e05 100644 --- a/surrealdb/config.go +++ b/surrealdb/config.go @@ -36,6 +36,13 @@ type Config struct { // The default table used to store key-value records DefaultTable string + + // Mode determines the operational mode of SurrealDB. + // Accepted values: + // - "default" (requires authentication) + // - "memory" (in-memory mode, no authentication required) + // - "kv" (file-based key-value store, no authentication required) + Mode string } var ConfigDefault = Config{ @@ -47,6 +54,7 @@ var ConfigDefault = Config{ Access: "full", Scope: "all", DefaultTable: "fiber_storage", + Mode: "default", // default, kv, memory } func configDefault(config ...Config) Config { diff --git a/surrealdb/surrealdb_test.go b/surrealdb/surrealdb_test.go index 204c7301..ff9a1bd8 100644 --- a/surrealdb/surrealdb_test.go +++ b/surrealdb/surrealdb_test.go @@ -3,7 +3,6 @@ package surrealdb import ( "context" "encoding/json" - "fmt" "github.com/stretchr/testify/require" "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/modules/surrealdb" @@ -22,30 +21,28 @@ var ( func newTestStore(t testing.TB) (*Storage, error) { t.Helper() + ctx := context.Background() img := surrealDb if imgFromEnv := os.Getenv(surrealDbImageEnvVar); imgFromEnv != "" { img = imgFromEnv } - surrealdbContainer, err := surrealdb.Run(context.Background(), img) + surrealdbContainer, err := surrealdb.Run( + ctx, img, + surrealdb.WithUsername(surrealDbUser), + surrealdb.WithPassword(surrealDbPass), + ) if err != nil { return nil, err } testcontainers.CleanupContainer(t, surrealdbContainer) - host, err := surrealdbContainer.Host(context.Background()) + url, err := surrealdbContainer.URL(ctx) if err != nil { return nil, err } - port, err := surrealdbContainer.MappedPort(context.Background(), "8000") - if err != nil { - return nil, err - } - - url := fmt.Sprintf("ws://%s:%s", host, port.Port()) - return New( Config{ ConnectionString: url, @@ -78,7 +75,6 @@ func Test_Surrealdb_CreateAndGet(t *testing.T) { get, err := testStore.Get("test") require.NoError(t, err) require.NotEmpty(t, get) - } func Test_Surrealdb_ListTable(t *testing.T) { @@ -132,11 +128,11 @@ func Test_Surrealdb_GetExpired(t *testing.T) { err = testStore.Set("temp", []byte("value"), 1*time.Second) require.NoError(t, err) - time.Sleep(2 * time.Second) - - val, err := testStore.Get("temp") + require.Eventually(t, func() bool { + val, _ := testStore.Get("temp") + return val == nil + }, 3*time.Second, 100*time.Millisecond) require.NoError(t, err) - require.Nil(t, val) } func Test_Surrealdb_GetMissing(t *testing.T) { From b5a0d5ba88872d91c347930fd79d601ff0175ea0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Apr 2025 04:55:14 +0000 Subject: [PATCH 054/168] chore(deps): bump github.com/stretchr/testify in /mssql Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.9.0 to 1.10.0. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.9.0...v1.10.0) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- mssql/go.mod | 2 +- mssql/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mssql/go.mod b/mssql/go.mod index 27a350df..879c3752 100644 --- a/mssql/go.mod +++ b/mssql/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/microsoft/go-mssqldb v1.7.2 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 ) require ( diff --git a/mssql/go.sum b/mssql/go.sum index 4c4cbb4c..70c070e0 100644 --- a/mssql/go.sum +++ b/mssql/go.sum @@ -18,8 +18,8 @@ github.com/microsoft/go-mssqldb v1.7.2/go.mod h1:kOvZKUdrhhFQmxLZqbwUV0rHkNkZpth github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= From be69a192d275f1ac8f1ccd32bb3a81f7cd63554b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Apr 2025 04:56:32 +0000 Subject: [PATCH 055/168] chore(deps): bump github.com/aws/aws-sdk-go-v2/feature/s3/manager in /s3 Bumps [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) from 1.17.10 to 1.17.72. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.17.10...feature/s3/manager/v1.17.72) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager dependency-version: 1.17.72 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- s3/go.mod | 12 ++++++------ s3/go.sum | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/s3/go.mod b/s3/go.mod index 6a2223b6..e33a7b0e 100644 --- a/s3/go.mod +++ b/s3/go.mod @@ -6,8 +6,8 @@ require ( github.com/aws/aws-sdk-go-v2 v1.36.3 github.com/aws/aws-sdk-go-v2/config v1.29.14 github.com/aws/aws-sdk-go-v2/credentials v1.17.67 - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.10 - github.com/aws/aws-sdk-go-v2/service/s3 v1.58.3 + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.73 + github.com/aws/aws-sdk-go-v2/service/s3 v1.79.2 github.com/aws/smithy-go v1.22.3 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.36.0 @@ -18,16 +18,16 @@ require ( dario.cat/mergo v1.0.1 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.3 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.15 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.17 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.0 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.15 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.25.3 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 // indirect diff --git a/s3/go.sum b/s3/go.sum index 8a52e175..0c0d0c90 100644 --- a/s3/go.sum +++ b/s3/go.sum @@ -8,34 +8,34 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/aws/aws-sdk-go-v2 v1.36.3 h1:mJoei2CxPutQVxaATCzDUjcZEjVRdpsiiXi2o38yqWM= github.com/aws/aws-sdk-go-v2 v1.36.3/go.mod h1:LLXuLpgzEbD766Z5ECcRmi8AzSwfZItDtmABVkRLGzg= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.3 h1:tW1/Rkad38LA15X4UQtjXZXNKsCgkshC3EbmcUmghTg= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.3/go.mod h1:UbnqO+zjqk3uIt9yCACHJ9IVNhyhOCnYk8yA19SAWrM= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 h1:zAybnyUQXIZ5mok5Jqwlf58/TFE7uvd3IAsa1aF9cXs= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10/go.mod h1:qqvMj6gHLR/EXWZw4ZbqlPbQUyenf4h82UQUlKc+l14= github.com/aws/aws-sdk-go-v2/config v1.29.14 h1:f+eEi/2cKCg9pqKBoAIwRGzVb70MRKqWX4dg1BDcSJM= github.com/aws/aws-sdk-go-v2/config v1.29.14/go.mod h1:wVPHWcIFv3WO89w0rE10gzf17ZYy+UVS1Geq8Iei34g= github.com/aws/aws-sdk-go-v2/credentials v1.17.67 h1:9KxtdcIA/5xPNQyZRgUSpYOE6j9Bc4+D7nZua0KGYOM= github.com/aws/aws-sdk-go-v2/credentials v1.17.67/go.mod h1:p3C44m+cfnbv763s52gCqrjaqyPikj9Sg47kUVaNZQQ= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mlnXuFrO4cOd3HLBroh1paFw= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.10 h1:zeN9UtUlA6FTx0vFSayxSX32HDw73Yb6Hh2izDSFxXY= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.10/go.mod h1:3HKuexPDcwLWPaqpW2UR/9n8N/u/3CKcGAzSs8p8u8g= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.73 h1:I91eIdOJMVK9oNiH2jvhp/AxMW+Gff8Rb5VjVHMhcJU= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.73/go.mod h1:vq7/m7dahFXcdzWVOvvjasDI9RcsD3RsTfHmDundJYg= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 h1:ZK5jHhnrioRkUNOc+hOgQKlUL5JeC3S6JgLxtQ+Rm0Q= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34/go.mod h1:p4VfIceZokChbA9FzMbRGz5OV+lekcVtHlPKEO0gSZY= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 h1:SZwFm17ZUNNg5Np0ioo/gq8Mn6u9w19Mri8DnJ15Jf0= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34/go.mod h1:dFZsC0BLo346mvKQLWmoJxT+Sjp+qcVR1tRVHQGOH9Q= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.15 h1:Z5r7SycxmSllHYmaAZPpmN8GviDrSGhMS6bldqtXZPw= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.15/go.mod h1:CetW7bDE00QoGEmPUoZuRog07SGVAUVW6LFpNP0YfIg= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34 h1:ZNTqv4nIdE/DiBfUUfXcLZ/Spcuz+RjeziUtNJackkM= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34/go.mod h1:zf7Vcd1ViW7cPqYWEHLHJkS50X0JS2IKz9Cgaj6ugrs= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b5IzM/lum78bZ590jy36+d/aFLgKF/4Vd1xPE= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3/go.mod h1:0yKJC/kb8sAnmlYa6Zs3QVYqaC8ug2AbnNChv5Ox3uA= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.17 h1:YPYe6ZmvUfDDDELqEKtAd6bo8zxhkm+XEFEzQisqUIE= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.17/go.mod h1:oBtcnYua/CgzCWYN7NZ5j7PotFDaFSUjCYVTtfyn7vw= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.0 h1:lguz0bmOoGzozP9XfRJR1QIayEYo+2vP/No3OfLF0pU= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.0/go.mod h1:iu6FSzgt+M2/x3Dk8zhycdIcHjEFb36IS8HVUVFoMg0= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 h1:dM9/92u2F1JbDaGooxTq18wmmFzbJRfXfVfy96/1CXM= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15/go.mod h1:SwFBy2vjtA0vZbjjaFtfN045boopadnoVPhu4Fv66vY= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.15 h1:246A4lSTXWJw/rmlQI+TT2OcqeDMKBdyjEQrafMaQdA= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.15/go.mod h1:haVfg3761/WF7YPuJOER2MP0k4UAXyHaLclKXB6usDg= -github.com/aws/aws-sdk-go-v2/service/s3 v1.58.3 h1:hT8ZAZRIfqBqHbzKTII+CIiY8G2oC9OpLedkZ51DWl8= -github.com/aws/aws-sdk-go-v2/service/s3 v1.58.3/go.mod h1:Lcxzg5rojyVPU/0eFwLtcyTaek/6Mtic5B1gJo7e/zE= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15 h1:moLQUoVq91LiqT1nbvzDukyqAlCv89ZmwaHw/ZFlFZg= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15/go.mod h1:ZH34PJUc8ApjBIfgQCFvkWcUDBtl/WTD+uiYHjd8igA= +github.com/aws/aws-sdk-go-v2/service/s3 v1.79.2 h1:tWUG+4wZqdMl/znThEk9tcCy8tTMxq8dW0JTgamohrY= +github.com/aws/aws-sdk-go-v2/service/s3 v1.79.2/go.mod h1:U5SNqwhXB3Xe6F47kXvWihPl/ilGaEDe8HD/50Z9wxc= github.com/aws/aws-sdk-go-v2/service/sso v1.25.3 h1:1Gw+9ajCV1jogloEv1RRnvfRFia2cL6c9cuKV2Ps+G8= github.com/aws/aws-sdk-go-v2/service/sso v1.25.3/go.mod h1:qs4a9T5EMLl/Cajiw2TcbNt2UNo/Hqlyp+GiuG4CFDI= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 h1:hXmVKytPfTy5axZ+fYbR5d0cFmC3JvwLm5kM83luako= From 490131cdb1f5a7d5eef696da46646b7057289b90 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Apr 2025 07:57:43 +0000 Subject: [PATCH 056/168] chore(deps): bump github.com/Azure/azure-sdk-for-go/sdk/storage/azblob Bumps [github.com/Azure/azure-sdk-for-go/sdk/storage/azblob](https://github.com/Azure/azure-sdk-for-go) from 1.6.0 to 1.6.1. - [Release notes](https://github.com/Azure/azure-sdk-for-go/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md) - [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/azcore/v1.6.0...sdk/azcore/v1.6.1) --- updated-dependencies: - dependency-name: github.com/Azure/azure-sdk-for-go/sdk/storage/azblob dependency-version: 1.6.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- azureblob/go.mod | 15 +++++++-------- azureblob/go.sum | 48 ++++++++++++++++++++++++------------------------ 2 files changed, 31 insertions(+), 32 deletions(-) diff --git a/azureblob/go.mod b/azureblob/go.mod index 295092b7..4852b12b 100644 --- a/azureblob/go.mod +++ b/azureblob/go.mod @@ -3,7 +3,7 @@ module github.com/gofiber/storage/azureblob/v2 go 1.23.0 require ( - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.0 + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.1 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.36.0 github.com/testcontainers/testcontainers-go/modules/azure v0.36.0 @@ -11,10 +11,9 @@ require ( require ( dario.cat/mergo v1.0.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.3.3 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/containerd/log v0.1.0 // indirect @@ -60,10 +59,10 @@ require ( go.opentelemetry.io/otel/sdk v1.35.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect go.opentelemetry.io/proto/otlp v1.5.0 // indirect - golang.org/x/crypto v0.35.0 // indirect - golang.org/x/net v0.36.0 // indirect - golang.org/x/sys v0.31.0 // indirect - golang.org/x/text v0.22.0 // indirect + golang.org/x/crypto v0.37.0 // indirect + golang.org/x/net v0.39.0 // indirect + golang.org/x/sys v0.32.0 // indirect + golang.org/x/text v0.24.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 // indirect google.golang.org/protobuf v1.36.6 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/azureblob/go.sum b/azureblob/go.sum index e56197e0..fb91880a 100644 --- a/azureblob/go.sum +++ b/azureblob/go.sum @@ -2,24 +2,24 @@ dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0 h1:g0EZJwz7xkXQiZAI5xi9f3WWFYBlX1CPTrR+NDToRkQ= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0/go.mod h1:XCW7KnZet0Opnr7HccfUw1PLc4CjHqpcaxW8DHklNkQ= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2 h1:F0gBpfdPLGsw+nsgk6aqqkZS1jiixa5WwFe3fk/T3Ys= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2/go.mod h1:SqINnQ9lVVdRlyC8cd1lCI0SdX4n2paeABd2K8ggfnE= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0 h1:Gt0j3wceWMwPmiazCa8MzMA0MfhmPIz0Qp0FJ6qcM0U= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0/go.mod h1:Ot/6aikWnKWi4l9QB7qVSwa8iMphQNqkWALMoNT3rzM= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.9.0 h1:OVoM452qUFBrX+URdH3VpR299ma4kfom0yB0URYky9g= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.9.0/go.mod h1:kUjrAo8bgEwLeZ/CmHqNl3Z/kPm7y6FKfxxK0izYUg4= github.com/Azure/azure-sdk-for-go/sdk/data/aztables v1.3.0 h1:NnE8y/opvxowwNcSNHubQUiSSEhfk3dmooLGAOmPuKs= github.com/Azure/azure-sdk-for-go/sdk/data/aztables v1.3.0/go.mod h1:GhHzPHiiHxZloo6WvKu9X7krmSAKTyGoIwoKMbrKTTA= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.6.0 h1:PiSrjRPpkQNjrM8H0WwKMnZUdu1RGMtd/LdGKUrOo+c= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.6.0/go.mod h1:oDrbWx4ewMylP7xHivfgixbfGBT6APAwsSoHRKotnIc= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.0 h1:UXT0o77lXQrikd1kgwIPQOUect7EoR/+sbP4wQKdzxM= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.0/go.mod h1:cTvi54pg19DoT07ekoeMgE/taAwNtCShVeZqA+Iv2xI= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 h1:FPKJS1T+clwv+OLGt13a8UjqeRuh0O4SJ3lUriThc+4= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1/go.mod h1:j2chePtV91HrC22tGoRX3sGY42uF13WzmmV80/OdVAA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.0 h1:LR0kAX9ykz8G4YgLCaRDVJ3+n43R8MneB5dTy2konZo= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.0/go.mod h1:DWAciXemNf++PQJLeXUB4HHH5OpsAh12HZnu2wXE1jA= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.1 h1:lhZdRq7TIx0GJQvSyX2Si406vrYsov2FXGp/RnSEtcs= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.1/go.mod h1:8cl44BDmi+effbARHMQjgOKA2AYvcohNm7KEt42mSV8= github.com/Azure/azure-sdk-for-go/sdk/storage/azqueue v1.0.0 h1:lJwNFV+xYjHREUTHJKx/ZF6CJSt9znxmLw9DqSTvyRU= github.com/Azure/azure-sdk-for-go/sdk/storage/azqueue v1.0.0/go.mod h1:GfT0aGew8Qj5yiQVqOO5v7N8fanbJGyUoHqXg56qcVY= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/AzureAD/microsoft-authentication-library-for-go v1.3.3 h1:H5xDQaE3XowWfhZRUpnfC+rGZMEVoSiji+b+/HFAPU4= -github.com/AzureAD/microsoft-authentication-library-for-go v1.3.3/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2 h1:oygO0locgZJe7PpYPXT5A29ZkwJaPqcva7BVeemZOZs= +github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= @@ -56,8 +56,8 @@ github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= -github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= +github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= @@ -150,16 +150,16 @@ go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= +golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -172,14 +172,14 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From 8463c7f8f41c02c029a16cf834136423c2359ff5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Apr 2025 07:57:57 +0000 Subject: [PATCH 057/168] chore(deps): bump github.com/minio/minio-go/v7 in /minio Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.90 to 7.0.91. - [Release notes](https://github.com/minio/minio-go/releases) - [Commits](https://github.com/minio/minio-go/compare/v7.0.90...v7.0.91) --- updated-dependencies: - dependency-name: github.com/minio/minio-go/v7 dependency-version: 7.0.91 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- minio/go.mod | 2 +- minio/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/minio/go.mod b/minio/go.mod index 3b04ffb9..9e378325 100644 --- a/minio/go.mod +++ b/minio/go.mod @@ -3,7 +3,7 @@ module github.com/gofiber/storage/minio go 1.23.0 require ( - github.com/minio/minio-go/v7 v7.0.90 + github.com/minio/minio-go/v7 v7.0.91 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.36.0 github.com/testcontainers/testcontainers-go/modules/minio v0.36.0 diff --git a/minio/go.sum b/minio/go.sum index 213f09db..3eb8eeb5 100644 --- a/minio/go.sum +++ b/minio/go.sum @@ -72,8 +72,8 @@ github.com/minio/crc64nvme v1.0.1 h1:DHQPrYPdqK7jQG/Ls5CTBZWeex/2FMS3G5XGkycuFrY github.com/minio/crc64nvme v1.0.1/go.mod h1:eVfm2fAzLlxMdUGc0EEBGSMmPwmXD5XiNRpnu9J3bvg= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.90 h1:TmSj1083wtAD0kEYTx7a5pFsv3iRYMsOJ6A4crjA1lE= -github.com/minio/minio-go/v7 v7.0.90/go.mod h1:uvMUcGrpgeSAAI6+sD3818508nUyMULw94j2Nxku/Go= +github.com/minio/minio-go/v7 v7.0.91 h1:tWLZnEfo3OZl5PoXQwcwTAPNNrjyWwOh6cbZitW5JQc= +github.com/minio/minio-go/v7 v7.0.91/go.mod h1:uvMUcGrpgeSAAI6+sD3818508nUyMULw94j2Nxku/Go= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= From 7ae8f414b1231b3fc8792f369dc1b0ce9006646f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Apr 2025 07:58:02 +0000 Subject: [PATCH 058/168] chore(deps): bump github.com/mdelapenya/tlscert in /nats Bumps [github.com/mdelapenya/tlscert](https://github.com/mdelapenya/tlscert) from 0.1.0 to 0.2.0. - [Release notes](https://github.com/mdelapenya/tlscert/releases) - [Commits](https://github.com/mdelapenya/tlscert/compare/v0.1.0...v0.2.0) --- updated-dependencies: - dependency-name: github.com/mdelapenya/tlscert dependency-version: 0.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- nats/go.mod | 2 +- nats/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nats/go.mod b/nats/go.mod index c669b525..d42238ab 100644 --- a/nats/go.mod +++ b/nats/go.mod @@ -3,7 +3,7 @@ module github.com/gofiber/storage/nats go 1.23.0 require ( - github.com/mdelapenya/tlscert v0.1.0 + github.com/mdelapenya/tlscert v0.2.0 github.com/nats-io/nats.go v1.41.2 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.36.0 diff --git a/nats/go.sum b/nats/go.sum index 2972260d..c5e7a5f6 100644 --- a/nats/go.sum +++ b/nats/go.sum @@ -59,8 +59,8 @@ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mdelapenya/tlscert v0.1.0 h1:YTpF579PYUX475eOL+6zyEO3ngLTOUWck78NBuJVXaM= -github.com/mdelapenya/tlscert v0.1.0/go.mod h1:wrbyM/DwbFCeCeqdPX/8c6hNOqQgbf0rUDErE1uD+64= +github.com/mdelapenya/tlscert v0.2.0 h1:7H81W6Z/4weDvZBNOfQte5GpIMo0lGYEeWbkGp5LJHI= +github.com/mdelapenya/tlscert v0.2.0/go.mod h1:O4njj3ELLnJjGdkN7M/vIVCpZ+Cf0L6muqOG4tLSl8o= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= From c596db0402b99ce036865abea257210391ae691b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Apr 2025 07:37:29 +0000 Subject: [PATCH 059/168] chore(deps): bump github.com/aws/aws-sdk-go-v2/service/dynamodb Bumps [github.com/aws/aws-sdk-go-v2/service/dynamodb](https://github.com/aws/aws-sdk-go-v2) from 1.42.4 to 1.43.0. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ivs/v1.42.4...service/s3/v1.43.0) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/dynamodb dependency-version: 1.43.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- dynamodb/go.mod | 2 +- dynamodb/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dynamodb/go.mod b/dynamodb/go.mod index 139024bb..73d4e585 100644 --- a/dynamodb/go.mod +++ b/dynamodb/go.mod @@ -7,7 +7,7 @@ require ( github.com/aws/aws-sdk-go-v2/config v1.29.14 github.com/aws/aws-sdk-go-v2/credentials v1.17.67 github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.18.12 - github.com/aws/aws-sdk-go-v2/service/dynamodb v1.42.4 + github.com/aws/aws-sdk-go-v2/service/dynamodb v1.43.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.36.0 github.com/testcontainers/testcontainers-go/modules/dynamodb v0.36.0 diff --git a/dynamodb/go.sum b/dynamodb/go.sum index 94f28e20..690fb50d 100644 --- a/dynamodb/go.sum +++ b/dynamodb/go.sum @@ -22,8 +22,8 @@ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 h1:SZwFm17ZUNNg5Np0io github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34/go.mod h1:dFZsC0BLo346mvKQLWmoJxT+Sjp+qcVR1tRVHQGOH9Q= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.42.4 h1:5GjCSGIpndYU/tVABz+4XnAcluU6wrjlPzAAgFUDG98= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.42.4/go.mod h1:yYaWRnVSPyAmexW5t7G3TcuYoalYfT+xQwzWsvtUQ7M= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.43.0 h1:w0Evr7ssE6gP/EjN6UpAvLyWEdv9NGPbW6awu5OGQc0= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.43.0/go.mod h1:yYaWRnVSPyAmexW5t7G3TcuYoalYfT+xQwzWsvtUQ7M= github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.25.3 h1:GHC1WTF3ZBZy+gvz2qtYB6ttALVx35hlwc4IzOIUY7g= github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.25.3/go.mod h1:lUqWdw5/esjPTkITXhN4C66o1ltwDq2qQ12j3SOzhVg= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b5IzM/lum78bZ590jy36+d/aFLgKF/4Vd1xPE= From 42cc20f51d3fccb48f7e6105d963c34568cecf7b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Apr 2025 07:39:52 +0000 Subject: [PATCH 060/168] chore(deps): bump github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue Bumps [github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue](https://github.com/aws/aws-sdk-go-v2) from 1.18.12 to 1.18.13. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/config/v1.18.13/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.12...config/v1.18.13) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue dependency-version: 1.18.13 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- dynamodb/go.mod | 2 +- dynamodb/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dynamodb/go.mod b/dynamodb/go.mod index 73d4e585..2b1b3018 100644 --- a/dynamodb/go.mod +++ b/dynamodb/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.36.3 github.com/aws/aws-sdk-go-v2/config v1.29.14 github.com/aws/aws-sdk-go-v2/credentials v1.17.67 - github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.18.12 + github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.18.13 github.com/aws/aws-sdk-go-v2/service/dynamodb v1.43.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.36.0 diff --git a/dynamodb/go.sum b/dynamodb/go.sum index 690fb50d..7ba00414 100644 --- a/dynamodb/go.sum +++ b/dynamodb/go.sum @@ -12,8 +12,8 @@ github.com/aws/aws-sdk-go-v2/config v1.29.14 h1:f+eEi/2cKCg9pqKBoAIwRGzVb70MRKqW github.com/aws/aws-sdk-go-v2/config v1.29.14/go.mod h1:wVPHWcIFv3WO89w0rE10gzf17ZYy+UVS1Geq8Iei34g= github.com/aws/aws-sdk-go-v2/credentials v1.17.67 h1:9KxtdcIA/5xPNQyZRgUSpYOE6j9Bc4+D7nZua0KGYOM= github.com/aws/aws-sdk-go-v2/credentials v1.17.67/go.mod h1:p3C44m+cfnbv763s52gCqrjaqyPikj9Sg47kUVaNZQQ= -github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.18.12 h1:mwAIR3fhxhSzXFj530LNCBe0JocYVQx6GuJpQiA+QOs= -github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.18.12/go.mod h1:9cWrNL8q7ApFmZzKhnb63ub4zrdMzOGQVn/kxvagfeE= +github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.18.13 h1:i4Ynl6Y/HhNajB3E5UStwNpJjqopr+6TDU+YpZLJkuo= +github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.18.13/go.mod h1:VlHydRtvtdo0onShlKNZN23pzPUgYCc+hlzehmIy5To= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mlnXuFrO4cOd3HLBroh1paFw= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 h1:ZK5jHhnrioRkUNOc+hOgQKlUL5JeC3S6JgLxtQ+Rm0Q= From 74b9f8786b1c690b389f01f67f5171a5cc8315d3 Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Fri, 25 Apr 2025 18:03:43 +0530 Subject: [PATCH 061/168] Added TLS/SSL options --- cassandra/cassandra.go | 9 +++++++++ cassandra/config.go | 20 ++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/cassandra/cassandra.go b/cassandra/cassandra.go index 0c04fc54..dddd8488 100644 --- a/cassandra/cassandra.go +++ b/cassandra/cassandra.go @@ -78,6 +78,12 @@ func New(cnfg Config) (*Storage, error) { // Create cluster config cluster := gocql.NewCluster(cfg.Hosts...) + + // Safe check for SSL options + if cfg.SslOpts != nil { + cluster.SslOpts = cfg.SslOpts + } + cluster.Consistency = cfg.Consistency cluster.ConnectTimeout = cfg.ConnectTimeout cluster.RetryPolicy = &gocql.SimpleRetryPolicy{NumRetries: cfg.MaxRetries} @@ -112,6 +118,9 @@ func (s *Storage) createOrVerifyKeySpace(reset bool) error { // Clone the original cluster config and set system keyspace systemCluster := *s.cluster systemCluster.Keyspace = "system" + systemCluster.PoolConfig = gocql.PoolConfig{ + HostSelectionPolicy: gocql.TokenAwareHostPolicy(gocql.RoundRobinHostPolicy()), + } // Connect to the system keyspace systemSession, err := systemCluster.CreateSession() diff --git a/cassandra/config.go b/cassandra/config.go index 3732c565..06db8944 100644 --- a/cassandra/config.go +++ b/cassandra/config.go @@ -20,6 +20,12 @@ type Config struct { // Optional. Default is Quorum // Consistency is the Cassandra consistency level. Consistency gocql.Consistency + // Optional. PoolConfig.HostSelectionPolicy = gocql.TokenAwareHostPolicy(gocql.RoundRobinHostPolicy()) + // PoolConfig is the Cassandra connection pool configuration. + PoolConfig *gocql.PoolConfig + // Optional. Default is false + // SslOpts is the SSL options for the Cassandra cluster. + SslOpts *gocql.SslOptions // Optional. Default is 10 minutes // Expiration is the time after which an entry is considered expired. Expiration time.Duration @@ -44,6 +50,10 @@ var ConfigDefault = Config{ Expiration: 10 * time.Minute, MaxRetries: 3, ConnectTimeout: 5 * time.Second, + SslOpts: nil, + PoolConfig: &gocql.PoolConfig{ + HostSelectionPolicy: gocql.TokenAwareHostPolicy(gocql.RoundRobinHostPolicy()), + }, } // configDefault applies `ConfigDefault` values to a user‑supplied Config. @@ -88,5 +98,15 @@ func configDefault(config ...Config) Config { cfg.ConnectTimeout = ConfigDefault.ConnectTimeout } + // Safe check for PoolConfig + if cfg.PoolConfig == nil { + cfg.PoolConfig = ConfigDefault.PoolConfig + } + + // Safe check for SslOpts + if cfg.SslOpts == nil { + cfg.SslOpts = ConfigDefault.SslOpts + } + return cfg } From 2f5cfe7538f74052e4b39203dc520a628237016f Mon Sep 17 00:00:00 2001 From: MitulShah1 Date: Fri, 25 Apr 2025 18:13:09 +0530 Subject: [PATCH 062/168] Added TLS/SSL options in Readme --- cassandra/README.md | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/cassandra/README.md b/cassandra/README.md index 1bffefaf..4053c450 100644 --- a/cassandra/README.md +++ b/cassandra/README.md @@ -87,12 +87,24 @@ type Config struct { // Optional. Default is Quorum // Consistency is the Cassandra consistency level. Consistency gocql.Consistency + // Optional. PoolConfig.HostSelectionPolicy = gocql.TokenAwareHostPolicy(gocql.RoundRobinHostPolicy()) + // PoolConfig is the Cassandra connection pool configuration. + PoolConfig *gocql.PoolConfig + // Optional. Default is false + // SslOpts is the SSL options for the Cassandra cluster. + SslOpts *gocql.SslOptions // Optional. Default is 10 minutes // Expiration is the time after which an entry is considered expired. Expiration time.Duration // Optional. Default is false // Reset is a flag to reset the database. Reset bool + // Optional. Default is 3 + // MaxRetries is the maximum number of retries for a query. + MaxRetries int + // Optional. Default is 5 seconds + // ConnectTimeout is the timeout for connecting to the Cassandra cluster. + ConnectTimeout time.Duration } ``` @@ -100,11 +112,17 @@ type Config struct { ```go var ConfigDefault = Config{ - Hosts: []string{"localhost:9042"}, - Keyspace: "gofiber", - Table: "kv_store", - Consistency: gocql.Quorum, - Reset: false, - Expiration: 10 * time.Minute, + Hosts: []string{"localhost:9042"}, + Keyspace: "gofiber", + Table: "kv_store", + Consistency: gocql.Quorum, + Reset: false, + Expiration: 10 * time.Minute, + MaxRetries: 3, + ConnectTimeout: 5 * time.Second, + SslOpts: nil, + PoolConfig: &gocql.PoolConfig{ + HostSelectionPolicy: gocql.TokenAwareHostPolicy(gocql.RoundRobinHostPolicy()), + }, } ``` From caa5078fef1b1b4333472f26a17da1293af0ac15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Yasir=20Na=C3=A7?= <76746351+aliyasirnac@users.noreply.github.com> Date: Sat, 26 Apr 2025 11:12:59 +0300 Subject: [PATCH 063/168] added coderabbit suggestion --- surrealdb/README.md | 3 ++- surrealdb/config.go | 17 ++++++++++------- surrealdb/surrealdb_test.go | 16 ++++++++++++++++ 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/surrealdb/README.md b/surrealdb/README.md index d3294b40..698ddb3f 100644 --- a/surrealdb/README.md +++ b/surrealdb/README.md @@ -18,7 +18,8 @@ title: SurrealDB ### Signatures ```go -func New(config ...Config) (*Storage, error) +func New(config ...Config) *Storage + func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error diff --git a/surrealdb/config.go b/surrealdb/config.go index 301b1e05..07bd974b 100644 --- a/surrealdb/config.go +++ b/surrealdb/config.go @@ -37,12 +37,12 @@ type Config struct { // The default table used to store key-value records DefaultTable string - // Mode determines the operational mode of SurrealDB. - // Accepted values: - // - "default" (requires authentication) - // - "memory" (in-memory mode, no authentication required) - // - "kv" (file-based key-value store, no authentication required) - Mode string + //// Mode determines the operational mode of SurrealDB. + //// Accepted values: + //// - "default" (requires authentication) + //// - "memory" (in-memory mode, no authentication required) - not supported + //// - "kv" (file-based key-value store, no authentication required) - not supported + //Mode string } var ConfigDefault = Config{ @@ -54,7 +54,6 @@ var ConfigDefault = Config{ Access: "full", Scope: "all", DefaultTable: "fiber_storage", - Mode: "default", // default, kv, memory } func configDefault(config ...Config) Config { @@ -98,5 +97,9 @@ func configDefault(config ...Config) Config { cfg.DefaultTable = ConfigDefault.DefaultTable } + //if cfg.Mode == "" { + // cfg.Mode = ConfigDefault.Mode + //} + return cfg } diff --git a/surrealdb/surrealdb_test.go b/surrealdb/surrealdb_test.go index ff9a1bd8..339cb3e5 100644 --- a/surrealdb/surrealdb_test.go +++ b/surrealdb/surrealdb_test.go @@ -110,6 +110,10 @@ func Test_Surrealdb_Delete(t *testing.T) { err = testStore.Delete("test") require.NoError(t, err) + + val, err := testStore.Get("test") + require.NoError(t, err) + require.Nil(t, val) } func Test_Surrealdb_Flush(t *testing.T) { @@ -117,7 +121,19 @@ func Test_Surrealdb_Flush(t *testing.T) { require.NoError(t, err) defer testStore.Close() + err = testStore.Set("test_key", []byte("test_value"), 0) require.NoError(t, err) + + val, err := testStore.Get("test_key") + require.NoError(t, err) + require.NotNil(t, val) + + err = testStore.Reset() + require.NoError(t, err) + + val, err = testStore.Get("test_key") + require.NoError(t, err) + require.Nil(t, val) } func Test_Surrealdb_GetExpired(t *testing.T) { From 0dea23ff24966e79b5c9424799e1d73d345a9711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Yasir=20Na=C3=A7?= <76746351+aliyasirnac@users.noreply.github.com> Date: Sat, 26 Apr 2025 11:22:31 +0300 Subject: [PATCH 064/168] removed Config.Mode until supported in official sdk and added connection url validation --- surrealdb/config.go | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/surrealdb/config.go b/surrealdb/config.go index 07bd974b..7fcf1224 100644 --- a/surrealdb/config.go +++ b/surrealdb/config.go @@ -1,5 +1,10 @@ package surrealdb +import ( + "log" + "strings" +) + // Config holds the configuration required to initialize and connect to a SurrealDB instance. // It includes authentication credentials, namespace/database selection, and default storage settings. // @@ -13,7 +18,7 @@ package surrealdb // - Scope: optional scope name for scoped authentication (e.g., user login scopes). // - DefaultTable: the default table name where key-value records will be stored. type Config struct { - // The connection URL to connect to SurrealDB + // WebSocket connections (ws:// or wss://) are recommended over HTTP for better reliability ConnectionString string // The namespace to be used in SurrealDB @@ -36,13 +41,6 @@ type Config struct { // The default table used to store key-value records DefaultTable string - - //// Mode determines the operational mode of SurrealDB. - //// Accepted values: - //// - "default" (requires authentication) - //// - "memory" (in-memory mode, no authentication required) - not supported - //// - "kv" (file-based key-value store, no authentication required) - not supported - //Mode string } var ConfigDefault = Config{ @@ -97,9 +95,10 @@ func configDefault(config ...Config) Config { cfg.DefaultTable = ConfigDefault.DefaultTable } - //if cfg.Mode == "" { - // cfg.Mode = ConfigDefault.Mode - //} + if !strings.HasPrefix(cfg.ConnectionString, "ws://") && !strings.HasPrefix(cfg.ConnectionString, "wss://") && + !strings.HasPrefix(cfg.ConnectionString, "http://") && !strings.HasPrefix(cfg.ConnectionString, "https://") { + log.Printf("Warning: ConnectionString %s doesn't start with ws://, wss://, http:// or https://", cfg.ConnectionString) + } return cfg } From c4bdc8f5e3860556f70bc3034cae0b12d3526f96 Mon Sep 17 00:00:00 2001 From: Sepehr Mohaghegh Date: Sat, 26 Apr 2025 16:52:55 +0330 Subject: [PATCH 065/168] Add example for using existing Redis connection This commit adds a section to the README showing how to create a Storage instance from an existing Redis client, facilitating client connection reuse. --- redis/README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/redis/README.md b/redis/README.md index b12d10c6..3e972b44 100644 --- a/redis/README.md +++ b/redis/README.md @@ -200,6 +200,43 @@ var ConfigDefault = Config{ } ``` +### Using an Existing Redis Connection +If you already have a Redis client configured in your application, you can create a Storage instance directly from that client. This is useful when you want to share an existing connection throughout your application instead of creating a new one. + +```go +import ( + "github.com/gofiber/storage/redis" + redigo "github.com/redis/go-redis/v9" + "fmt" + "context" +) + +func main() { + // Create or reuse a Redis universal client (e.g., redis.NewClient, redis.NewClusterClient, etc.) + client := redigo.NewUniversalClient(&redigo.UniversalOptions{ + Addrs: []string{"127.0.0.1:6379"}, + }) + + // Create a new Storage instance from the existing Redis client + store := redis.NewFromConnection(client) + + // Set a value + if err := store.Set("john", []byte("doe"), 0); err != nil { + panic(err) + } + + // Get the value + val, err := store.Get("john") + if err != nil { + panic(err) + } + fmt.Println("Stored value:", string(val)) + + // Clean up + store.Close() +} +``` + ### Example: Using DragonflyDB > **Note:** You can use [DragonflyDB](https://dragonflydb.io/) in the same way as Redis. > Simply start a DragonflyDB server and configure it just like Redis. Then, call `New()` and use it exactly as you would with Redis. From 0cf84b3048fb6c4989d23c4c7457e0edb96ee63c Mon Sep 17 00:00:00 2001 From: Sepehr Mohaghegh Date: Sat, 26 Apr 2025 16:55:55 +0330 Subject: [PATCH 066/168] Add unit tests for Redis connection Implemented tests to verify Redis key management functions including set, get, and delete operations. Ensuring data integrity and operation correctness in Redis storage. --- redis/redis_test.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/redis/redis_test.go b/redis/redis_test.go index a65ad1d2..01115778 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -576,3 +576,27 @@ func Benchmark_Redis_WithConnection_Get(b *testing.B) { require.NoError(b, err) } + +func Test_Redis_NewFromConnection(t *testing.T) { + t.Parallel() + + connection := New(Config{ + Reset: true, + }) + + testStore := NewFromConnection(connection.Conn()) + + err := testStore.Set("foo", []byte("bar"), 0) + require.NoError(t, err, "failed to set key in Redis storage") + + val, err := testStore.Get("foo") + require.NoError(t, err, "failed to get key from Redis storage") + require.Equal(t, []byte("bar"), val, "value mismatch in Redis storage") + + err = testStore.Delete("foo") + require.NoError(t, err, "failed to delete key in Redis storage") + + val, err = testStore.Get("foo") + + require.Nil(t, val, "expected value to be nil after deletion") +} From 39f965ffbbf265fc4f7e6f4c1d85afb2d14fcff8 Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez Date: Sat, 26 Apr 2025 09:54:27 -0400 Subject: [PATCH 067/168] Update dependencies, add script for updating in the future --- .github/scripts/update-deps.sh | 33 +++++++++++++++++++++ cassandra/go.mod | 5 ++-- cassandra/go.sum | 7 +++-- clickhouse/go.mod | 4 +-- clickhouse/go.sum | 8 +++--- coherence/go.mod | 14 ++++----- coherence/go.sum | 49 +++++++++++++++++++------------- couchbase/go.mod | 18 ++++++------ couchbase/go.sum | 52 ++++++++++++++++++---------------- dynamodb/go.mod | 2 +- dynamodb/go.sum | 4 +-- leveldb/go.mod | 9 ++++-- leveldb/go.sum | 13 ++++++++- minio/go.mod | 8 +++--- minio/go.sum | 20 ++++++------- mongodb/go.mod | 12 ++++---- mongodb/go.sum | 28 +++++++++--------- postgres/go.mod | 8 +++--- postgres/go.sum | 20 ++++++------- scylladb/go.mod | 2 +- scylladb/go.sum | 4 +-- valkey/go.mod | 6 ++-- valkey/go.sum | 26 ++++++++--------- 23 files changed, 206 insertions(+), 146 deletions(-) create mode 100755 .github/scripts/update-deps.sh diff --git a/.github/scripts/update-deps.sh b/.github/scripts/update-deps.sh new file mode 100755 index 00000000..22959a4d --- /dev/null +++ b/.github/scripts/update-deps.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# Loop over all directories except dot-directories +for dir in */ ; do + # Skip hidden directories + [[ "$dir" == .* ]] && continue + + if [ -d "$dir" ]; then + echo "Processing $dir" + ( + cd "$dir" || exit + + if [ -f "go.mod" ]; then + goversion=$(grep '^go ' go.mod | awk '{print $2}') + if [ -n "$goversion" ]; then + major=$(echo "$goversion" | cut -d. -f1) + minor=$(echo "$goversion" | cut -d. -f2) + + # If Go version is >= 1.23 + if [ "$major" -gt 1 ] || { [ "$major" -eq 1 ] && [ "$minor" -ge 23 ]; }; then + echo "Running go get -u (go.mod version: $goversion)" + GOTOOLCHAIN=local go get -u + else + echo "Skipping go get -u (go.mod version: $goversion < 1.23)" + fi + fi + fi + + GOTOOLCHAIN=local go mod tidy + ) + fi +done + diff --git a/cassandra/go.mod b/cassandra/go.mod index a239c2f7..c38b72c7 100644 --- a/cassandra/go.mod +++ b/cassandra/go.mod @@ -4,6 +4,7 @@ go 1.23.0 require ( github.com/gocql/gocql v1.7.0 + github.com/scylladb/gocqlx/v2 v2.8.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.36.0 github.com/testcontainers/testcontainers-go/modules/cassandra v0.36.0 @@ -28,7 +29,7 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/snappy v1.0.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect @@ -48,7 +49,6 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/scylladb/go-reflectx v1.0.1 // indirect - github.com/scylladb/gocqlx/v2 v2.8.0 // indirect github.com/shirou/gopsutil/v4 v4.25.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect @@ -61,6 +61,7 @@ require ( go.opentelemetry.io/otel/sdk v1.32.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect golang.org/x/crypto v0.35.0 // indirect + golang.org/x/sync v0.10.0 // indirect golang.org/x/sys v0.31.0 // indirect google.golang.org/grpc v1.70.0 // indirect google.golang.org/protobuf v1.36.5 // indirect diff --git a/cassandra/go.sum b/cassandra/go.sum index 47ca9050..d1d6e320 100644 --- a/cassandra/go.sum +++ b/cassandra/go.sum @@ -46,10 +46,9 @@ github.com/gocql/gocql v1.7.0 h1:O+7U7/1gSN7QTEAaMEsJc1Oq2QHXvCWoF3DFK9HDHus= github.com/gocql/gocql v1.7.0/go.mod h1:vnlvXyFZeLBF0Wy+RS8hrOdbn0UWsWtdg07XJnFxZ+4= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs= +github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= @@ -161,6 +160,8 @@ golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/clickhouse/go.mod b/clickhouse/go.mod index cf76354c..513f4cb0 100644 --- a/clickhouse/go.mod +++ b/clickhouse/go.mod @@ -34,7 +34,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect - github.com/klauspost/compress v1.17.11 // indirect + github.com/klauspost/compress v1.18.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/magiconair/properties v1.8.9 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect @@ -64,6 +64,6 @@ require ( go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect golang.org/x/crypto v0.35.0 // indirect - golang.org/x/sys v0.31.0 // indirect + golang.org/x/sys v0.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/clickhouse/go.sum b/clickhouse/go.sum index e216bc2b..d02b5c6e 100644 --- a/clickhouse/go.sum +++ b/clickhouse/go.sum @@ -64,8 +64,8 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9K github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= -github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= +github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= +github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -193,8 +193,8 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= diff --git a/coherence/go.mod b/coherence/go.mod index 08976238..da4ca4f2 100644 --- a/coherence/go.mod +++ b/coherence/go.mod @@ -2,7 +2,6 @@ module github.com/gofiber/storage/coherence go 1.23.0 - require ( github.com/oracle/coherence-go-client/v2 v2.1.0 github.com/stretchr/testify v1.10.0 @@ -12,18 +11,17 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250425173222-7b384671a197 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) require ( - github.com/golang/protobuf v1.5.3 // indirect github.com/google/uuid v1.6.0 // indirect github.com/kr/pretty v0.1.0 // indirect - golang.org/x/net v0.36.0 // indirect - golang.org/x/sys v0.30.0 // indirect - golang.org/x/text v0.23.0 // indirect - google.golang.org/grpc v1.58.3 // indirect - google.golang.org/protobuf v1.36.1 // indirect + golang.org/x/net v0.39.0 // indirect + golang.org/x/sys v0.32.0 // indirect + golang.org/x/text v0.24.0 // indirect + google.golang.org/grpc v1.72.0 // indirect + google.golang.org/protobuf v1.36.6 // indirect gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect ) diff --git a/coherence/go.sum b/coherence/go.sum index 5cceceab..4b6a7e67 100644 --- a/coherence/go.sum +++ b/coherence/go.sum @@ -1,10 +1,12 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -23,21 +25,30 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= -golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= -golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= -golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= -google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk= -google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= +go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= +go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= +go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= +go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= +go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= +go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= +go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= +go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= +go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= +golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= +golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250425173222-7b384671a197 h1:29cjnHVylHwTzH66WfFZqgSQgnxzvWE+jvBwpZCLRxY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250425173222-7b384671a197/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.72.0 h1:S7UkcVa60b5AAQTaO6ZKamFp1zMZSU0fGDK2WZLbBnM= +google.golang.org/grpc v1.72.0/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/couchbase/go.mod b/couchbase/go.mod index 4705d295..99393208 100644 --- a/couchbase/go.mod +++ b/couchbase/go.mod @@ -32,7 +32,7 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/snappy v1.0.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect @@ -61,19 +61,19 @@ require ( github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect go.opentelemetry.io/otel v1.35.0 // indirect go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/crypto v0.35.0 // indirect - golang.org/x/net v0.36.0 // indirect - golang.org/x/sys v0.31.0 // indirect - golang.org/x/text v0.22.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.64.1 // indirect - google.golang.org/protobuf v1.33.0 // indirect + golang.org/x/crypto v0.37.0 // indirect + golang.org/x/net v0.39.0 // indirect + golang.org/x/sys v0.32.0 // indirect + golang.org/x/text v0.24.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250425173222-7b384671a197 // indirect + google.golang.org/grpc v1.72.0 // indirect + google.golang.org/protobuf v1.36.6 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/couchbase/go.sum b/couchbase/go.sum index 56647131..4b154c6d 100644 --- a/couchbase/go.sum +++ b/couchbase/go.sum @@ -70,8 +70,10 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs= +github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= @@ -164,8 +166,8 @@ github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 h1:x7wzEgXfnzJcHDwStJT+mxOz4etr2EcexjqhBvmoakw= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0/go.mod h1:rg+RlpR5dKwaS95IyyZqj5Wd4E13lk/msnTS0Xl9lJM= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= @@ -176,8 +178,10 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMey go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= -go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= -go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= +go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= +go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= +go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= +go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= @@ -195,8 +199,8 @@ go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -212,8 +216,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= +golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -232,14 +236,14 @@ golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -261,19 +265,19 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e h1:Ao9GzfUMPH3zjVfzXG5rlWlk+Q8MXWKwWpwVQE1MXfw= -google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= -google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a h1:nwKuGPlUAt+aR+pcrkfFRrTU1BVrSmYyYMxYbUIVHr0= +google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a/go.mod h1:3kWAYMk1I75K4vykHtKt2ycnOgpA6974V7bREqbsenU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250425173222-7b384671a197 h1:29cjnHVylHwTzH66WfFZqgSQgnxzvWE+jvBwpZCLRxY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250425173222-7b384671a197/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= -google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/grpc v1.72.0 h1:S7UkcVa60b5AAQTaO6ZKamFp1zMZSU0fGDK2WZLbBnM= +google.golang.org/grpc v1.72.0/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/dynamodb/go.mod b/dynamodb/go.mod index 2b1b3018..c879b570 100644 --- a/dynamodb/go.mod +++ b/dynamodb/go.mod @@ -28,7 +28,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/sso v1.25.3 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 // indirect - github.com/aws/smithy-go v1.22.2 // indirect + github.com/aws/smithy-go v1.22.3 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect diff --git a/dynamodb/go.sum b/dynamodb/go.sum index 7ba00414..06a925c4 100644 --- a/dynamodb/go.sum +++ b/dynamodb/go.sum @@ -38,8 +38,8 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 h1:hXmVKytPfTy5axZ+fYbR5d0c github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1/go.mod h1:MlYRNmYu/fGPoxBQVvBYr9nyr948aY/WLUvwBMBJubs= github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 h1:1XuUZ8mYJw9B6lzAkXhqHlJd/XvaX32evhproijJEZY= github.com/aws/aws-sdk-go-v2/service/sts v1.33.19/go.mod h1:cQnB8CUnxbMU82JvlqjKR2HBOm3fe9pWorWBza6MBJ4= -github.com/aws/smithy-go v1.22.2 h1:6D9hW43xKFrRx/tXXfAlIZc4JI+yQe6snnWcQyxSyLQ= -github.com/aws/smithy-go v1.22.2/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/aws/smithy-go v1.22.3 h1:Z//5NuZCSW6R4PhQ93hShNbyBbn8BWCmCVCt+Q8Io5k= +github.com/aws/smithy-go v1.22.3/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= diff --git a/leveldb/go.mod b/leveldb/go.mod index a2dd2cf5..57746216 100644 --- a/leveldb/go.mod +++ b/leveldb/go.mod @@ -2,11 +2,14 @@ module github.com/gofiber/storage/leveldb go 1.23 +require ( + github.com/stretchr/testify v1.10.0 + github.com/syndtr/goleveldb v1.0.0 +) + require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db // indirect + github.com/golang/snappy v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/testify v1.10.0 // indirect - github.com/syndtr/goleveldb v1.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/leveldb/go.sum b/leveldb/go.sum index 8495d2a5..662dc378 100644 --- a/leveldb/go.sum +++ b/leveldb/go.sum @@ -2,11 +2,15 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs= +github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -14,13 +18,20 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/minio/go.mod b/minio/go.mod index 9e378325..dc932c4f 100644 --- a/minio/go.mod +++ b/minio/go.mod @@ -63,9 +63,9 @@ require ( go.opentelemetry.io/otel v1.35.0 // indirect go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect - golang.org/x/crypto v0.36.0 // indirect - golang.org/x/net v0.38.0 // indirect - golang.org/x/sys v0.31.0 // indirect - golang.org/x/text v0.23.0 // indirect + golang.org/x/crypto v0.37.0 // indirect + golang.org/x/net v0.39.0 // indirect + golang.org/x/sys v0.32.0 // indirect + golang.org/x/text v0.24.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/minio/go.sum b/minio/go.sum index 3eb8eeb5..9e7f6738 100644 --- a/minio/go.sum +++ b/minio/go.sum @@ -147,16 +147,16 @@ go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v8 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= -golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= -golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= +golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -169,14 +169,14 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= -golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= -golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/mongodb/go.mod b/mongodb/go.mod index e0e6fb36..41b02c23 100644 --- a/mongodb/go.mod +++ b/mongodb/go.mod @@ -28,10 +28,10 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/snappy v1.0.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect - github.com/klauspost/compress v1.17.4 // indirect + github.com/klauspost/compress v1.18.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/magiconair/properties v1.8.9 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect @@ -61,9 +61,9 @@ require ( go.opentelemetry.io/otel v1.35.0 // indirect go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect - golang.org/x/crypto v0.35.0 // indirect - golang.org/x/sync v0.11.0 // indirect - golang.org/x/sys v0.31.0 // indirect - golang.org/x/text v0.22.0 // indirect + golang.org/x/crypto v0.37.0 // indirect + golang.org/x/sync v0.13.0 // indirect + golang.org/x/sys v0.32.0 // indirect + golang.org/x/text v0.24.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/mongodb/go.sum b/mongodb/go.sum index 4f8ef721..686058f0 100644 --- a/mongodb/go.sum +++ b/mongodb/go.sum @@ -40,8 +40,8 @@ github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs= +github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= @@ -51,8 +51,8 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rH github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= -github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= +github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -144,8 +144,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -161,8 +161,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= -golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= +golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -176,18 +176,18 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/postgres/go.mod b/postgres/go.mod index 81d5a702..650fc6b3 100644 --- a/postgres/go.mod +++ b/postgres/go.mod @@ -58,9 +58,9 @@ require ( go.opentelemetry.io/otel v1.35.0 // indirect go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect - golang.org/x/crypto v0.35.0 // indirect - golang.org/x/sync v0.11.0 // indirect - golang.org/x/sys v0.31.0 // indirect - golang.org/x/text v0.22.0 // indirect + golang.org/x/crypto v0.37.0 // indirect + golang.org/x/sync v0.13.0 // indirect + golang.org/x/sys v0.32.0 // indirect + golang.org/x/text v0.24.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/postgres/go.sum b/postgres/go.sum index 8c669f93..1307b144 100644 --- a/postgres/go.sum +++ b/postgres/go.sum @@ -141,8 +141,8 @@ go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v8 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -154,8 +154,8 @@ golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= -golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= +golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -165,14 +165,14 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/scylladb/go.mod b/scylladb/go.mod index faa37245..9892856f 100644 --- a/scylladb/go.mod +++ b/scylladb/go.mod @@ -28,7 +28,7 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/snappy v1.0.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect diff --git a/scylladb/go.sum b/scylladb/go.sum index 7b6702db..8fccefa4 100644 --- a/scylladb/go.sum +++ b/scylladb/go.sum @@ -75,8 +75,8 @@ github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiU github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs= +github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= diff --git a/valkey/go.mod b/valkey/go.mod index 3782de84..b36977f3 100644 --- a/valkey/go.mod +++ b/valkey/go.mod @@ -1,15 +1,15 @@ module github.com/gofiber/storage/valkey -go 1.23 +go 1.23.0 require ( github.com/stretchr/testify v1.10.0 - github.com/valkey-io/valkey-go v1.0.53 + github.com/valkey-io/valkey-go v1.0.57 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/sys v0.24.0 // indirect + golang.org/x/sys v0.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/valkey/go.sum b/valkey/go.sum index ef70ad00..087a2549 100644 --- a/valkey/go.sum +++ b/valkey/go.sum @@ -1,27 +1,25 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= -github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= +github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8= +github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/valkey-io/valkey-go v1.0.53 h1:bntDqQVPzkLdE/4ypXBrHalXJB+BOTMk+JwXNRCGudg= -github.com/valkey-io/valkey-go v1.0.53/go.mod h1:BXlVAPIL9rFQinSFM+N32JfWzfCaUAqBpZkc4vPY6fM= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +github.com/valkey-io/valkey-go v1.0.57 h1:rMpREZ7kvWwv9vHkB1WTpI9rX4dQHsvPHimSWenScvI= +github.com/valkey-io/valkey-go v1.0.57/go.mod h1:sxpCChk8i3oTG+A/lUi9Lj8C/7WI+yhnQCvDJlPVKNM= +golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c= +golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= +golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 616d9d8f8fa5f67b99918ae18879b6810369d510 Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez Date: Sat, 26 Apr 2025 10:10:33 -0400 Subject: [PATCH 068/168] Add missing condition for Valkey during Benchmarks --- .github/workflows/benchmark.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index ee4b7a27..feb023fb 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -107,9 +107,10 @@ jobs: auto-start: 'false' - name: Run Redis - if: ${{ matrix.package == 'redis' || matrix.package == 'rueidis' }} + if: ${{ matrix.package == 'redis' || matrix.package == 'rueidis' || matrix.package == 'valkey' }} run: | redis-server --port 6379 & + sleep 15 - name: Run Benchmarks working-directory: ${{ matrix.package }} @@ -155,4 +156,4 @@ jobs: auto-push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} save-data-file: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} - \ No newline at end of file + From 40167cc6c8dc0aa0c01e1e5c83a1f681bd696834 Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez Date: Sat, 26 Apr 2025 10:11:20 -0400 Subject: [PATCH 069/168] Add missing condition --- .github/workflows/benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index feb023fb..15a6cd2d 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -100,7 +100,7 @@ jobs: bitnami/etcd:latest - name: Setup Redis - if: ${{ matrix.package == 'redis' || matrix.package == 'rueidis' }} + if: ${{ matrix.package == 'redis' || matrix.package == 'rueidis' || matrix.package == 'valkey' }} uses: shogo82148/actions-setup-redis@v1 with: redis-version: '7.x' From e831cb421cc7aa9752fac55fdfb17dbd984d2760 Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez <835733+gaby@users.noreply.github.com> Date: Sat, 26 Apr 2025 11:39:56 -0400 Subject: [PATCH 070/168] Update redis/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- redis/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redis/README.md b/redis/README.md index 3e972b44..2970005c 100644 --- a/redis/README.md +++ b/redis/README.md @@ -21,7 +21,7 @@ A Redis storage driver using [go-redis/redis](https://github.com/go-redis/redis) ### Signatures ```go func New(config ...Config) Storage -func NewFromConnection(conn redis.UniversalClient) Storage +func NewFromConnection(conn redis.UniversalClient) *Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error From cd0b0a83779e12d27b59220971d033f25c5b4a9d Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez <835733+gaby@users.noreply.github.com> Date: Sat, 26 Apr 2025 12:19:21 -0400 Subject: [PATCH 071/168] Remove new benchmarks, they are not needed. --- redis/redis_test.go | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/redis/redis_test.go b/redis/redis_test.go index 01115778..cbfc0c43 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -540,43 +540,6 @@ func Benchmark_Redis_SetAndDelete(b *testing.B) { require.NoError(b, err) } -func Benchmark_Redis_WithConnection_SetAndDelete(b *testing.B) { - connection := New(Config{ - Reset: true, - }) - - testStore := NewFromConnection(connection.Conn()) - b.ReportAllocs() - b.ResetTimer() - - var err error - for i := 0; i < b.N; i++ { - _ = testStore.Set("john", []byte("doe"), 0) - err = testStore.Delete("john") - } - - require.NoError(b, err) -} - -func Benchmark_Redis_WithConnection_Get(b *testing.B) { - connection := New(Config{ - Reset: true, - }) - - testStore := NewFromConnection(connection.Conn()) - err := testStore.Set("john", []byte("doe"), 0) - require.NoError(b, err) - - b.ReportAllocs() - b.ResetTimer() - - for i := 0; i < b.N; i++ { - _, err = testStore.Get("john") - } - - require.NoError(b, err) -} - func Test_Redis_NewFromConnection(t *testing.T) { t.Parallel() From d43750be06fe3e153eb725da6c2b9dbadef4ca47 Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez <835733+gaby@users.noreply.github.com> Date: Sat, 26 Apr 2025 12:22:03 -0400 Subject: [PATCH 072/168] Add missing Go versions --- .github/workflows/test-redis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test-redis.yml b/.github/workflows/test-redis.yml index c775a9fe..2fd997d5 100644 --- a/.github/workflows/test-redis.yml +++ b/.github/workflows/test-redis.yml @@ -18,6 +18,9 @@ jobs: - 1.19.x - 1.20.x - 1.21.x + - 1.22.x + - 1.23.x + - 1.24.x redis: - '6.x' - '7.x' From b5fc84ac5bc336558240c09871dee86be5137b84 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Apr 2025 17:21:15 +0000 Subject: [PATCH 073/168] chore(deps): bump github.com/testcontainers/testcontainers-go Bumps [github.com/testcontainers/testcontainers-go](https://github.com/testcontainers/testcontainers-go) from 0.35.0 to 0.36.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.35.0...v0.36.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- postgres/go.mod | 4 ++-- postgres/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/postgres/go.mod b/postgres/go.mod index 650fc6b3..044bbfce 100644 --- a/postgres/go.mod +++ b/postgres/go.mod @@ -5,7 +5,7 @@ go 1.23.0 require ( github.com/jackc/pgx/v5 v5.7.4 github.com/stretchr/testify v1.10.0 - github.com/testcontainers/testcontainers-go v0.36.0 + github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/postgres v0.36.0 ) @@ -35,7 +35,7 @@ require ( github.com/jackc/puddle/v2 v2.2.2 // indirect github.com/klauspost/compress v1.17.4 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/magiconair/properties v1.8.9 // indirect + github.com/magiconair/properties v1.8.10 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect diff --git a/postgres/go.sum b/postgres/go.sum index 1307b144..b8fbcafd 100644 --- a/postgres/go.sum +++ b/postgres/go.sum @@ -67,8 +67,8 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= -github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mdelapenya/tlscert v0.1.0 h1:YTpF579PYUX475eOL+6zyEO3ngLTOUWck78NBuJVXaM= github.com/mdelapenya/tlscert v0.1.0/go.mod h1:wrbyM/DwbFCeCeqdPX/8c6hNOqQgbf0rUDErE1uD+64= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= @@ -108,8 +108,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= -github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= github.com/testcontainers/testcontainers-go/modules/postgres v0.36.0 h1:xTGNNsOD9IIssH0dnAGNUH+SD9GYWyaP2t5xD2lg0as= github.com/testcontainers/testcontainers-go/modules/postgres v0.36.0/go.mod h1:WKS3MGq1lzbVibIRnL08TOaf5bKWPxJe5frzyQfV4oY= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= From 87a8c2351590273d1278057e2274a9cb149eb3f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Apr 2025 17:24:19 +0000 Subject: [PATCH 074/168] chore(deps): bump github.com/microsoft/go-mssqldb in /mssql Bumps [github.com/microsoft/go-mssqldb](https://github.com/microsoft/go-mssqldb) from 1.7.2 to 1.8.0. - [Release notes](https://github.com/microsoft/go-mssqldb/releases) - [Changelog](https://github.com/microsoft/go-mssqldb/blob/main/CHANGELOG.md) - [Commits](https://github.com/microsoft/go-mssqldb/compare/v1.7.2...v1.8.0) --- updated-dependencies: - dependency-name: github.com/microsoft/go-mssqldb dependency-version: 1.8.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- mssql/go.mod | 7 ++++--- mssql/go.sum | 27 ++++++++++++++------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/mssql/go.mod b/mssql/go.mod index 879c3752..e0a30a9b 100644 --- a/mssql/go.mod +++ b/mssql/go.mod @@ -3,7 +3,7 @@ module github.com/gofiber/storage/mssql/v2 go 1.19 require ( - github.com/microsoft/go-mssqldb v1.7.2 + github.com/microsoft/go-mssqldb v1.8.0 github.com/stretchr/testify v1.10.0 ) @@ -11,8 +11,9 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect github.com/golang-sql/sqlexp v0.1.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/crypto v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/crypto v0.24.0 // indirect + golang.org/x/text v0.16.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/mssql/go.sum b/mssql/go.sum index 70c070e0..9cb3d65c 100644 --- a/mssql/go.sum +++ b/mssql/go.sum @@ -1,31 +1,32 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 h1:lGlwhPtrX6EVml1hO0ivjkUxsSyl4dsiw9qcA1k/3IQ= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 h1:6oNBlSdi1QqM1PNW7FPA6xOGA5UNsXnkaYZz9vdPGhA= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 h1:E+OJmp2tPvt1W+amx48v1eqbjDYsgN+RzP4q16yV5eM= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0 h1:U2rTu3Ef+7w9FHKIAXM6ZyqF3UOWJZ12zIm8zECAFfg= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0 h1:jBQA3cKT4L2rWMpgE7Yt3Hwh2aUj8KXjIGLxjHeYNNo= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1 h1:MyVTgWR8qd/Jw1Le0NZebGBUCLbtak3bJ3z1OlqZBpw= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 h1:D3occbWoio4EBLkbkevetNMAVX197GkzbUMtqjGWn80= -github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= +github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA= github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A= github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/microsoft/go-mssqldb v1.7.2 h1:CHkFJiObW7ItKTJfHo1QX7QBBD1iV+mn1eOyRP3b/PA= -github.com/microsoft/go-mssqldb v1.7.2/go.mod h1:kOvZKUdrhhFQmxLZqbwUV0rHkNkZpthMITIb2Ko1IoA= +github.com/microsoft/go-mssqldb v1.8.0 h1:7cyZ/AT7ycDsEoWPIXibd+aVKFtteUNhDGf3aobP+tw= +github.com/microsoft/go-mssqldb v1.8.0/go.mod h1:6znkekS3T2vp0waiMhen4GPU1BiAsrP+iXHcE7a7rFo= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= From c544464e93c6e357d13a4a291d96ee5b8b92bd2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Mon, 28 Apr 2025 08:09:40 +0200 Subject: [PATCH 075/168] chore: bump testcontainers to v0.37.0 --- redis/go.mod | 12 ++--- redis/go.sum | 38 +++++++-------- redis/redis_test.go | 114 +++++--------------------------------------- 3 files changed, 35 insertions(+), 129 deletions(-) diff --git a/redis/go.mod b/redis/go.mod index cfedf071..0ab3209e 100644 --- a/redis/go.mod +++ b/redis/go.mod @@ -3,11 +3,10 @@ module github.com/gofiber/storage/redis/v3 go 1.23.0 require ( - github.com/mdelapenya/tlscert v0.1.0 github.com/redis/go-redis/v9 v9.7.3 github.com/stretchr/testify v1.10.0 - github.com/testcontainers/testcontainers-go v0.36.0 - github.com/testcontainers/testcontainers-go/modules/redis v0.36.0 + github.com/testcontainers/testcontainers-go v0.37.0 + github.com/testcontainers/testcontainers-go/modules/redis v0.37.0 ) require ( @@ -34,7 +33,8 @@ require ( github.com/google/uuid v1.6.0 // indirect github.com/klauspost/compress v1.18.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/magiconair/properties v1.8.9 // indirect + github.com/magiconair/properties v1.8.10 // indirect + github.com/mdelapenya/tlscert v0.2.0 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect @@ -60,8 +60,8 @@ require ( go.opentelemetry.io/otel/sdk v1.35.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect go.opentelemetry.io/proto/otlp v1.5.0 // indirect - golang.org/x/crypto v0.35.0 // indirect - golang.org/x/sys v0.31.0 // indirect + golang.org/x/crypto v0.37.0 // indirect + golang.org/x/sys v0.32.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e // indirect google.golang.org/protobuf v1.36.6 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/redis/go.sum b/redis/go.sum index 4db89892..e870d7b3 100644 --- a/redis/go.sum +++ b/redis/go.sum @@ -46,8 +46,6 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= -github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -67,10 +65,10 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= -github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mdelapenya/tlscert v0.1.0 h1:YTpF579PYUX475eOL+6zyEO3ngLTOUWck78NBuJVXaM= -github.com/mdelapenya/tlscert v0.1.0/go.mod h1:wrbyM/DwbFCeCeqdPX/8c6hNOqQgbf0rUDErE1uD+64= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mdelapenya/tlscert v0.2.0 h1:7H81W6Z/4weDvZBNOfQte5GpIMo0lGYEeWbkGp5LJHI= +github.com/mdelapenya/tlscert v0.2.0/go.mod h1:O4njj3ELLnJjGdkN7M/vIVCpZ+Cf0L6muqOG4tLSl8o= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= @@ -109,10 +107,10 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= -github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= -github.com/testcontainers/testcontainers-go/modules/redis v0.36.0 h1:Z+6APQ0DjQP8Kj5Fu+lkAlH2v7f5QkAQyyjnf1Kq8sw= -github.com/testcontainers/testcontainers-go/modules/redis v0.36.0/go.mod h1:LV66RJhSMikZrxJRc6O0nKcRqykmjQSyX82S93haE2w= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= +github.com/testcontainers/testcontainers-go/modules/redis v0.37.0 h1:9HIY28I9ME/Zmb+zey1p/I1mto5+5ch0wLX+nJdOsQ4= +github.com/testcontainers/testcontainers-go/modules/redis v0.37.0/go.mod h1:Abu9g/25Qv+FkYVx3U4Voaynou1c+7D0HIhaQJXvk6E= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -142,16 +140,16 @@ go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -164,14 +162,14 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/redis/redis_test.go b/redis/redis_test.go index 4e2738de..372ba30b 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -1,16 +1,12 @@ package redis import ( - "bytes" "context" - "crypto/tls" - "net" "os" "strings" "testing" "time" - "github.com/mdelapenya/tlscert" "github.com/stretchr/testify/require" "github.com/testcontainers/testcontainers-go" @@ -23,7 +19,6 @@ const ( redisImage = "docker.io/redis:7" redisImageEnvVar = "TEST_REDIS_IMAGE" redisPort = "6379/tcp" - redisTLSPort = "6380/tcp" ) type testStoreSettings struct { @@ -70,53 +65,6 @@ func withURL(useContainerURI bool) testStoreOption { } } -// createTLSCerts creates a CA certificate, a client certificate and a Redis certificate, -// storing them in the given temporary directory. -func createTLSCerts(t testing.TB) (*tlscert.Certificate, *tlscert.Certificate, *tlscert.Certificate) { - t.Helper() - - tmpDir := t.TempDir() - - // ips is the extra list of IPs to include in the certificates. - // It's used to allow the client and Redis certificates to be used in the same host - // when the tests are run using a remote docker daemon. - ips := []net.IP{net.ParseIP("127.0.0.1")} - - // Generate CA certificate - caCert := tlscert.SelfSignedFromRequest(tlscert.Request{ - Host: "localhost", - IPAddresses: ips, - Name: "ca", - SubjectCommonName: "ca", - IsCA: true, - ParentDir: tmpDir, - }) - require.NotNil(t, caCert) - - // Generate client certificate - clientCert := tlscert.SelfSignedFromRequest(tlscert.Request{ - Host: "localhost", - Name: "Redis Client", - SubjectCommonName: "localhost", - IPAddresses: ips, - Parent: caCert, - ParentDir: tmpDir, - }) - require.NotNil(t, clientCert) - - // Generate Redis certificate - redisCert := tlscert.SelfSignedFromRequest(tlscert.Request{ - Host: "localhost", - IPAddresses: ips, - Name: "Redis Server", - Parent: caCert, - ParentDir: tmpDir, - }) - require.NotNil(t, redisCert) - - return caCert, clientCert, redisCert -} - func newTestStore(t testing.TB, opts ...testStoreOption) *Storage { t.Helper() @@ -147,12 +95,12 @@ func newTestStore(t testing.TB, opts ...testStoreOption) *Storage { } if settings.withTLS { - // wait for the TLS port to be available - waitStrategies = append(waitStrategies, wait.ForListeningPort(redisTLSPort).WithStartupTimeout(time.Second*10)) + tcOpts = append(tcOpts, redis.WithTLS()) + // Use Redis module's TLS options, but for the MTLS case, disable the auth-clients flag cmds := []string{ - "--port", "6379", - "--tls-port", "6380", + "--port", "0", + "--tls-port", "6379", "--tls-cert-file", "/tls/server.crt", "--tls-key-file", "/tls/server.key", "--tls-ca-cert-file", "/tls/ca.crt", @@ -163,40 +111,8 @@ func newTestStore(t testing.TB, opts ...testStoreOption) *Storage { cmds = append(cmds, "--tls-auth-clients", "no") } - // Generate TLS certificates in the fly and add them to the container before it starts. - // Update the CMD to use the TLS certificates. - caCert, clientCert, serverCert := createTLSCerts(t) - - tcOpts = append(tcOpts, testcontainers.CustomizeRequest(testcontainers.GenericContainerRequest{ - ContainerRequest: testcontainers.ContainerRequest{ - ExposedPorts: []string{"6380/tcp"}, - Files: []testcontainers.ContainerFile{ - { - Reader: bytes.NewReader(caCert.Bytes), - ContainerFilePath: "/tls/ca.crt", - FileMode: 0o644, - }, - { - Reader: bytes.NewReader(serverCert.Bytes), - ContainerFilePath: "/tls/server.crt", - FileMode: 0o644, - }, - { - Reader: bytes.NewReader(serverCert.KeyBytes), - ContainerFilePath: "/tls/server.key", - FileMode: 0o644, - }, - }, - Cmd: cmds, - }, - })) - - cfg.TLSConfig = &tls.Config{ - MinVersion: tls.VersionTLS12, - RootCAs: caCert.TLSConfig().RootCAs, - Certificates: clientCert.TLSConfig().Certificates, - ServerName: "localhost", // Match the server cert's common name - } + // completely override the default CMD, as the Redis module is opinionated about the CMD + tcOpts = append(tcOpts, testcontainers.WithCmd(cmds...)) } tcOpts = append(tcOpts, testcontainers.WithWaitStrategy(waitStrategies...)) @@ -205,6 +121,8 @@ func newTestStore(t testing.TB, opts ...testStoreOption) *Storage { testcontainers.CleanupContainer(t, c) require.NoError(t, err) + cfg.TLSConfig = c.TLSConfig() + uri, err := c.ConnectionString(ctx) require.NoError(t, err) @@ -228,19 +146,9 @@ func newTestStore(t testing.TB, opts ...testStoreOption) *Storage { cfg.URL = uri } - if settings.withTLS { - host, err := c.Host(ctx) - require.NoError(t, err) - - port, err := c.MappedPort(ctx, redisTLSPort) - require.NoError(t, err) - - scheme := "redis" - if settings.withSecureURL { - scheme = "rediss" - } - - cfg.URL = scheme + "://" + host + ":" + port.Port() + if !settings.withSecureURL { + // Replace the scheme with the insecure one + cfg.URL = strings.Replace(cfg.URL, "rediss://", "redis://", 1) } return New(cfg) From 6c01ddadb5bfc2de0a2beec35437791c531842db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Mon, 28 Apr 2025 10:13:20 +0200 Subject: [PATCH 076/168] fix: wrong evaluation of MLTS flag --- redis/redis_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/redis/redis_test.go b/redis/redis_test.go index 372ba30b..745cf478 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -104,11 +104,12 @@ func newTestStore(t testing.TB, opts ...testStoreOption) *Storage { "--tls-cert-file", "/tls/server.crt", "--tls-key-file", "/tls/server.key", "--tls-ca-cert-file", "/tls/ca.crt", - "--tls-auth-clients", "yes", } if settings.withMTLSDisabled { cmds = append(cmds, "--tls-auth-clients", "no") + } else { + cmds = append(cmds, "--tls-auth-clients", "yes") } // completely override the default CMD, as the Redis module is opinionated about the CMD From 7f8afd2235375a26eaeb2afc5cfe3c095a03ca8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Mon, 28 Apr 2025 10:14:48 +0200 Subject: [PATCH 077/168] fix: use test helper --- redis/redis_test.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/redis/redis_test.go b/redis/redis_test.go index 745cf478..466c4b3e 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -331,7 +331,9 @@ func Test_Redis_Initialize_WithHostPort(t *testing.T) { } func Test_Redis_Initialize_WithURL_TLS_Verify(t *testing.T) { - testFn := func(secureURL bool, mtlsDisabled bool) { + testFn := func(t *testing.T, secureURL bool, mtlsDisabled bool) { + t.Helper() + testStore := newTestStore(t, withTLS(secureURL, mtlsDisabled)) defer testStore.Close() @@ -356,19 +358,19 @@ func Test_Redis_Initialize_WithURL_TLS_Verify(t *testing.T) { } t.Run("insecure-url/mtls-disabled", func(t *testing.T) { - testFn(false, true) + testFn(t, false, true) }) t.Run("insecure-url/mtls-enabled", func(t *testing.T) { - testFn(false, false) + testFn(t, false, false) }) t.Run("secure-url/mtls-disabled", func(t *testing.T) { - testFn(true, true) + testFn(t, true, true) }) t.Run("secure-url/mtls-enabled", func(t *testing.T) { - testFn(true, false) + testFn(t, true, false) }) } From 7af98b421ef1007236d9e0fd3b529c332ff8e3b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Mon, 28 Apr 2025 10:16:58 +0200 Subject: [PATCH 078/168] fix: trim both schemes --- redis/redis_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/redis/redis_test.go b/redis/redis_test.go index 466c4b3e..e4a45127 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -139,8 +139,10 @@ func newTestStore(t testing.TB, opts ...testStoreOption) *Storage { } if settings.withAddress { - // trim the scheme from the URI - cfg.Addrs = []string{strings.TrimPrefix(uri, "redis://")} + // trim the schemes from the URI + addr := strings.TrimPrefix(uri, "redis://") + addr = strings.TrimPrefix(addr, "rediss://") + cfg.Addrs = []string{addr} } if settings.withURL { From 5a5580e0a12a93b1457f6bc0cd1ac736e35b54c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Mon, 28 Apr 2025 10:34:45 +0200 Subject: [PATCH 079/168] chore: update new test --- redis/redis_test.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/redis/redis_test.go b/redis/redis_test.go index e4a45127..73de2307 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -65,7 +65,7 @@ func withURL(useContainerURI bool) testStoreOption { } } -func newTestStore(t testing.TB, opts ...testStoreOption) *Storage { +func newConfigFromContainer(t testing.TB, opts ...testStoreOption) Config { t.Helper() settings := &testStoreSettings{ @@ -154,7 +154,11 @@ func newTestStore(t testing.TB, opts ...testStoreOption) *Storage { cfg.URL = strings.Replace(cfg.URL, "rediss://", "redis://", 1) } - return New(cfg) + return cfg +} + +func newTestStore(t testing.TB, opts ...testStoreOption) *Storage { + return New(newConfigFromContainer(t, opts...)) } func Test_Redis_Set(t *testing.T) { @@ -588,9 +592,7 @@ func Benchmark_Redis_SetAndDelete(b *testing.B) { func Test_Redis_NewFromConnection(t *testing.T) { t.Parallel() - connection := New(Config{ - Reset: true, - }) + connection := New(newConfigFromContainer(t)) testStore := NewFromConnection(connection.Conn()) @@ -605,6 +607,6 @@ func Test_Redis_NewFromConnection(t *testing.T) { require.NoError(t, err, "failed to delete key in Redis storage") val, err = testStore.Get("foo") - + require.NoError(t, err) require.Nil(t, val, "expected value to be nil after deletion") } From aece23fe663dee25c6a45210f5417b5ee8fa9b98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Mon, 28 Apr 2025 10:40:13 +0200 Subject: [PATCH 080/168] chore: remove wait strategy, it's handled by the module --- redis/redis_test.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/redis/redis_test.go b/redis/redis_test.go index 73de2307..b27a2634 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -11,7 +11,6 @@ import ( "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/modules/redis" - "github.com/testcontainers/testcontainers-go/wait" ) const ( @@ -90,10 +89,6 @@ func newConfigFromContainer(t testing.TB, opts ...testStoreOption) Config { tcOpts := []testcontainers.ContainerCustomizer{} - waitStrategies := []wait.Strategy{ - wait.ForListeningPort(redisPort).WithStartupTimeout(time.Second * 10), - } - if settings.withTLS { tcOpts = append(tcOpts, redis.WithTLS()) @@ -116,8 +111,6 @@ func newConfigFromContainer(t testing.TB, opts ...testStoreOption) Config { tcOpts = append(tcOpts, testcontainers.WithCmd(cmds...)) } - tcOpts = append(tcOpts, testcontainers.WithWaitStrategy(waitStrategies...)) - c, err := redis.Run(ctx, img, tcOpts...) testcontainers.CleanupContainer(t, c) require.NoError(t, err) From 0d583fa0e854aaeba42ba83a51989903b42e82c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Mon, 28 Apr 2025 10:56:16 +0200 Subject: [PATCH 081/168] chore: apply coderabbit suggestion --- redis/redis_test.go | 51 +++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/redis/redis_test.go b/redis/redis_test.go index b27a2634..5da84da6 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -21,35 +21,35 @@ const ( ) type testStoreSettings struct { - withAddress bool - withHostPort bool - withURL bool + address bool + hostPort bool + url bool // TLS settings - withSecureURL bool - withMTLSDisabled bool - withTLS bool + secureURL bool + mtlsDisabled bool + tls bool } type testStoreOption func(*testStoreSettings) func withAddress() testStoreOption { return func(o *testStoreSettings) { - o.withAddress = true + o.address = true } } func withHostPort() testStoreOption { return func(o *testStoreSettings) { - o.withHostPort = true + o.hostPort = true } } func withTLS(secureURL bool, mtlsDisabled bool) testStoreOption { return func(o *testStoreSettings) { - o.withTLS = true - o.withSecureURL = secureURL - o.withMTLSDisabled = mtlsDisabled + o.tls = true + o.secureURL = secureURL + o.mtlsDisabled = mtlsDisabled } } @@ -60,7 +60,7 @@ func withTLS(secureURL bool, mtlsDisabled bool) testStoreOption { // - false: the URL will be set to an empty string func withURL(useContainerURI bool) testStoreOption { return func(o *testStoreSettings) { - o.withURL = useContainerURI + o.url = useContainerURI } } @@ -68,9 +68,9 @@ func newConfigFromContainer(t testing.TB, opts ...testStoreOption) Config { t.Helper() settings := &testStoreSettings{ - withURL: true, // by default, the URL will be set to the URI provided by the testcontainer - withAddress: false, - withHostPort: false, + url: true, // by default, the URL will be set to the URI provided by the testcontainer + address: false, + hostPort: false, } for _, o := range opts { o(settings) @@ -89,7 +89,7 @@ func newConfigFromContainer(t testing.TB, opts ...testStoreOption) Config { tcOpts := []testcontainers.ContainerCustomizer{} - if settings.withTLS { + if settings.tls { tcOpts = append(tcOpts, redis.WithTLS()) // Use Redis module's TLS options, but for the MTLS case, disable the auth-clients flag @@ -101,11 +101,12 @@ func newConfigFromContainer(t testing.TB, opts ...testStoreOption) Config { "--tls-ca-cert-file", "/tls/ca.crt", } - if settings.withMTLSDisabled { - cmds = append(cmds, "--tls-auth-clients", "no") - } else { - cmds = append(cmds, "--tls-auth-clients", "yes") - } + cmds = append(cmds, "--tls-auth-clients", func() string { + if settings.mtlsDisabled { + return "no" + } + return "yes" + }()) // completely override the default CMD, as the Redis module is opinionated about the CMD tcOpts = append(tcOpts, testcontainers.WithCmd(cmds...)) @@ -120,7 +121,7 @@ func newConfigFromContainer(t testing.TB, opts ...testStoreOption) Config { uri, err := c.ConnectionString(ctx) require.NoError(t, err) - if settings.withHostPort { + if settings.hostPort { host, err := c.Host(ctx) require.NoError(t, err) @@ -131,18 +132,18 @@ func newConfigFromContainer(t testing.TB, opts ...testStoreOption) Config { cfg.Port = port.Int() } - if settings.withAddress { + if settings.address { // trim the schemes from the URI addr := strings.TrimPrefix(uri, "redis://") addr = strings.TrimPrefix(addr, "rediss://") cfg.Addrs = []string{addr} } - if settings.withURL { + if settings.url { cfg.URL = uri } - if !settings.withSecureURL { + if !settings.secureURL { // Replace the scheme with the insecure one cfg.URL = strings.Replace(cfg.URL, "rediss://", "redis://", 1) } From 9113e442dce14fe1fcf5af4ece18a6f2939383a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Mon, 28 Apr 2025 11:42:17 +0200 Subject: [PATCH 082/168] docs: document new options --- redis/redis_test.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/redis/redis_test.go b/redis/redis_test.go index 5da84da6..ed99dedc 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -33,18 +33,24 @@ type testStoreSettings struct { type testStoreOption func(*testStoreSettings) +// withAddress sets the test store to use address-based connection. func withAddress() testStoreOption { return func(o *testStoreSettings) { o.address = true } } +// withHostPort sets the test store to use host and port based connection. func withHostPort() testStoreOption { return func(o *testStoreSettings) { o.hostPort = true } } +// withTLS configures the test store to use TLS. +// Parameters: +// - secureURL: when true, uses "rediss://" scheme, otherwise uses "redis://" +// - mtlsDisabled: when true, disables mutual TLS authentication (--tls-auth-clients no) func withTLS(secureURL bool, mtlsDisabled bool) testStoreOption { return func(o *testStoreSettings) { o.tls = true @@ -64,6 +70,10 @@ func withURL(useContainerURI bool) testStoreOption { } } +// newConfigFromContainer creates a Redis configuration using a test container. +// It configures the container based on the provided options and returns a Config +// that can be used to connect to the container. +// The container is cleaned up when the test completes. func newConfigFromContainer(t testing.TB, opts ...testStoreOption) Config { t.Helper() @@ -151,6 +161,10 @@ func newConfigFromContainer(t testing.TB, opts ...testStoreOption) Config { return cfg } +// newTestStore creates a new Redis storage instance backed by Testcontainers. +// It configures the container based on the provided options and returns a Storage +// instance connected to the container. The caller is responsible for calling +// Close() on the returned Storage when done. func newTestStore(t testing.TB, opts ...testStoreOption) *Storage { return New(newConfigFromContainer(t, opts...)) } @@ -502,6 +516,7 @@ func Test_Redis_Universal_With_HostPort_And_URL(t *testing.T) { } func Test_Redis_Cluster(t *testing.T) { + // TODO: Replace with containerized cluster when testcontainers-go Redis module supports clustering testStoreUniversal := New(Config{ Addrs: []string{ "localhost:7000", From 470e17ebaaa73501cbe72b8a241539eeef948509 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:47:15 +0000 Subject: [PATCH 083/168] chore(deps): bump github.com/testcontainers/testcontainers-go Bumps [github.com/testcontainers/testcontainers-go](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- aerospike/go.mod | 2 +- aerospike/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aerospike/go.mod b/aerospike/go.mod index 8112fcbc..dac44913 100644 --- a/aerospike/go.mod +++ b/aerospike/go.mod @@ -5,7 +5,7 @@ go 1.23.0 require ( github.com/aerospike/aerospike-client-go/v8 v8.2.1 github.com/stretchr/testify v1.10.0 - github.com/testcontainers/testcontainers-go v0.36.0 + github.com/testcontainers/testcontainers-go v0.37.0 ) require ( diff --git a/aerospike/go.sum b/aerospike/go.sum index e1d86d59..b3104654 100644 --- a/aerospike/go.sum +++ b/aerospike/go.sum @@ -105,8 +105,8 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= -github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= github.com/tklauser/go-sysconf v0.3.15 h1:VE89k0criAymJ/Os65CSn1IXaol+1wrsFHEB8Ol49K4= github.com/tklauser/go-sysconf v0.3.15/go.mod h1:Dmjwr6tYFIseJw7a3dRLJfsHAMXZ3nEnL/aZY+0IuI4= github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfjso= From dc8135380857f869e9a3d54028887332e348b428 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:47:24 +0000 Subject: [PATCH 084/168] chore(deps): bump github.com/testcontainers/testcontainers-go/modules/azure Bumps [github.com/testcontainers/testcontainers-go/modules/azure](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go/modules/azure dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- azureblob/go.mod | 6 +++--- azureblob/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/azureblob/go.mod b/azureblob/go.mod index 4852b12b..7c62400c 100644 --- a/azureblob/go.mod +++ b/azureblob/go.mod @@ -5,8 +5,8 @@ go 1.23.0 require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.1 github.com/stretchr/testify v1.10.0 - github.com/testcontainers/testcontainers-go v0.36.0 - github.com/testcontainers/testcontainers-go/modules/azure v0.36.0 + github.com/testcontainers/testcontainers-go v0.37.0 + github.com/testcontainers/testcontainers-go/modules/azure v0.37.0 ) require ( @@ -33,7 +33,7 @@ require ( github.com/google/uuid v1.6.0 // indirect github.com/klauspost/compress v1.17.6 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/magiconair/properties v1.8.9 // indirect + github.com/magiconair/properties v1.8.10 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect diff --git a/azureblob/go.sum b/azureblob/go.sum index fb91880a..45af98ab 100644 --- a/azureblob/go.sum +++ b/azureblob/go.sum @@ -77,8 +77,8 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= -github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= @@ -117,10 +117,10 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= -github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= -github.com/testcontainers/testcontainers-go/modules/azure v0.36.0 h1:MXc1xGZqzXgKHFV/7dq5XtcTQS0DncmXAEL9RYyQ6Zk= -github.com/testcontainers/testcontainers-go/modules/azure v0.36.0/go.mod h1:3+4sxe1awBqZTJjGhaS/+zkURCvmqqAnbtGeVPzfvBs= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= +github.com/testcontainers/testcontainers-go/modules/azure v0.37.0 h1:pOqYnDvd2rkBb+ON0ikJgI3PzIslWlbR+y+czw5tWF0= +github.com/testcontainers/testcontainers-go/modules/azure v0.37.0/go.mod h1:h4/DPyIHUxdnnpTGhKkHUT/lYOYhjtQExiFCGdHOl+A= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= From b82b9ffd88557f1a74bd2decfd84ced3f5723f34 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:47:31 +0000 Subject: [PATCH 085/168] chore(deps): bump github.com/testcontainers/testcontainers-go Bumps [github.com/testcontainers/testcontainers-go](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- cassandra/go.mod | 8 ++++---- cassandra/go.sum | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/cassandra/go.mod b/cassandra/go.mod index c38b72c7..65c54ae7 100644 --- a/cassandra/go.mod +++ b/cassandra/go.mod @@ -6,7 +6,7 @@ require ( github.com/gocql/gocql v1.7.0 github.com/scylladb/gocqlx/v2 v2.8.0 github.com/stretchr/testify v1.10.0 - github.com/testcontainers/testcontainers-go v0.36.0 + github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/cassandra v0.36.0 ) @@ -35,7 +35,7 @@ require ( github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect github.com/klauspost/compress v1.17.4 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/magiconair/properties v1.8.9 // indirect + github.com/magiconair/properties v1.8.10 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect @@ -60,9 +60,9 @@ require ( go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/otel/sdk v1.32.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect - golang.org/x/crypto v0.35.0 // indirect + golang.org/x/crypto v0.37.0 // indirect golang.org/x/sync v0.10.0 // indirect - golang.org/x/sys v0.31.0 // indirect + golang.org/x/sys v0.32.0 // indirect google.golang.org/grpc v1.70.0 // indirect google.golang.org/protobuf v1.36.5 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/cassandra/go.sum b/cassandra/go.sum index d1d6e320..f0a96a3f 100644 --- a/cassandra/go.sum +++ b/cassandra/go.sum @@ -71,8 +71,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= -github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= @@ -114,8 +114,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= -github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= github.com/testcontainers/testcontainers-go/modules/cassandra v0.36.0 h1:vIOOfizBKSHfVcs+5u/VS6Zn4Bbo1lYM28DhHYJm4i8= github.com/testcontainers/testcontainers-go/modules/cassandra v0.36.0/go.mod h1:ZsSC3MYjRLXLccXMnBth8Qh4AkS2HWzGobVhMMY3Z/k= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -147,8 +147,8 @@ go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v8 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -171,14 +171,14 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From e61ea6c9daf4e1b407a8d37ef2a65a967d8305d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:47:45 +0000 Subject: [PATCH 086/168] chore(deps): bump github.com/testcontainers/testcontainers-go Bumps [github.com/testcontainers/testcontainers-go](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- couchbase/go.mod | 4 ++-- couchbase/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/couchbase/go.mod b/couchbase/go.mod index 99393208..a58d394e 100644 --- a/couchbase/go.mod +++ b/couchbase/go.mod @@ -5,7 +5,7 @@ go 1.23.0 require ( github.com/couchbase/gocb/v2 v2.10.0 github.com/stretchr/testify v1.10.0 - github.com/testcontainers/testcontainers-go v0.36.0 + github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/couchbase v0.36.0 ) @@ -39,7 +39,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/klauspost/compress v1.17.7 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/magiconair/properties v1.8.9 // indirect + github.com/magiconair/properties v1.8.10 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect diff --git a/couchbase/go.sum b/couchbase/go.sum index 4b154c6d..5e701a6c 100644 --- a/couchbase/go.sum +++ b/couchbase/go.sum @@ -100,8 +100,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= -github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= @@ -146,8 +146,8 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= -github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= github.com/testcontainers/testcontainers-go/modules/couchbase v0.36.0 h1:tONuFHlEMLca9xsTY+FUW1F7cimYBB2n3bYWK9o/tC8= github.com/testcontainers/testcontainers-go/modules/couchbase v0.36.0/go.mod h1:YsZrzI2BMXa0bOyEoBqtq06Ntw/xRc431yMhFlYMzv4= github.com/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U= From 4f57dda4a914c9be89dcf2c46529fa4bd53d4d87 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:48:02 +0000 Subject: [PATCH 087/168] chore(deps): bump github.com/testcontainers/testcontainers-go Bumps [github.com/testcontainers/testcontainers-go](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- clickhouse/go.mod | 6 +++--- clickhouse/go.sum | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/clickhouse/go.mod b/clickhouse/go.mod index 513f4cb0..91cf3210 100644 --- a/clickhouse/go.mod +++ b/clickhouse/go.mod @@ -5,7 +5,7 @@ go 1.23.0 require ( github.com/ClickHouse/clickhouse-go/v2 v2.34.0 github.com/stretchr/testify v1.10.0 - github.com/testcontainers/testcontainers-go v0.36.0 + github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/clickhouse v0.36.0 ) @@ -36,7 +36,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/klauspost/compress v1.18.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/magiconair/properties v1.8.9 // indirect + github.com/magiconair/properties v1.8.10 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect @@ -63,7 +63,7 @@ require ( go.opentelemetry.io/otel v1.35.0 // indirect go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect - golang.org/x/crypto v0.35.0 // indirect + golang.org/x/crypto v0.37.0 // indirect golang.org/x/sys v0.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/clickhouse/go.sum b/clickhouse/go.sum index d02b5c6e..922fdb44 100644 --- a/clickhouse/go.sum +++ b/clickhouse/go.sum @@ -75,8 +75,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= -github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= @@ -124,8 +124,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= -github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= github.com/testcontainers/testcontainers-go/modules/clickhouse v0.36.0 h1:hTFWpQQnuAYgrCxngqRA1bOD4JZaqjxAkLOVUoD8mY4= github.com/testcontainers/testcontainers-go/modules/clickhouse v0.36.0/go.mod h1:H3lCgmTTVgdw+B+aKLFqDuwlphds6n0aS2UM4j1uhhw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= @@ -166,8 +166,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -196,14 +196,14 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From 8e8a762e0692ab42a3b3d7ee4f4dd4fca35679bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:48:08 +0000 Subject: [PATCH 088/168] chore(deps): bump github.com/testcontainers/testcontainers-go Bumps [github.com/testcontainers/testcontainers-go](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- dynamodb/go.mod | 8 ++++---- dynamodb/go.sum | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dynamodb/go.mod b/dynamodb/go.mod index c879b570..cd99e338 100644 --- a/dynamodb/go.mod +++ b/dynamodb/go.mod @@ -9,7 +9,7 @@ require ( github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.18.13 github.com/aws/aws-sdk-go-v2/service/dynamodb v1.43.0 github.com/stretchr/testify v1.10.0 - github.com/testcontainers/testcontainers-go v0.36.0 + github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/dynamodb v0.36.0 ) @@ -48,7 +48,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/klauspost/compress v1.17.4 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/magiconair/properties v1.8.9 // indirect + github.com/magiconair/properties v1.8.10 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect @@ -71,7 +71,7 @@ require ( go.opentelemetry.io/otel v1.35.0 // indirect go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect - golang.org/x/crypto v0.35.0 // indirect - golang.org/x/sys v0.31.0 // indirect + golang.org/x/crypto v0.37.0 // indirect + golang.org/x/sys v0.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/dynamodb/go.sum b/dynamodb/go.sum index 06a925c4..a4f90861 100644 --- a/dynamodb/go.sum +++ b/dynamodb/go.sum @@ -91,8 +91,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= -github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= @@ -129,8 +129,8 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= -github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= github.com/testcontainers/testcontainers-go/modules/dynamodb v0.36.0 h1:+50K/F+J3K5UsCHPNWNS5XZ/2iFHUhXh5jNg0ajbe/8= github.com/testcontainers/testcontainers-go/modules/dynamodb v0.36.0/go.mod h1:vMph1Ik+EHiSku2MOXiMIuPrEQP1xf84MiERodejcGU= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -162,8 +162,8 @@ go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v8 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -184,14 +184,14 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From 0295b34e4008a0d87898803b17f86699ab61823d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:48:24 +0000 Subject: [PATCH 089/168] chore(deps): bump github.com/testcontainers/testcontainers-go in /neo4j Bumps [github.com/testcontainers/testcontainers-go](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- neo4j/go.mod | 8 ++++---- neo4j/go.sum | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/neo4j/go.mod b/neo4j/go.mod index 7afb72b6..9e194109 100644 --- a/neo4j/go.mod +++ b/neo4j/go.mod @@ -5,7 +5,7 @@ go 1.23.0 require ( github.com/neo4j/neo4j-go-driver/v5 v5.28.0 github.com/stretchr/testify v1.10.0 - github.com/testcontainers/testcontainers-go v0.36.0 + github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/neo4j v0.36.0 ) @@ -32,7 +32,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/klauspost/compress v1.17.4 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/magiconair/properties v1.8.9 // indirect + github.com/magiconair/properties v1.8.10 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect @@ -55,7 +55,7 @@ require ( go.opentelemetry.io/otel v1.35.0 // indirect go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect - golang.org/x/crypto v0.35.0 // indirect - golang.org/x/sys v0.31.0 // indirect + golang.org/x/crypto v0.37.0 // indirect + golang.org/x/sys v0.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/neo4j/go.sum b/neo4j/go.sum index 7aa72b4d..86e38f9e 100644 --- a/neo4j/go.sum +++ b/neo4j/go.sum @@ -57,8 +57,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= -github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= @@ -97,8 +97,8 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= -github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= github.com/testcontainers/testcontainers-go/modules/neo4j v0.36.0 h1:iJG9GVzUeKOWsPKrqgaY3//VyhsRPyscYiIZUBDuV3s= github.com/testcontainers/testcontainers-go/modules/neo4j v0.36.0/go.mod h1:sqTRVpKR0fycv9FwHm0U/KhlQCUd8qfwgllaMtfJqgo= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -130,8 +130,8 @@ go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v8 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -152,14 +152,14 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From 44180aaa2c1edee4a4447b9259d5be5faa53ab5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:48:33 +0000 Subject: [PATCH 090/168] chore(deps): bump github.com/testcontainers/testcontainers-go in /mysql Bumps [github.com/testcontainers/testcontainers-go](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- mysql/go.mod | 8 ++++---- mysql/go.sum | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/mysql/go.mod b/mysql/go.mod index 9cbd4ba4..c6051aed 100644 --- a/mysql/go.mod +++ b/mysql/go.mod @@ -5,7 +5,7 @@ go 1.23.0 require ( github.com/go-sql-driver/mysql v1.9.2 github.com/stretchr/testify v1.10.0 - github.com/testcontainers/testcontainers-go v0.36.0 + github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/mysql v0.36.0 ) @@ -33,7 +33,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/klauspost/compress v1.17.4 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/magiconair/properties v1.8.9 // indirect + github.com/magiconair/properties v1.8.10 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect @@ -56,7 +56,7 @@ require ( go.opentelemetry.io/otel v1.35.0 // indirect go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect - golang.org/x/crypto v0.35.0 // indirect - golang.org/x/sys v0.31.0 // indirect + golang.org/x/crypto v0.37.0 // indirect + golang.org/x/sys v0.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/mysql/go.sum b/mysql/go.sum index 3e078a7b..683a2878 100644 --- a/mysql/go.sum +++ b/mysql/go.sum @@ -61,8 +61,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= -github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= @@ -99,8 +99,8 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= -github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= github.com/testcontainers/testcontainers-go/modules/mysql v0.36.0 h1:WUYu/gB23et+T9XCqfmYJB7eWW8/1qqPCxNIaRbS0yk= github.com/testcontainers/testcontainers-go/modules/mysql v0.36.0/go.mod h1:ED7dKWk3JE/dMRJ3t45TNGf3h9/htQG5au5gd1DuQcw= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -132,8 +132,8 @@ go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v8 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -154,14 +154,14 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From 4a2228d5fe8248a1f974ccf3d1ec27ce8d24ae90 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:48:36 +0000 Subject: [PATCH 091/168] chore(deps): bump github.com/testcontainers/testcontainers-go Bumps [github.com/testcontainers/testcontainers-go](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- mongodb/go.mod | 4 ++-- mongodb/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mongodb/go.mod b/mongodb/go.mod index 41b02c23..19f7573b 100644 --- a/mongodb/go.mod +++ b/mongodb/go.mod @@ -4,7 +4,7 @@ go 1.23.0 require ( github.com/stretchr/testify v1.10.0 - github.com/testcontainers/testcontainers-go v0.36.0 + github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/mongodb v0.36.0 go.mongodb.org/mongo-driver v1.17.3 ) @@ -33,7 +33,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/klauspost/compress v1.18.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/magiconair/properties v1.8.9 // indirect + github.com/magiconair/properties v1.8.10 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect diff --git a/mongodb/go.sum b/mongodb/go.sum index 686058f0..e24236bb 100644 --- a/mongodb/go.sum +++ b/mongodb/go.sum @@ -59,8 +59,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= -github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= @@ -99,8 +99,8 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= -github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= github.com/testcontainers/testcontainers-go/modules/mongodb v0.36.0 h1:HDW6rknSqci/154rpEGNL8VrKJxXmApxcG++VedQKTE= github.com/testcontainers/testcontainers-go/modules/mongodb v0.36.0/go.mod h1:RhguDt49jCUepedF4zBRJwb66VWWvSg5YQ+nQNff370= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= From 6ce77b46a3af135e5beffa3ddaed2df50840e8bf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:48:39 +0000 Subject: [PATCH 092/168] chore(deps): bump github.com/testcontainers/testcontainers-go in /nats Bumps [github.com/testcontainers/testcontainers-go](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- nats/go.mod | 4 ++-- nats/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nats/go.mod b/nats/go.mod index d42238ab..408dee01 100644 --- a/nats/go.mod +++ b/nats/go.mod @@ -6,7 +6,7 @@ require ( github.com/mdelapenya/tlscert v0.2.0 github.com/nats-io/nats.go v1.41.2 github.com/stretchr/testify v1.10.0 - github.com/testcontainers/testcontainers-go v0.36.0 + github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/nats v0.36.0 ) @@ -33,7 +33,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/klauspost/compress v1.18.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/magiconair/properties v1.8.9 // indirect + github.com/magiconair/properties v1.8.10 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect diff --git a/nats/go.sum b/nats/go.sum index c5e7a5f6..5e588b58 100644 --- a/nats/go.sum +++ b/nats/go.sum @@ -57,8 +57,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= -github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mdelapenya/tlscert v0.2.0 h1:7H81W6Z/4weDvZBNOfQte5GpIMo0lGYEeWbkGp5LJHI= github.com/mdelapenya/tlscert v0.2.0/go.mod h1:O4njj3ELLnJjGdkN7M/vIVCpZ+Cf0L6muqOG4tLSl8o= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= @@ -103,8 +103,8 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= -github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= github.com/testcontainers/testcontainers-go/modules/nats v0.36.0 h1:4HLlNtRpida6zYlFEkwsrdn8EnJGeAUk33u9vRDgIFE= github.com/testcontainers/testcontainers-go/modules/nats v0.36.0/go.mod h1:jWBLBFq+rMbEjmlmhCIvE31Uytp8eahlr9Y01vD8Ac4= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= From 994408856905b0ff3184c67c7331e94e184a786c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:48:52 +0000 Subject: [PATCH 093/168] chore(deps): bump github.com/testcontainers/testcontainers-go Bumps [github.com/testcontainers/testcontainers-go](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- scylladb/go.mod | 8 ++++---- scylladb/go.sum | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/scylladb/go.mod b/scylladb/go.mod index 9892856f..3ae52745 100644 --- a/scylladb/go.mod +++ b/scylladb/go.mod @@ -5,7 +5,7 @@ go 1.23.0 require ( github.com/gocql/gocql v1.7.0 github.com/stretchr/testify v1.10.0 - github.com/testcontainers/testcontainers-go v0.36.0 + github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/scylladb v0.36.0 ) @@ -34,7 +34,7 @@ require ( github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect github.com/klauspost/compress v1.17.4 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/magiconair/properties v1.8.9 // indirect + github.com/magiconair/properties v1.8.10 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect @@ -58,8 +58,8 @@ require ( go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/otel/sdk v1.32.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect - golang.org/x/crypto v0.35.0 // indirect - golang.org/x/sys v0.31.0 // indirect + golang.org/x/crypto v0.37.0 // indirect + golang.org/x/sys v0.32.0 // indirect google.golang.org/grpc v1.70.0 // indirect google.golang.org/protobuf v1.36.5 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/scylladb/go.sum b/scylladb/go.sum index 8fccefa4..6a4d1a18 100644 --- a/scylladb/go.sum +++ b/scylladb/go.sum @@ -102,8 +102,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= -github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= @@ -143,8 +143,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= -github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= github.com/testcontainers/testcontainers-go/modules/scylladb v0.36.0 h1:BZuuIbd8wFW20jhMaA7kaiV/F+UkFo9plOZjkxZZfoA= github.com/testcontainers/testcontainers-go/modules/scylladb v0.36.0/go.mod h1:ya6sJzRmXxqwe7I+WiCeHfAkEgMxLoYHnW566jD6hWQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -176,8 +176,8 @@ go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v8 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -201,16 +201,16 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From 808636c52be33d1b5d173f203e0e97481c3fcd70 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:51:46 +0000 Subject: [PATCH 094/168] chore(deps): bump github.com/testcontainers/testcontainers-go in /s3 Bumps [github.com/testcontainers/testcontainers-go](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- s3/go.mod | 8 ++++---- s3/go.sum | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/s3/go.mod b/s3/go.mod index e33a7b0e..2d0addc9 100644 --- a/s3/go.mod +++ b/s3/go.mod @@ -10,7 +10,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/s3 v1.79.2 github.com/aws/smithy-go v1.22.3 github.com/stretchr/testify v1.10.0 - github.com/testcontainers/testcontainers-go v0.36.0 + github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/minio v0.36.0 ) @@ -50,7 +50,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/klauspost/compress v1.17.6 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/magiconair/properties v1.8.9 // indirect + github.com/magiconair/properties v1.8.10 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect @@ -73,7 +73,7 @@ require ( go.opentelemetry.io/otel v1.35.0 // indirect go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect - golang.org/x/crypto v0.35.0 // indirect - golang.org/x/sys v0.31.0 // indirect + golang.org/x/crypto v0.37.0 // indirect + golang.org/x/sys v0.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/s3/go.sum b/s3/go.sum index 0c0d0c90..a75fe1b1 100644 --- a/s3/go.sum +++ b/s3/go.sum @@ -101,8 +101,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= -github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= github.com/minio/minio-go/v7 v7.0.68 h1:hTqSIfLlpXaKuNy4baAp4Jjy2sqZEN9hRxD0M4aOfrQ= @@ -151,8 +151,8 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= -github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= github.com/testcontainers/testcontainers-go/modules/minio v0.36.0 h1:NYOqshU552vjkpeNCDev7W3Jmuh2yVEvdko6Q9WX/GM= github.com/testcontainers/testcontainers-go/modules/minio v0.36.0/go.mod h1:LAL+x/siLvLHVQ5G/r3X1bLlUhOj9xo8CUEySbNWUz4= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -184,8 +184,8 @@ go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v8 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -206,14 +206,14 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From 2c6455f7d4bc8265634f8f2c92ca6cd980158bb4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:52:24 +0000 Subject: [PATCH 095/168] chore(deps): bump github.com/testcontainers/testcontainers-go in /minio Bumps [github.com/testcontainers/testcontainers-go](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- minio/go.mod | 4 ++-- minio/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/minio/go.mod b/minio/go.mod index dc932c4f..b7391245 100644 --- a/minio/go.mod +++ b/minio/go.mod @@ -5,7 +5,7 @@ go 1.23.0 require ( github.com/minio/minio-go/v7 v7.0.91 github.com/stretchr/testify v1.10.0 - github.com/testcontainers/testcontainers-go v0.36.0 + github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/minio v0.36.0 github.com/valyala/bytebufferpool v1.0.0 ) @@ -37,7 +37,7 @@ require ( github.com/klauspost/compress v1.18.0 // indirect github.com/klauspost/cpuid/v2 v2.2.10 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/magiconair/properties v1.8.9 // indirect + github.com/magiconair/properties v1.8.10 // indirect github.com/minio/crc64nvme v1.0.1 // indirect github.com/minio/md5-simd v1.1.2 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect diff --git a/minio/go.sum b/minio/go.sum index 9e7f6738..ef007f11 100644 --- a/minio/go.sum +++ b/minio/go.sum @@ -66,8 +66,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= -github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/minio/crc64nvme v1.0.1 h1:DHQPrYPdqK7jQG/Ls5CTBZWeex/2FMS3G5XGkycuFrY= github.com/minio/crc64nvme v1.0.1/go.mod h1:eVfm2fAzLlxMdUGc0EEBGSMmPwmXD5XiNRpnu9J3bvg= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= @@ -112,8 +112,8 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= -github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= github.com/testcontainers/testcontainers-go/modules/minio v0.36.0 h1:NYOqshU552vjkpeNCDev7W3Jmuh2yVEvdko6Q9WX/GM= github.com/testcontainers/testcontainers-go/modules/minio v0.36.0/go.mod h1:LAL+x/siLvLHVQ5G/r3X1bLlUhOj9xo8CUEySbNWUz4= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= From dc3d9c8ff14441bbd2cb304e63c67ed1000886cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 11:07:23 +0000 Subject: [PATCH 096/168] chore(deps): bump github.com/testcontainers/testcontainers-go/modules/cassandra Bumps [github.com/testcontainers/testcontainers-go/modules/cassandra](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go/modules/cassandra dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- cassandra/go.mod | 2 +- cassandra/go.sum | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cassandra/go.mod b/cassandra/go.mod index 65c54ae7..31452643 100644 --- a/cassandra/go.mod +++ b/cassandra/go.mod @@ -7,7 +7,7 @@ require ( github.com/scylladb/gocqlx/v2 v2.8.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/cassandra v0.36.0 + github.com/testcontainers/testcontainers-go/modules/cassandra v0.37.0 ) require ( diff --git a/cassandra/go.sum b/cassandra/go.sum index f0a96a3f..ed4ab046 100644 --- a/cassandra/go.sum +++ b/cassandra/go.sum @@ -116,8 +116,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/cassandra v0.36.0 h1:vIOOfizBKSHfVcs+5u/VS6Zn4Bbo1lYM28DhHYJm4i8= -github.com/testcontainers/testcontainers-go/modules/cassandra v0.36.0/go.mod h1:ZsSC3MYjRLXLccXMnBth8Qh4AkS2HWzGobVhMMY3Z/k= +github.com/testcontainers/testcontainers-go/modules/cassandra v0.37.0 h1:ruemoK/dW5mUzZ3UX+4x61quAa9vjtNWvo/RQdmvM3k= +github.com/testcontainers/testcontainers-go/modules/cassandra v0.37.0/go.mod h1:exJHzmEhS6bN25nCabmH2CNPzIoat1Z8zyOWv63Opt4= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -155,8 +155,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= From 52dda9d9f81b3b06088dade89f4378edce3124a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Tue, 29 Apr 2025 00:19:18 +0200 Subject: [PATCH 097/168] fix: close store in test --- redis/redis_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/redis/redis_test.go b/redis/redis_test.go index ed99dedc..36e9f204 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -604,6 +604,7 @@ func Test_Redis_NewFromConnection(t *testing.T) { connection := New(newConfigFromContainer(t)) testStore := NewFromConnection(connection.Conn()) + defer testStore.Close() err := testStore.Set("foo", []byte("bar"), 0) require.NoError(t, err, "failed to set key in Redis storage") From 338abb526f41eadbdbb9e4bc05b26f0f10c36585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Tue, 29 Apr 2025 00:25:23 +0200 Subject: [PATCH 098/168] chore(nats): use testcontainers-go recent APIs --- nats/nats_test.go | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/nats/nats_test.go b/nats/nats_test.go index fa878564..5ff6d1d1 100644 --- a/nats/nats_test.go +++ b/nats/nats_test.go @@ -92,29 +92,25 @@ func newTestStore(t testing.TB) *Storage { tcnats.WithConfigFile(strings.NewReader(natsTLSConfig)), // Override the default wait strategy to use the port 4443 for TLS testcontainers.WithWaitStrategy(wait.ForLog("Listening for client connections on 0.0.0.0:4443")), + testcontainers.WithExposedPorts(natsTLSPort), // add the cert files to the container - testcontainers.CustomizeRequest(testcontainers.GenericContainerRequest{ - ContainerRequest: testcontainers.ContainerRequest{ - ExposedPorts: []string{natsTLSPort}, - Files: []testcontainers.ContainerFile{ - { - Reader: bytes.NewReader(ca.Bytes), - ContainerFilePath: "/tls/ca.crt", - FileMode: 0o0644, - }, - { - Reader: bytes.NewReader(natsCert.Bytes), - ContainerFilePath: "/tls/nats.crt", - FileMode: 0o0644, - }, - { - Reader: bytes.NewReader(natsCert.KeyBytes), - ContainerFilePath: "/tls/nats.key", - FileMode: 0o0644, - }, - }, + testcontainers.WithFiles( + testcontainers.ContainerFile{ + Reader: bytes.NewReader(ca.Bytes), + ContainerFilePath: "/tls/ca.crt", + FileMode: 0o0644, }, - }), + testcontainers.ContainerFile{ + Reader: bytes.NewReader(natsCert.Bytes), + ContainerFilePath: "/tls/nats.crt", + FileMode: 0o0644, + }, + testcontainers.ContainerFile{ + Reader: bytes.NewReader(natsCert.KeyBytes), + ContainerFilePath: "/tls/nats.key", + FileMode: 0o0644, + }, + ), ) testcontainers.CleanupContainer(t, c) require.NoError(t, err) From 7496f5526c16f58c08f02bd1dcd6069ea259eb79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Yasir=20Na=C3=A7?= <76746351+aliyasirnac@users.noreply.github.com> Date: Tue, 29 Apr 2025 09:52:30 +0300 Subject: [PATCH 099/168] updated packages --- surrealdb/go.mod | 17 +++++++++-------- surrealdb/go.sum | 48 +++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 54 insertions(+), 11 deletions(-) diff --git a/surrealdb/go.mod b/surrealdb/go.mod index 8a8efbdd..5871f0a3 100644 --- a/surrealdb/go.mod +++ b/surrealdb/go.mod @@ -2,10 +2,11 @@ module github.com/gofiber/storage/surrealdb go 1.23.0 - require ( github.com/stretchr/testify v1.10.0 github.com/surrealdb/surrealdb.go v0.3.2 + github.com/testcontainers/testcontainers-go v0.37.0 + github.com/testcontainers/testcontainers-go/modules/surrealdb v0.36.0 ) require ( @@ -31,10 +32,10 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect github.com/klauspost/compress v1.17.4 // indirect - github.com/kr/text v0.2.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/magiconair/properties v1.8.9 // indirect + github.com/magiconair/properties v1.8.10 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect @@ -47,11 +48,8 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/rogpeppe/go-internal v1.13.1 // indirect github.com/shirou/gopsutil/v4 v4.25.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/testcontainers/testcontainers-go v0.36.0 // indirect - github.com/testcontainers/testcontainers-go/modules/surrealdb v0.36.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/x448/float16 v0.8.4 // indirect @@ -60,8 +58,11 @@ require ( go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect go.opentelemetry.io/otel v1.35.0 // indirect go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/sdk v1.32.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect - golang.org/x/crypto v0.35.0 // indirect - golang.org/x/sys v0.31.0 // indirect + golang.org/x/crypto v0.37.0 // indirect + golang.org/x/sys v0.32.0 // indirect + google.golang.org/grpc v1.70.0 // indirect + google.golang.org/protobuf v1.36.5 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/surrealdb/go.sum b/surrealdb/go.sum index 98417ab9..0e1e9c89 100644 --- a/surrealdb/go.sum +++ b/surrealdb/go.sum @@ -1,5 +1,7 @@ dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= @@ -12,7 +14,8 @@ github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpS github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -42,10 +45,14 @@ github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= @@ -58,6 +65,8 @@ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= @@ -89,6 +98,8 @@ github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7n github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= @@ -96,6 +107,8 @@ github.com/surrealdb/surrealdb.go v0.3.2 h1:ynBbD0onW+M4BXhZ1+dDdVnNcaqBqFlHaHCF github.com/surrealdb/surrealdb.go v0.3.2/go.mod h1:A0zahuChOaJtvTm2lefQnV+6aJtgqNLm9TIdYhZbw1Q= github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= github.com/testcontainers/testcontainers-go/modules/surrealdb v0.36.0 h1:x5kibhWJYAZe6GKXYlJyljVkBt7X9KRNJ4fj65AO6gI= github.com/testcontainers/testcontainers-go/modules/surrealdb v0.36.0/go.mod h1:mocRRy6nXfjM75723YS6KoIoUt5rldiYxRvC9niLceQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -114,23 +127,33 @@ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= +go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= -golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= +golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -145,8 +168,17 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= +golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -155,9 +187,19 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= +google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= +google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= +google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= +google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= From 494ff4e03562e8686082e5b7e3fd6e609121cb11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Yasir=20Na=C3=A7?= <76746351+aliyasirnac@users.noreply.github.com> Date: Tue, 29 Apr 2025 09:56:36 +0300 Subject: [PATCH 100/168] updated packages2 --- surrealdb/go.mod | 35 ++++++++++++++-------------- surrealdb/go.sum | 59 +++++++++++++++++++++++++++++++++++------------- 2 files changed, 61 insertions(+), 33 deletions(-) diff --git a/surrealdb/go.mod b/surrealdb/go.mod index 5871f0a3..284a8c41 100644 --- a/surrealdb/go.mod +++ b/surrealdb/go.mod @@ -6,59 +6,60 @@ require ( github.com/stretchr/testify v1.10.0 github.com/surrealdb/surrealdb.go v0.3.2 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/surrealdb v0.36.0 + github.com/testcontainers/testcontainers-go/modules/surrealdb v0.37.0 ) require ( dario.cat/mergo v1.0.1 // indirect - github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/docker/docker v28.0.1+incompatible // indirect + github.com/docker/docker v28.1.1+incompatible // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.8.2 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.8.0 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect github.com/gofrs/uuid v4.4.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect - github.com/klauspost/compress v1.17.4 // indirect - github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/klauspost/compress v1.18.0 // indirect + github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 // indirect github.com/magiconair/properties v1.8.10 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/go-archive v0.1.0 // indirect github.com/moby/patternmatcher v0.6.0 // indirect - github.com/moby/sys/sequential v0.5.0 // indirect - github.com/moby/sys/user v0.1.0 // indirect + github.com/moby/sys/sequential v0.6.0 // indirect + github.com/moby/sys/user v0.4.0 // indirect github.com/moby/sys/userns v0.1.0 // indirect - github.com/moby/term v0.5.0 // indirect + github.com/moby/term v0.5.2 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/shirou/gopsutil/v4 v4.25.1 // indirect + github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect + github.com/shirou/gopsutil/v4 v4.25.3 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/tklauser/go-sysconf v0.3.12 // indirect - github.com/tklauser/numcpus v0.6.1 // indirect + github.com/tklauser/go-sysconf v0.3.15 // indirect + github.com/tklauser/numcpus v0.10.0 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect go.opentelemetry.io/otel v1.35.0 // indirect go.opentelemetry.io/otel/metric v1.35.0 // indirect - go.opentelemetry.io/otel/sdk v1.32.0 // indirect + go.opentelemetry.io/otel/sdk v1.35.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect golang.org/x/crypto v0.37.0 // indirect golang.org/x/sys v0.32.0 // indirect diff --git a/surrealdb/go.sum b/surrealdb/go.sum index 0e1e9c89..4664ad09 100644 --- a/surrealdb/go.sum +++ b/surrealdb/go.sum @@ -2,12 +2,17 @@ dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 h1:He8afgbRMd7mFxO99hRNu+6tazq8nFF9lIwo9JFroBk= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= @@ -23,6 +28,8 @@ github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5Qvfr github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/docker v28.0.1+incompatible h1:FCHjSRdXhNRFjlHMTv4jUNlIBbTeRjrWfeFuJp7jpo0= github.com/docker/docker v28.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v28.1.1+incompatible h1:49M11BFLsVO1gxY9UX9p/zwkE/rswggs8AdFmXQw51I= +github.com/docker/docker v28.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -33,6 +40,8 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/fxamacker/cbor/v2 v2.8.0 h1:fFtUGXUzXPHTIUdne5+zzMPTfffl3RD5qYnkY40vtxU= +github.com/fxamacker/cbor/v2 v2.8.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -40,6 +49,8 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -57,28 +68,38 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= +github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= -github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 h1:PpXWgLPs+Fqr325bN2FD2ISlRRztXibcX6e8f5FR5Dc= +github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35/go.mod h1:autxFIvghDt3jPTLoqZ9OZ7s9qTGNAWmYCjVFWPX/zg= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/go-archive v0.1.0 h1:Kk/5rdW/g+H8NHdJW2gsXyZ7UnzvJNOy6VKJqueWdcQ= +github.com/moby/go-archive v0.1.0/go.mod h1:G9B+YoujNohJmrIYFBpSd54GTUB4lt9S+xVQvsJyFuo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU= +github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko= github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= +github.com/moby/sys/user v0.4.0 h1:jhcMKit7SA80hivmFJcbB1vqmw//wU61Zdui2eQXuMs= +github.com/moby/sys/user v0.4.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs= github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= +github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -91,10 +112,14 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI= +github.com/shirou/gopsutil/v4 v4.25.3 h1:SeA68lsu8gLggyMbmCn8cmp97V1TI9ld9sVzAUcKcKE= +github.com/shirou/gopsutil/v4 v4.25.3/go.mod h1:xbuxyoZj+UsgnZrENu3lQivsngRR5BdjbJwf2fv4szA= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -105,16 +130,18 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/surrealdb/surrealdb.go v0.3.2 h1:ynBbD0onW+M4BXhZ1+dDdVnNcaqBqFlHaHCFnk8LgmQ= github.com/surrealdb/surrealdb.go v0.3.2/go.mod h1:A0zahuChOaJtvTm2lefQnV+6aJtgqNLm9TIdYhZbw1Q= -github.com/testcontainers/testcontainers-go v0.36.0 h1:YpffyLuHtdp5EUsI5mT4sRw8GZhO/5ozyDT1xWGXt00= -github.com/testcontainers/testcontainers-go v0.36.0/go.mod h1:yk73GVJ0KUZIHUtFna6MO7QS144qYpoY8lEEtU9Hed0= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/surrealdb v0.36.0 h1:x5kibhWJYAZe6GKXYlJyljVkBt7X9KRNJ4fj65AO6gI= -github.com/testcontainers/testcontainers-go/modules/surrealdb v0.36.0/go.mod h1:mocRRy6nXfjM75723YS6KoIoUt5rldiYxRvC9niLceQ= +github.com/testcontainers/testcontainers-go/modules/surrealdb v0.37.0 h1:t+q4bKHoRGJ5815GvXqtH8h6HUvpzDGRuuPptdTnTtU= +github.com/testcontainers/testcontainers-go/modules/surrealdb v0.37.0/go.mod h1:Q6VDM9oKs2FAb1H+sH5EiCaXfLVjhNaoG++rAAMtsFE= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/go-sysconf v0.3.15 h1:VE89k0criAymJ/Os65CSn1IXaol+1wrsFHEB8Ol49K4= +github.com/tklauser/go-sysconf v0.3.15/go.mod h1:Dmjwr6tYFIseJw7a3dRLJfsHAMXZ3nEnL/aZY+0IuI4= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfjso= +github.com/tklauser/numcpus v0.10.0/go.mod h1:BiTKazU708GQTYF4mB+cmlpT2Is1gLk7XVuEeem8LsQ= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -125,6 +152,8 @@ go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJyS go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= @@ -135,6 +164,7 @@ go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/ go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= @@ -142,8 +172,6 @@ go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v8 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -152,8 +180,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -164,19 +192,17 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -203,3 +229,4 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= From e81b66dbf45e5e2b9acc2bc8744d95d8c120aa3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Yasir=20Na=C3=A7?= <76746351+aliyasirnac@users.noreply.github.com> Date: Tue, 29 Apr 2025 10:14:14 +0300 Subject: [PATCH 101/168] added garbage collector --- surrealdb/README.md | 5 +++++ surrealdb/config.go | 9 ++++++++ surrealdb/surrealdb.go | 45 ++++++++++++++++++++++++++++++++----- surrealdb/surrealdb_test.go | 21 +++++++++++++++++ 4 files changed, 75 insertions(+), 5 deletions(-) diff --git a/surrealdb/README.md b/surrealdb/README.md index 698ddb3f..ec32da04 100644 --- a/surrealdb/README.md +++ b/surrealdb/README.md @@ -62,6 +62,7 @@ Password: "root", Access: "full", Scope: "all", DefaultTable: "fiber_storage", +GCInterval: time.Second * 10, }) ``` @@ -92,6 +93,9 @@ Scope string // The default table used to store key-value records DefaultTable string + +// Optional. Default is 10 * time.Second +GCInterval time.Duration } ``` @@ -108,5 +112,6 @@ Password: "root", Access: "full", Scope: "all", DefaultTable: "fiber_storage", +GCInterval: time.Second * 10, } ``` diff --git a/surrealdb/config.go b/surrealdb/config.go index 7fcf1224..7179ccbb 100644 --- a/surrealdb/config.go +++ b/surrealdb/config.go @@ -3,6 +3,7 @@ package surrealdb import ( "log" "strings" + "time" ) // Config holds the configuration required to initialize and connect to a SurrealDB instance. @@ -41,6 +42,9 @@ type Config struct { // The default table used to store key-value records DefaultTable string + + // Optional. Default is 10 * time.Second + GCInterval time.Duration } var ConfigDefault = Config{ @@ -52,6 +56,7 @@ var ConfigDefault = Config{ Access: "full", Scope: "all", DefaultTable: "fiber_storage", + GCInterval: time.Second * 10, } func configDefault(config ...Config) Config { @@ -100,5 +105,9 @@ func configDefault(config ...Config) Config { log.Printf("Warning: ConnectionString %s doesn't start with ws://, wss://, http:// or https://", cfg.ConnectionString) } + if int(cfg.GCInterval.Seconds()) <= 0 { + cfg.GCInterval = ConfigDefault.GCInterval + } + return cfg } diff --git a/surrealdb/surrealdb.go b/surrealdb/surrealdb.go index 5f5382fa..0d5f23a2 100644 --- a/surrealdb/surrealdb.go +++ b/surrealdb/surrealdb.go @@ -10,8 +10,10 @@ import ( // Storage interface that is implemented by storage providers type Storage struct { - db *surrealdb.DB - table string + db *surrealdb.DB + table string + stopGC chan struct{} + interval time.Duration } // model represents a key-value storage record used in SurrealDB. @@ -54,10 +56,15 @@ func New(config ...Config) *Storage { panic(err) } - return &Storage{ - db: db, - table: cfg.DefaultTable, + storage := &Storage{ + db: db, + table: cfg.DefaultTable, + stopGC: make(chan struct{}), + interval: cfg.GCInterval, } + + go storage.gc() + return storage } func (s *Storage) Get(key string) ([]byte, error) { @@ -113,6 +120,7 @@ func (s *Storage) Reset() error { } func (s *Storage) Close() error { + close(s.stopGC) return s.db.Close() } @@ -139,3 +147,30 @@ func (s *Storage) List() ([]byte, error) { return json.Marshal(data) } + +func (s *Storage) gc() { + ticker := time.NewTicker(s.interval) + defer ticker.Stop() + + for { + select { + case <-ticker.C: + s.cleanupExpired() + case <-s.stopGC: + return + } + } +} + +func (s *Storage) cleanupExpired() { + records, err := surrealdb.Select[[]model, models.Table](s.db, models.Table(s.table)) + if err != nil { + return + } + now := time.Now().Unix() + for _, item := range *records { + if item.Exp > 0 && now > item.Exp { + _ = s.Delete(item.Key) + } + } +} diff --git a/surrealdb/surrealdb_test.go b/surrealdb/surrealdb_test.go index 339cb3e5..7bf353b8 100644 --- a/surrealdb/surrealdb_test.go +++ b/surrealdb/surrealdb_test.go @@ -182,6 +182,27 @@ func Test_Surrealdb_ListSkipsExpired(t *testing.T) { require.NotContains(t, result, "expired") } +func Test_Surrealdb_GarbageCollector_RemovesExpiredKeys(t *testing.T) { + testStore, err := newTestStore(t) + require.NoError(t, err) + defer testStore.Close() + + err = testStore.Set("temp_key", []byte("temp_value"), 1*time.Second) + require.NoError(t, err) + + val, err := testStore.Get("temp_key") + require.NoError(t, err) + require.NotNil(t, val) + + time.Sleep(3 * time.Second) + + require.Eventually(t, func() bool { + val, err = testStore.Get("temp_key") + require.NoError(t, err) + return val == nil + }, 3*time.Second, 300*time.Millisecond) +} + func Benchmark_SurrealDB_Set(b *testing.B) { testStore, err := newTestStore(b) require.NoError(b, err) From 9cd4208e54ef340eac55858726735c1dd3c9e237 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 07:30:16 +0000 Subject: [PATCH 102/168] chore(deps): bump github.com/testcontainers/testcontainers-go/modules/clickhouse Bumps [github.com/testcontainers/testcontainers-go/modules/clickhouse](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go/modules/clickhouse dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- clickhouse/go.mod | 24 +++++++++---------- clickhouse/go.sum | 61 ++++++++++++++++++++++++----------------------- 2 files changed, 43 insertions(+), 42 deletions(-) diff --git a/clickhouse/go.mod b/clickhouse/go.mod index 91cf3210..aeb024bf 100644 --- a/clickhouse/go.mod +++ b/clickhouse/go.mod @@ -6,12 +6,12 @@ require ( github.com/ClickHouse/clickhouse-go/v2 v2.34.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/clickhouse v0.36.0 + github.com/testcontainers/testcontainers-go/modules/clickhouse v0.37.0 ) require ( dario.cat/mergo v1.0.1 // indirect - github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect github.com/ClickHouse/ch-go v0.65.1 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/andybalholm/brotli v1.1.1 // indirect @@ -30,19 +30,19 @@ require ( github.com/go-faster/errors v0.7.1 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/klauspost/compress v1.18.0 // indirect - github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 // indirect github.com/magiconair/properties v1.8.10 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect - github.com/moby/sys/sequential v0.5.0 // indirect - github.com/moby/sys/user v0.1.0 // indirect + github.com/moby/sys/sequential v0.6.0 // indirect + github.com/moby/sys/user v0.4.0 // indirect github.com/moby/sys/userns v0.1.0 // indirect - github.com/moby/term v0.5.0 // indirect + github.com/moby/term v0.5.2 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect @@ -50,16 +50,16 @@ require ( github.com/pierrec/lz4/v4 v4.1.22 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/segmentio/asm v1.2.0 // indirect - github.com/shirou/gopsutil/v4 v4.25.1 // indirect + github.com/shirou/gopsutil/v4 v4.25.3 // indirect github.com/shopspring/decimal v1.4.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/tklauser/go-sysconf v0.3.12 // indirect - github.com/tklauser/numcpus v0.6.1 // indirect + github.com/tklauser/go-sysconf v0.3.15 // indirect + github.com/tklauser/numcpus v0.10.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect go.opentelemetry.io/otel v1.35.0 // indirect go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect diff --git a/clickhouse/go.sum b/clickhouse/go.sum index 922fdb44..e4edf18e 100644 --- a/clickhouse/go.sum +++ b/clickhouse/go.sum @@ -2,8 +2,8 @@ dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/ClickHouse/ch-go v0.65.1 h1:SLuxmLl5Mjj44/XbINsK2HFvzqup0s6rwKLFH347ZhU= github.com/ClickHouse/ch-go v0.65.1/go.mod h1:bsodgURwmrkvkBe5jw1qnGDgyITsYErfONKAHn05nv4= github.com/ClickHouse/clickhouse-go/v2 v2.34.0 h1:Y4rqkdrRHgExvC4o/NTbLdY5LFQ3LHS77/RNFxFX3Co= @@ -46,15 +46,15 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -73,22 +73,22 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 h1:PpXWgLPs+Fqr325bN2FD2ISlRRztXibcX6e8f5FR5Dc= +github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35/go.mod h1:autxFIvghDt3jPTLoqZ9OZ7s9qTGNAWmYCjVFWPX/zg= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= -github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= -github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= -github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= -github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= +github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU= +github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko= +github.com/moby/sys/user v0.4.0 h1:jhcMKit7SA80hivmFJcbB1vqmw//wU61Zdui2eQXuMs= +github.com/moby/sys/user v0.4.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs= github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= -github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= -github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= +github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= @@ -105,14 +105,14 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= -github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= -github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI= +github.com/shirou/gopsutil/v4 v4.25.3 h1:SeA68lsu8gLggyMbmCn8cmp97V1TI9ld9sVzAUcKcKE= +github.com/shirou/gopsutil/v4 v4.25.3/go.mod h1:xbuxyoZj+UsgnZrENu3lQivsngRR5BdjbJwf2fv4szA= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= @@ -126,13 +126,13 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/clickhouse v0.36.0 h1:hTFWpQQnuAYgrCxngqRA1bOD4JZaqjxAkLOVUoD8mY4= -github.com/testcontainers/testcontainers-go/modules/clickhouse v0.36.0/go.mod h1:H3lCgmTTVgdw+B+aKLFqDuwlphds6n0aS2UM4j1uhhw= +github.com/testcontainers/testcontainers-go/modules/clickhouse v0.37.0 h1:ZAgjgv4a90upKt2WpZxtB5u11i/+AgHhnrwgg7qwkM8= +github.com/testcontainers/testcontainers-go/modules/clickhouse v0.37.0/go.mod h1:riR6YU1UZu2NR6o1192cVSp982ZrQEz2oH/aWRmOc2E= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= -github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= -github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= -github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/tklauser/go-sysconf v0.3.15 h1:VE89k0criAymJ/Os65CSn1IXaol+1wrsFHEB8Ol49K4= +github.com/tklauser/go-sysconf v0.3.15/go.mod h1:Dmjwr6tYFIseJw7a3dRLJfsHAMXZ3nEnL/aZY+0IuI4= +github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfjso= +github.com/tklauser/numcpus v0.10.0/go.mod h1:BiTKazU708GQTYF4mB+cmlpT2Is1gLk7XVuEeem8LsQ= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= @@ -146,8 +146,8 @@ github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQ go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= @@ -156,8 +156,10 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMey go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= -go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= -go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= +go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= +go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= +go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= +go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= @@ -175,8 +177,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -191,8 +193,7 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= From 7b0abe9530f535e765d71daeb782ec2e4217dad9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 07:30:24 +0000 Subject: [PATCH 103/168] chore(deps): bump github.com/testcontainers/testcontainers-go/modules/couchbase Bumps [github.com/testcontainers/testcontainers-go/modules/couchbase](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go/modules/couchbase dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- couchbase/go.mod | 2 +- couchbase/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/couchbase/go.mod b/couchbase/go.mod index a58d394e..7c604e46 100644 --- a/couchbase/go.mod +++ b/couchbase/go.mod @@ -6,7 +6,7 @@ require ( github.com/couchbase/gocb/v2 v2.10.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/couchbase v0.36.0 + github.com/testcontainers/testcontainers-go/modules/couchbase v0.37.0 ) require ( diff --git a/couchbase/go.sum b/couchbase/go.sum index 5e701a6c..e93bda00 100644 --- a/couchbase/go.sum +++ b/couchbase/go.sum @@ -148,8 +148,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/couchbase v0.36.0 h1:tONuFHlEMLca9xsTY+FUW1F7cimYBB2n3bYWK9o/tC8= -github.com/testcontainers/testcontainers-go/modules/couchbase v0.36.0/go.mod h1:YsZrzI2BMXa0bOyEoBqtq06Ntw/xRc431yMhFlYMzv4= +github.com/testcontainers/testcontainers-go/modules/couchbase v0.37.0 h1:syakhDNXGB+uVto/bkulwvxjAPW7d5fweXckDMrhJdY= +github.com/testcontainers/testcontainers-go/modules/couchbase v0.37.0/go.mod h1:U0ZOvDucyeVjYTveNJlHlXmjlrAe9j7tnk28CElXbFo= github.com/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U= github.com/tidwall/gjson v1.17.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= From e55caf099c19828c4a3abd0a08b3b68d4195623d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 07:31:30 +0000 Subject: [PATCH 104/168] chore(deps): bump github.com/aws/aws-sdk-go-v2/service/dynamodb Bumps [github.com/aws/aws-sdk-go-v2/service/dynamodb](https://github.com/aws/aws-sdk-go-v2) from 1.43.0 to 1.43.1. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.43.0...service/s3/v1.43.1) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/dynamodb dependency-version: 1.43.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- dynamodb/go.mod | 2 +- dynamodb/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dynamodb/go.mod b/dynamodb/go.mod index cd99e338..9967ed08 100644 --- a/dynamodb/go.mod +++ b/dynamodb/go.mod @@ -7,7 +7,7 @@ require ( github.com/aws/aws-sdk-go-v2/config v1.29.14 github.com/aws/aws-sdk-go-v2/credentials v1.17.67 github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.18.13 - github.com/aws/aws-sdk-go-v2/service/dynamodb v1.43.0 + github.com/aws/aws-sdk-go-v2/service/dynamodb v1.43.1 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/dynamodb v0.36.0 diff --git a/dynamodb/go.sum b/dynamodb/go.sum index a4f90861..07bdcce6 100644 --- a/dynamodb/go.sum +++ b/dynamodb/go.sum @@ -22,8 +22,8 @@ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 h1:SZwFm17ZUNNg5Np0io github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34/go.mod h1:dFZsC0BLo346mvKQLWmoJxT+Sjp+qcVR1tRVHQGOH9Q= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.43.0 h1:w0Evr7ssE6gP/EjN6UpAvLyWEdv9NGPbW6awu5OGQc0= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.43.0/go.mod h1:yYaWRnVSPyAmexW5t7G3TcuYoalYfT+xQwzWsvtUQ7M= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.43.1 h1:YYjNTAyPL0425ECmq6Xm48NSXdT6hDVQmLOJZxyhNTM= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.43.1/go.mod h1:yYaWRnVSPyAmexW5t7G3TcuYoalYfT+xQwzWsvtUQ7M= github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.25.3 h1:GHC1WTF3ZBZy+gvz2qtYB6ttALVx35hlwc4IzOIUY7g= github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.25.3/go.mod h1:lUqWdw5/esjPTkITXhN4C66o1ltwDq2qQ12j3SOzhVg= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b5IzM/lum78bZ590jy36+d/aFLgKF/4Vd1xPE= From d41a7f11b5c3873a01fae04c8c96c79655f59391 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 07:32:37 +0000 Subject: [PATCH 105/168] chore(deps): bump github.com/testcontainers/testcontainers-go/modules/dynamodb Bumps [github.com/testcontainers/testcontainers-go/modules/dynamodb](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go/modules/dynamodb dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- dynamodb/go.mod | 2 +- dynamodb/go.sum | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dynamodb/go.mod b/dynamodb/go.mod index cd99e338..2f73be2c 100644 --- a/dynamodb/go.mod +++ b/dynamodb/go.mod @@ -10,7 +10,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/dynamodb v1.43.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/dynamodb v0.36.0 + github.com/testcontainers/testcontainers-go/modules/dynamodb v0.37.0 ) require ( diff --git a/dynamodb/go.sum b/dynamodb/go.sum index a4f90861..7f1248ad 100644 --- a/dynamodb/go.sum +++ b/dynamodb/go.sum @@ -131,8 +131,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/dynamodb v0.36.0 h1:+50K/F+J3K5UsCHPNWNS5XZ/2iFHUhXh5jNg0ajbe/8= -github.com/testcontainers/testcontainers-go/modules/dynamodb v0.36.0/go.mod h1:vMph1Ik+EHiSku2MOXiMIuPrEQP1xf84MiERodejcGU= +github.com/testcontainers/testcontainers-go/modules/dynamodb v0.37.0 h1:t8W05ryS/vpYrSco2qBKnOCUWaF6qBICX/PbYXVyk4M= +github.com/testcontainers/testcontainers-go/modules/dynamodb v0.37.0/go.mod h1:7dADlhl5YbYQKCum9zTAydXDgCJQHe3kXELBZ/po9Ss= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -170,8 +170,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= From 1b8254742688e8810f0edaef8f05388c9f893300 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 07:32:41 +0000 Subject: [PATCH 106/168] chore(deps): bump github.com/testcontainers/testcontainers-go/modules/minio Bumps [github.com/testcontainers/testcontainers-go/modules/minio](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go/modules/minio dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- minio/go.mod | 2 +- minio/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/minio/go.mod b/minio/go.mod index b7391245..6da3eda4 100644 --- a/minio/go.mod +++ b/minio/go.mod @@ -6,7 +6,7 @@ require ( github.com/minio/minio-go/v7 v7.0.91 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/minio v0.36.0 + github.com/testcontainers/testcontainers-go/modules/minio v0.37.0 github.com/valyala/bytebufferpool v1.0.0 ) diff --git a/minio/go.sum b/minio/go.sum index ef007f11..b3547968 100644 --- a/minio/go.sum +++ b/minio/go.sum @@ -114,8 +114,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/minio v0.36.0 h1:NYOqshU552vjkpeNCDev7W3Jmuh2yVEvdko6Q9WX/GM= -github.com/testcontainers/testcontainers-go/modules/minio v0.36.0/go.mod h1:LAL+x/siLvLHVQ5G/r3X1bLlUhOj9xo8CUEySbNWUz4= +github.com/testcontainers/testcontainers-go/modules/minio v0.37.0 h1:p2LXViCDHBP0JfVfT9hDxkbTxv+BzAL5ZYOF8sj1q1I= +github.com/testcontainers/testcontainers-go/modules/minio v0.37.0/go.mod h1:OhJqQ9L2FOnb/otqLbjskhj7utl1Z5RFt2k6mhG9aeI= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= From 4afaea1f9cc2676a20924b078dbf0cae7a41e4bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 07:32:46 +0000 Subject: [PATCH 107/168] chore(deps): bump github.com/testcontainers/testcontainers-go/modules/mongodb Bumps [github.com/testcontainers/testcontainers-go/modules/mongodb](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go/modules/mongodb dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- mongodb/go.mod | 2 +- mongodb/go.sum | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mongodb/go.mod b/mongodb/go.mod index 19f7573b..995ae389 100644 --- a/mongodb/go.mod +++ b/mongodb/go.mod @@ -5,7 +5,7 @@ go 1.23.0 require ( github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/mongodb v0.36.0 + github.com/testcontainers/testcontainers-go/modules/mongodb v0.37.0 go.mongodb.org/mongo-driver v1.17.3 ) diff --git a/mongodb/go.sum b/mongodb/go.sum index e24236bb..f44cb94f 100644 --- a/mongodb/go.sum +++ b/mongodb/go.sum @@ -101,8 +101,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/mongodb v0.36.0 h1:HDW6rknSqci/154rpEGNL8VrKJxXmApxcG++VedQKTE= -github.com/testcontainers/testcontainers-go/modules/mongodb v0.36.0/go.mod h1:RhguDt49jCUepedF4zBRJwb66VWWvSg5YQ+nQNff370= +github.com/testcontainers/testcontainers-go/modules/mongodb v0.37.0 h1:drGy4LJOVkIKpKGm1YKTfVzb1qRhN/konVpmuUphq0k= +github.com/testcontainers/testcontainers-go/modules/mongodb v0.37.0/go.mod h1:e9/4dGJfSZW59/kXGf/ksrEvA+BqP/daax0Usp2cpsM= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -155,8 +155,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= From 070b07d81727b1156eafa633d18e45cdaa2fcc87 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 07:32:49 +0000 Subject: [PATCH 108/168] chore(deps): bump github.com/testcontainers/testcontainers-go/modules/mysql Bumps [github.com/testcontainers/testcontainers-go/modules/mysql](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go/modules/mysql dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- mysql/go.mod | 2 +- mysql/go.sum | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mysql/go.mod b/mysql/go.mod index c6051aed..3ebc93a0 100644 --- a/mysql/go.mod +++ b/mysql/go.mod @@ -6,7 +6,7 @@ require ( github.com/go-sql-driver/mysql v1.9.2 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/mysql v0.36.0 + github.com/testcontainers/testcontainers-go/modules/mysql v0.37.0 ) require ( diff --git a/mysql/go.sum b/mysql/go.sum index 683a2878..795f9e92 100644 --- a/mysql/go.sum +++ b/mysql/go.sum @@ -101,8 +101,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/mysql v0.36.0 h1:WUYu/gB23et+T9XCqfmYJB7eWW8/1qqPCxNIaRbS0yk= -github.com/testcontainers/testcontainers-go/modules/mysql v0.36.0/go.mod h1:ED7dKWk3JE/dMRJ3t45TNGf3h9/htQG5au5gd1DuQcw= +github.com/testcontainers/testcontainers-go/modules/mysql v0.37.0 h1:LqUos1oR5iuuzorFnSvxsHNdYdCHB/DfI82CuT58wbI= +github.com/testcontainers/testcontainers-go/modules/mysql v0.37.0/go.mod h1:vHEEHx5Kf+uq5hveaVAMrTzPY8eeRZcKcl23MRw5Tkc= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -140,8 +140,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= From f421016863948e7c5631038e104d7953730c81c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 07:32:53 +0000 Subject: [PATCH 109/168] chore(deps): bump github.com/testcontainers/testcontainers-go/modules/nats Bumps [github.com/testcontainers/testcontainers-go/modules/nats](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go/modules/nats dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- nats/go.mod | 2 +- nats/go.sum | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nats/go.mod b/nats/go.mod index 408dee01..7d8fa7e8 100644 --- a/nats/go.mod +++ b/nats/go.mod @@ -7,7 +7,7 @@ require ( github.com/nats-io/nats.go v1.41.2 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/nats v0.36.0 + github.com/testcontainers/testcontainers-go/modules/nats v0.37.0 ) require ( diff --git a/nats/go.sum b/nats/go.sum index 5e588b58..184c83b9 100644 --- a/nats/go.sum +++ b/nats/go.sum @@ -105,8 +105,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/nats v0.36.0 h1:4HLlNtRpida6zYlFEkwsrdn8EnJGeAUk33u9vRDgIFE= -github.com/testcontainers/testcontainers-go/modules/nats v0.36.0/go.mod h1:jWBLBFq+rMbEjmlmhCIvE31Uytp8eahlr9Y01vD8Ac4= +github.com/testcontainers/testcontainers-go/modules/nats v0.37.0 h1:W0CuaYbJZBeao2B0/AgjdRbDjnQFPu9gWpnxylNevts= +github.com/testcontainers/testcontainers-go/modules/nats v0.37.0/go.mod h1:yPPcc9JrIF6i/lhBdvcSWjVG/LcEdX04VB8Z0zePBgg= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -144,8 +144,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= From 92ce3476c5be0155fa5cbf0f689200af639cfbc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Tue, 29 Apr 2025 09:33:31 +0200 Subject: [PATCH 110/168] chore: bump tc-go modules to v0.37.0 --- clickhouse/go.mod | 24 +++++++++---------- clickhouse/go.sum | 61 ++++++++++++++++++++++++----------------------- couchbase/go.mod | 2 +- couchbase/go.sum | 4 ++-- dynamodb/go.mod | 2 +- dynamodb/go.sum | 8 +++---- minio/go.mod | 2 +- minio/go.sum | 4 ++-- mongodb/go.mod | 2 +- mongodb/go.sum | 8 +++---- mysql/go.mod | 2 +- mysql/go.sum | 8 +++---- nats/go.mod | 2 +- nats/go.sum | 8 +++---- neo4j/go.mod | 2 +- neo4j/go.sum | 8 +++---- postgres/go.mod | 2 +- postgres/go.sum | 12 +++++----- s3/go.mod | 2 +- s3/go.sum | 8 +++---- scylladb/go.mod | 2 +- scylladb/go.sum | 8 +++---- 22 files changed, 91 insertions(+), 90 deletions(-) diff --git a/clickhouse/go.mod b/clickhouse/go.mod index 91cf3210..aeb024bf 100644 --- a/clickhouse/go.mod +++ b/clickhouse/go.mod @@ -6,12 +6,12 @@ require ( github.com/ClickHouse/clickhouse-go/v2 v2.34.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/clickhouse v0.36.0 + github.com/testcontainers/testcontainers-go/modules/clickhouse v0.37.0 ) require ( dario.cat/mergo v1.0.1 // indirect - github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect github.com/ClickHouse/ch-go v0.65.1 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/andybalholm/brotli v1.1.1 // indirect @@ -30,19 +30,19 @@ require ( github.com/go-faster/errors v0.7.1 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/klauspost/compress v1.18.0 // indirect - github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 // indirect github.com/magiconair/properties v1.8.10 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect - github.com/moby/sys/sequential v0.5.0 // indirect - github.com/moby/sys/user v0.1.0 // indirect + github.com/moby/sys/sequential v0.6.0 // indirect + github.com/moby/sys/user v0.4.0 // indirect github.com/moby/sys/userns v0.1.0 // indirect - github.com/moby/term v0.5.0 // indirect + github.com/moby/term v0.5.2 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect @@ -50,16 +50,16 @@ require ( github.com/pierrec/lz4/v4 v4.1.22 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/segmentio/asm v1.2.0 // indirect - github.com/shirou/gopsutil/v4 v4.25.1 // indirect + github.com/shirou/gopsutil/v4 v4.25.3 // indirect github.com/shopspring/decimal v1.4.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/tklauser/go-sysconf v0.3.12 // indirect - github.com/tklauser/numcpus v0.6.1 // indirect + github.com/tklauser/go-sysconf v0.3.15 // indirect + github.com/tklauser/numcpus v0.10.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect go.opentelemetry.io/otel v1.35.0 // indirect go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect diff --git a/clickhouse/go.sum b/clickhouse/go.sum index 922fdb44..e4edf18e 100644 --- a/clickhouse/go.sum +++ b/clickhouse/go.sum @@ -2,8 +2,8 @@ dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/ClickHouse/ch-go v0.65.1 h1:SLuxmLl5Mjj44/XbINsK2HFvzqup0s6rwKLFH347ZhU= github.com/ClickHouse/ch-go v0.65.1/go.mod h1:bsodgURwmrkvkBe5jw1qnGDgyITsYErfONKAHn05nv4= github.com/ClickHouse/clickhouse-go/v2 v2.34.0 h1:Y4rqkdrRHgExvC4o/NTbLdY5LFQ3LHS77/RNFxFX3Co= @@ -46,15 +46,15 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -73,22 +73,22 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 h1:PpXWgLPs+Fqr325bN2FD2ISlRRztXibcX6e8f5FR5Dc= +github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35/go.mod h1:autxFIvghDt3jPTLoqZ9OZ7s9qTGNAWmYCjVFWPX/zg= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= -github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= -github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= -github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= -github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= +github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU= +github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko= +github.com/moby/sys/user v0.4.0 h1:jhcMKit7SA80hivmFJcbB1vqmw//wU61Zdui2eQXuMs= +github.com/moby/sys/user v0.4.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs= github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= -github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= -github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= +github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= @@ -105,14 +105,14 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= -github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= -github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI= +github.com/shirou/gopsutil/v4 v4.25.3 h1:SeA68lsu8gLggyMbmCn8cmp97V1TI9ld9sVzAUcKcKE= +github.com/shirou/gopsutil/v4 v4.25.3/go.mod h1:xbuxyoZj+UsgnZrENu3lQivsngRR5BdjbJwf2fv4szA= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= @@ -126,13 +126,13 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/clickhouse v0.36.0 h1:hTFWpQQnuAYgrCxngqRA1bOD4JZaqjxAkLOVUoD8mY4= -github.com/testcontainers/testcontainers-go/modules/clickhouse v0.36.0/go.mod h1:H3lCgmTTVgdw+B+aKLFqDuwlphds6n0aS2UM4j1uhhw= +github.com/testcontainers/testcontainers-go/modules/clickhouse v0.37.0 h1:ZAgjgv4a90upKt2WpZxtB5u11i/+AgHhnrwgg7qwkM8= +github.com/testcontainers/testcontainers-go/modules/clickhouse v0.37.0/go.mod h1:riR6YU1UZu2NR6o1192cVSp982ZrQEz2oH/aWRmOc2E= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= -github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= -github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= -github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/tklauser/go-sysconf v0.3.15 h1:VE89k0criAymJ/Os65CSn1IXaol+1wrsFHEB8Ol49K4= +github.com/tklauser/go-sysconf v0.3.15/go.mod h1:Dmjwr6tYFIseJw7a3dRLJfsHAMXZ3nEnL/aZY+0IuI4= +github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfjso= +github.com/tklauser/numcpus v0.10.0/go.mod h1:BiTKazU708GQTYF4mB+cmlpT2Is1gLk7XVuEeem8LsQ= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= @@ -146,8 +146,8 @@ github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQ go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= @@ -156,8 +156,10 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMey go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= -go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= -go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= +go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= +go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= +go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= +go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= @@ -175,8 +177,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -191,8 +193,7 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= diff --git a/couchbase/go.mod b/couchbase/go.mod index a58d394e..7c604e46 100644 --- a/couchbase/go.mod +++ b/couchbase/go.mod @@ -6,7 +6,7 @@ require ( github.com/couchbase/gocb/v2 v2.10.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/couchbase v0.36.0 + github.com/testcontainers/testcontainers-go/modules/couchbase v0.37.0 ) require ( diff --git a/couchbase/go.sum b/couchbase/go.sum index 5e701a6c..e93bda00 100644 --- a/couchbase/go.sum +++ b/couchbase/go.sum @@ -148,8 +148,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/couchbase v0.36.0 h1:tONuFHlEMLca9xsTY+FUW1F7cimYBB2n3bYWK9o/tC8= -github.com/testcontainers/testcontainers-go/modules/couchbase v0.36.0/go.mod h1:YsZrzI2BMXa0bOyEoBqtq06Ntw/xRc431yMhFlYMzv4= +github.com/testcontainers/testcontainers-go/modules/couchbase v0.37.0 h1:syakhDNXGB+uVto/bkulwvxjAPW7d5fweXckDMrhJdY= +github.com/testcontainers/testcontainers-go/modules/couchbase v0.37.0/go.mod h1:U0ZOvDucyeVjYTveNJlHlXmjlrAe9j7tnk28CElXbFo= github.com/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U= github.com/tidwall/gjson v1.17.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= diff --git a/dynamodb/go.mod b/dynamodb/go.mod index cd99e338..2f73be2c 100644 --- a/dynamodb/go.mod +++ b/dynamodb/go.mod @@ -10,7 +10,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/dynamodb v1.43.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/dynamodb v0.36.0 + github.com/testcontainers/testcontainers-go/modules/dynamodb v0.37.0 ) require ( diff --git a/dynamodb/go.sum b/dynamodb/go.sum index a4f90861..7f1248ad 100644 --- a/dynamodb/go.sum +++ b/dynamodb/go.sum @@ -131,8 +131,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/dynamodb v0.36.0 h1:+50K/F+J3K5UsCHPNWNS5XZ/2iFHUhXh5jNg0ajbe/8= -github.com/testcontainers/testcontainers-go/modules/dynamodb v0.36.0/go.mod h1:vMph1Ik+EHiSku2MOXiMIuPrEQP1xf84MiERodejcGU= +github.com/testcontainers/testcontainers-go/modules/dynamodb v0.37.0 h1:t8W05ryS/vpYrSco2qBKnOCUWaF6qBICX/PbYXVyk4M= +github.com/testcontainers/testcontainers-go/modules/dynamodb v0.37.0/go.mod h1:7dADlhl5YbYQKCum9zTAydXDgCJQHe3kXELBZ/po9Ss= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -170,8 +170,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/minio/go.mod b/minio/go.mod index b7391245..6da3eda4 100644 --- a/minio/go.mod +++ b/minio/go.mod @@ -6,7 +6,7 @@ require ( github.com/minio/minio-go/v7 v7.0.91 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/minio v0.36.0 + github.com/testcontainers/testcontainers-go/modules/minio v0.37.0 github.com/valyala/bytebufferpool v1.0.0 ) diff --git a/minio/go.sum b/minio/go.sum index ef007f11..b3547968 100644 --- a/minio/go.sum +++ b/minio/go.sum @@ -114,8 +114,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/minio v0.36.0 h1:NYOqshU552vjkpeNCDev7W3Jmuh2yVEvdko6Q9WX/GM= -github.com/testcontainers/testcontainers-go/modules/minio v0.36.0/go.mod h1:LAL+x/siLvLHVQ5G/r3X1bLlUhOj9xo8CUEySbNWUz4= +github.com/testcontainers/testcontainers-go/modules/minio v0.37.0 h1:p2LXViCDHBP0JfVfT9hDxkbTxv+BzAL5ZYOF8sj1q1I= +github.com/testcontainers/testcontainers-go/modules/minio v0.37.0/go.mod h1:OhJqQ9L2FOnb/otqLbjskhj7utl1Z5RFt2k6mhG9aeI= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= diff --git a/mongodb/go.mod b/mongodb/go.mod index 19f7573b..995ae389 100644 --- a/mongodb/go.mod +++ b/mongodb/go.mod @@ -5,7 +5,7 @@ go 1.23.0 require ( github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/mongodb v0.36.0 + github.com/testcontainers/testcontainers-go/modules/mongodb v0.37.0 go.mongodb.org/mongo-driver v1.17.3 ) diff --git a/mongodb/go.sum b/mongodb/go.sum index e24236bb..f44cb94f 100644 --- a/mongodb/go.sum +++ b/mongodb/go.sum @@ -101,8 +101,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/mongodb v0.36.0 h1:HDW6rknSqci/154rpEGNL8VrKJxXmApxcG++VedQKTE= -github.com/testcontainers/testcontainers-go/modules/mongodb v0.36.0/go.mod h1:RhguDt49jCUepedF4zBRJwb66VWWvSg5YQ+nQNff370= +github.com/testcontainers/testcontainers-go/modules/mongodb v0.37.0 h1:drGy4LJOVkIKpKGm1YKTfVzb1qRhN/konVpmuUphq0k= +github.com/testcontainers/testcontainers-go/modules/mongodb v0.37.0/go.mod h1:e9/4dGJfSZW59/kXGf/ksrEvA+BqP/daax0Usp2cpsM= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -155,8 +155,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/mysql/go.mod b/mysql/go.mod index c6051aed..3ebc93a0 100644 --- a/mysql/go.mod +++ b/mysql/go.mod @@ -6,7 +6,7 @@ require ( github.com/go-sql-driver/mysql v1.9.2 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/mysql v0.36.0 + github.com/testcontainers/testcontainers-go/modules/mysql v0.37.0 ) require ( diff --git a/mysql/go.sum b/mysql/go.sum index 683a2878..795f9e92 100644 --- a/mysql/go.sum +++ b/mysql/go.sum @@ -101,8 +101,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/mysql v0.36.0 h1:WUYu/gB23et+T9XCqfmYJB7eWW8/1qqPCxNIaRbS0yk= -github.com/testcontainers/testcontainers-go/modules/mysql v0.36.0/go.mod h1:ED7dKWk3JE/dMRJ3t45TNGf3h9/htQG5au5gd1DuQcw= +github.com/testcontainers/testcontainers-go/modules/mysql v0.37.0 h1:LqUos1oR5iuuzorFnSvxsHNdYdCHB/DfI82CuT58wbI= +github.com/testcontainers/testcontainers-go/modules/mysql v0.37.0/go.mod h1:vHEEHx5Kf+uq5hveaVAMrTzPY8eeRZcKcl23MRw5Tkc= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -140,8 +140,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/nats/go.mod b/nats/go.mod index 408dee01..7d8fa7e8 100644 --- a/nats/go.mod +++ b/nats/go.mod @@ -7,7 +7,7 @@ require ( github.com/nats-io/nats.go v1.41.2 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/nats v0.36.0 + github.com/testcontainers/testcontainers-go/modules/nats v0.37.0 ) require ( diff --git a/nats/go.sum b/nats/go.sum index 5e588b58..184c83b9 100644 --- a/nats/go.sum +++ b/nats/go.sum @@ -105,8 +105,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/nats v0.36.0 h1:4HLlNtRpida6zYlFEkwsrdn8EnJGeAUk33u9vRDgIFE= -github.com/testcontainers/testcontainers-go/modules/nats v0.36.0/go.mod h1:jWBLBFq+rMbEjmlmhCIvE31Uytp8eahlr9Y01vD8Ac4= +github.com/testcontainers/testcontainers-go/modules/nats v0.37.0 h1:W0CuaYbJZBeao2B0/AgjdRbDjnQFPu9gWpnxylNevts= +github.com/testcontainers/testcontainers-go/modules/nats v0.37.0/go.mod h1:yPPcc9JrIF6i/lhBdvcSWjVG/LcEdX04VB8Z0zePBgg= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -144,8 +144,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/neo4j/go.mod b/neo4j/go.mod index 9e194109..9751acbd 100644 --- a/neo4j/go.mod +++ b/neo4j/go.mod @@ -6,7 +6,7 @@ require ( github.com/neo4j/neo4j-go-driver/v5 v5.28.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/neo4j v0.36.0 + github.com/testcontainers/testcontainers-go/modules/neo4j v0.37.0 ) require ( diff --git a/neo4j/go.sum b/neo4j/go.sum index 86e38f9e..2a1e5051 100644 --- a/neo4j/go.sum +++ b/neo4j/go.sum @@ -99,8 +99,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/neo4j v0.36.0 h1:iJG9GVzUeKOWsPKrqgaY3//VyhsRPyscYiIZUBDuV3s= -github.com/testcontainers/testcontainers-go/modules/neo4j v0.36.0/go.mod h1:sqTRVpKR0fycv9FwHm0U/KhlQCUd8qfwgllaMtfJqgo= +github.com/testcontainers/testcontainers-go/modules/neo4j v0.37.0 h1:DP5HdG+09hvtCMZmatCLiDWO7Kb9oiyvHkQSo4z8Y+0= +github.com/testcontainers/testcontainers-go/modules/neo4j v0.37.0/go.mod h1:tNi2wrLU67kn7y+bS6oHz3oetC1j/NaroGBE/Rg4JCA= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -138,8 +138,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/postgres/go.mod b/postgres/go.mod index 044bbfce..ed8ae681 100644 --- a/postgres/go.mod +++ b/postgres/go.mod @@ -6,7 +6,7 @@ require ( github.com/jackc/pgx/v5 v5.7.4 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/postgres v0.36.0 + github.com/testcontainers/testcontainers-go/modules/postgres v0.37.0 ) require ( diff --git a/postgres/go.sum b/postgres/go.sum index b8fbcafd..0631ecf3 100644 --- a/postgres/go.sum +++ b/postgres/go.sum @@ -69,8 +69,8 @@ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mdelapenya/tlscert v0.1.0 h1:YTpF579PYUX475eOL+6zyEO3ngLTOUWck78NBuJVXaM= -github.com/mdelapenya/tlscert v0.1.0/go.mod h1:wrbyM/DwbFCeCeqdPX/8c6hNOqQgbf0rUDErE1uD+64= +github.com/mdelapenya/tlscert v0.2.0 h1:7H81W6Z/4weDvZBNOfQte5GpIMo0lGYEeWbkGp5LJHI= +github.com/mdelapenya/tlscert v0.2.0/go.mod h1:O4njj3ELLnJjGdkN7M/vIVCpZ+Cf0L6muqOG4tLSl8o= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= @@ -110,8 +110,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/postgres v0.36.0 h1:xTGNNsOD9IIssH0dnAGNUH+SD9GYWyaP2t5xD2lg0as= -github.com/testcontainers/testcontainers-go/modules/postgres v0.36.0/go.mod h1:WKS3MGq1lzbVibIRnL08TOaf5bKWPxJe5frzyQfV4oY= +github.com/testcontainers/testcontainers-go/modules/postgres v0.37.0 h1:hsVwFkS6s+79MbKEO+W7A1wNIw1fmkMtF4fg83m6kbc= +github.com/testcontainers/testcontainers-go/modules/postgres v0.37.0/go.mod h1:Qj/eGbRbO/rEYdcRLmN+bEojzatP/+NS1y8ojl2PQsc= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -149,8 +149,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/s3/go.mod b/s3/go.mod index 2d0addc9..1928ca53 100644 --- a/s3/go.mod +++ b/s3/go.mod @@ -11,7 +11,7 @@ require ( github.com/aws/smithy-go v1.22.3 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/minio v0.36.0 + github.com/testcontainers/testcontainers-go/modules/minio v0.37.0 ) require ( diff --git a/s3/go.sum b/s3/go.sum index a75fe1b1..37de2269 100644 --- a/s3/go.sum +++ b/s3/go.sum @@ -153,8 +153,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/minio v0.36.0 h1:NYOqshU552vjkpeNCDev7W3Jmuh2yVEvdko6Q9WX/GM= -github.com/testcontainers/testcontainers-go/modules/minio v0.36.0/go.mod h1:LAL+x/siLvLHVQ5G/r3X1bLlUhOj9xo8CUEySbNWUz4= +github.com/testcontainers/testcontainers-go/modules/minio v0.37.0 h1:p2LXViCDHBP0JfVfT9hDxkbTxv+BzAL5ZYOF8sj1q1I= +github.com/testcontainers/testcontainers-go/modules/minio v0.37.0/go.mod h1:OhJqQ9L2FOnb/otqLbjskhj7utl1Z5RFt2k6mhG9aeI= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -192,8 +192,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/scylladb/go.mod b/scylladb/go.mod index 3ae52745..2113964a 100644 --- a/scylladb/go.mod +++ b/scylladb/go.mod @@ -6,7 +6,7 @@ require ( github.com/gocql/gocql v1.7.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/scylladb v0.36.0 + github.com/testcontainers/testcontainers-go/modules/scylladb v0.37.0 ) require ( diff --git a/scylladb/go.sum b/scylladb/go.sum index 6a4d1a18..729feb8f 100644 --- a/scylladb/go.sum +++ b/scylladb/go.sum @@ -145,8 +145,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/scylladb v0.36.0 h1:BZuuIbd8wFW20jhMaA7kaiV/F+UkFo9plOZjkxZZfoA= -github.com/testcontainers/testcontainers-go/modules/scylladb v0.36.0/go.mod h1:ya6sJzRmXxqwe7I+WiCeHfAkEgMxLoYHnW566jD6hWQ= +github.com/testcontainers/testcontainers-go/modules/scylladb v0.37.0 h1:Q1y30voRpCivvaY2kZcUk6+E0l8cjD/IiOFEjWHPv9Y= +github.com/testcontainers/testcontainers-go/modules/scylladb v0.37.0/go.mod h1:A1aa/oyBX3AsDF/JAvvvOrOk81nERNs2ZoqjmDzD6R0= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -185,8 +185,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= From 9d7e8b7c01559e219f633b89936ff55d83466813 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 07:34:08 +0000 Subject: [PATCH 111/168] chore(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 in /s3 Bumps [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2) from 1.79.2 to 1.79.3. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.79.2...service/s3/v1.79.3) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-version: 1.79.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- s3/go.mod | 4 ++-- s3/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/s3/go.mod b/s3/go.mod index 2d0addc9..afc1641f 100644 --- a/s3/go.mod +++ b/s3/go.mod @@ -7,7 +7,7 @@ require ( github.com/aws/aws-sdk-go-v2/config v1.29.14 github.com/aws/aws-sdk-go-v2/credentials v1.17.67 github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.73 - github.com/aws/aws-sdk-go-v2/service/s3 v1.79.2 + github.com/aws/aws-sdk-go-v2/service/s3 v1.79.3 github.com/aws/smithy-go v1.22.3 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 @@ -25,7 +25,7 @@ require ( github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.1 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.25.3 // indirect diff --git a/s3/go.sum b/s3/go.sum index a75fe1b1..7fbf60dc 100644 --- a/s3/go.sum +++ b/s3/go.sum @@ -28,14 +28,14 @@ github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34 h1:ZNTqv4nIdE/DiBfUUfXcLZ/Spcu github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34/go.mod h1:zf7Vcd1ViW7cPqYWEHLHJkS50X0JS2IKz9Cgaj6ugrs= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b5IzM/lum78bZ590jy36+d/aFLgKF/4Vd1xPE= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3/go.mod h1:0yKJC/kb8sAnmlYa6Zs3QVYqaC8ug2AbnNChv5Ox3uA= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.0 h1:lguz0bmOoGzozP9XfRJR1QIayEYo+2vP/No3OfLF0pU= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.0/go.mod h1:iu6FSzgt+M2/x3Dk8zhycdIcHjEFb36IS8HVUVFoMg0= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.1 h1:4nm2G6A4pV9rdlWzGMPv4BNtQp22v1hg3yrtkYpeLl8= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.1/go.mod h1:iu6FSzgt+M2/x3Dk8zhycdIcHjEFb36IS8HVUVFoMg0= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 h1:dM9/92u2F1JbDaGooxTq18wmmFzbJRfXfVfy96/1CXM= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15/go.mod h1:SwFBy2vjtA0vZbjjaFtfN045boopadnoVPhu4Fv66vY= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15 h1:moLQUoVq91LiqT1nbvzDukyqAlCv89ZmwaHw/ZFlFZg= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15/go.mod h1:ZH34PJUc8ApjBIfgQCFvkWcUDBtl/WTD+uiYHjd8igA= -github.com/aws/aws-sdk-go-v2/service/s3 v1.79.2 h1:tWUG+4wZqdMl/znThEk9tcCy8tTMxq8dW0JTgamohrY= -github.com/aws/aws-sdk-go-v2/service/s3 v1.79.2/go.mod h1:U5SNqwhXB3Xe6F47kXvWihPl/ilGaEDe8HD/50Z9wxc= +github.com/aws/aws-sdk-go-v2/service/s3 v1.79.3 h1:BRXS0U76Z8wfF+bnkilA2QwpIch6URlm++yPUt9QPmQ= +github.com/aws/aws-sdk-go-v2/service/s3 v1.79.3/go.mod h1:bNXKFFyaiVvWuR6O16h/I1724+aXe/tAkA9/QS01t5k= github.com/aws/aws-sdk-go-v2/service/sso v1.25.3 h1:1Gw+9ajCV1jogloEv1RRnvfRFia2cL6c9cuKV2Ps+G8= github.com/aws/aws-sdk-go-v2/service/sso v1.25.3/go.mod h1:qs4a9T5EMLl/Cajiw2TcbNt2UNo/Hqlyp+GiuG4CFDI= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 h1:hXmVKytPfTy5axZ+fYbR5d0cFmC3JvwLm5kM83luako= From a80927f3715f87fc83ce0afff416bd36528e5cb1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 07:35:13 +0000 Subject: [PATCH 112/168] chore(deps): bump github.com/testcontainers/testcontainers-go/modules/minio Bumps [github.com/testcontainers/testcontainers-go/modules/minio](https://github.com/testcontainers/testcontainers-go) from 0.36.0 to 0.37.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go/modules/minio dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- s3/go.mod | 2 +- s3/go.sum | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/s3/go.mod b/s3/go.mod index 2d0addc9..1928ca53 100644 --- a/s3/go.mod +++ b/s3/go.mod @@ -11,7 +11,7 @@ require ( github.com/aws/smithy-go v1.22.3 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/minio v0.36.0 + github.com/testcontainers/testcontainers-go/modules/minio v0.37.0 ) require ( diff --git a/s3/go.sum b/s3/go.sum index a75fe1b1..37de2269 100644 --- a/s3/go.sum +++ b/s3/go.sum @@ -153,8 +153,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/minio v0.36.0 h1:NYOqshU552vjkpeNCDev7W3Jmuh2yVEvdko6Q9WX/GM= -github.com/testcontainers/testcontainers-go/modules/minio v0.36.0/go.mod h1:LAL+x/siLvLHVQ5G/r3X1bLlUhOj9xo8CUEySbNWUz4= +github.com/testcontainers/testcontainers-go/modules/minio v0.37.0 h1:p2LXViCDHBP0JfVfT9hDxkbTxv+BzAL5ZYOF8sj1q1I= +github.com/testcontainers/testcontainers-go/modules/minio v0.37.0/go.mod h1:OhJqQ9L2FOnb/otqLbjskhj7utl1Z5RFt2k6mhG9aeI= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -192,8 +192,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= From 1312a21486c6e4708d7aa2b293757bc1f25cde14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 07:38:28 +0000 Subject: [PATCH 113/168] chore(deps): bump github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue Bumps [github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue](https://github.com/aws/aws-sdk-go-v2) from 1.18.13 to 1.18.14. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/config/v1.18.14/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.13...config/v1.18.14) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue dependency-version: 1.18.14 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- dynamodb/go.mod | 2 +- dynamodb/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dynamodb/go.mod b/dynamodb/go.mod index d2af39be..bb586dc5 100644 --- a/dynamodb/go.mod +++ b/dynamodb/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.36.3 github.com/aws/aws-sdk-go-v2/config v1.29.14 github.com/aws/aws-sdk-go-v2/credentials v1.17.67 - github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.18.13 + github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.18.14 github.com/aws/aws-sdk-go-v2/service/dynamodb v1.43.1 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 diff --git a/dynamodb/go.sum b/dynamodb/go.sum index 68dfa33d..9ccdfadd 100644 --- a/dynamodb/go.sum +++ b/dynamodb/go.sum @@ -12,8 +12,8 @@ github.com/aws/aws-sdk-go-v2/config v1.29.14 h1:f+eEi/2cKCg9pqKBoAIwRGzVb70MRKqW github.com/aws/aws-sdk-go-v2/config v1.29.14/go.mod h1:wVPHWcIFv3WO89w0rE10gzf17ZYy+UVS1Geq8Iei34g= github.com/aws/aws-sdk-go-v2/credentials v1.17.67 h1:9KxtdcIA/5xPNQyZRgUSpYOE6j9Bc4+D7nZua0KGYOM= github.com/aws/aws-sdk-go-v2/credentials v1.17.67/go.mod h1:p3C44m+cfnbv763s52gCqrjaqyPikj9Sg47kUVaNZQQ= -github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.18.13 h1:i4Ynl6Y/HhNajB3E5UStwNpJjqopr+6TDU+YpZLJkuo= -github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.18.13/go.mod h1:VlHydRtvtdo0onShlKNZN23pzPUgYCc+hlzehmIy5To= +github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.18.14 h1:Qvnm8jtST/nidLDVHASEEVmB8neXuoA8O7u3if+nGYw= +github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.18.14/go.mod h1:xC/rXqmBJnY3SRUP+qAWg+ryTzDcpiUQiOJGN5in9Dg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mlnXuFrO4cOd3HLBroh1paFw= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 h1:ZK5jHhnrioRkUNOc+hOgQKlUL5JeC3S6JgLxtQ+Rm0Q= From 10d41e621c4f15fb63ed12ed6bfdeade4a391904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9?= Date: Tue, 29 Apr 2025 09:59:42 +0200 Subject: [PATCH 114/168] group testcontainers in dependabot.yml --- .github/dependabot.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index dc7a3070..51375667 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -18,3 +18,8 @@ updates: - "🤖 Dependencies" schedule: interval: "daily" + groups: + testcontainers-modules: + patterns: + - "github.com/testcontainers/testcontainers-go" + - "github.com/testcontainers/testcontainers-go/modules/**" From 2248ff4975b47ebc415c00d3015bfcbc59eaf01b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 08:01:17 +0000 Subject: [PATCH 115/168] chore(deps): bump the testcontainers-modules group across 3 directories with 3 updates Bumps the testcontainers-modules group with 1 update in the /neo4j directory: [github.com/testcontainers/testcontainers-go/modules/neo4j](https://github.com/testcontainers/testcontainers-go). Bumps the testcontainers-modules group with 1 update in the /postgres directory: [github.com/testcontainers/testcontainers-go/modules/postgres](https://github.com/testcontainers/testcontainers-go). Bumps the testcontainers-modules group with 1 update in the /scylladb directory: [github.com/testcontainers/testcontainers-go/modules/scylladb](https://github.com/testcontainers/testcontainers-go). Updates `github.com/testcontainers/testcontainers-go/modules/neo4j` from 0.36.0 to 0.37.0 - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) Updates `github.com/testcontainers/testcontainers-go/modules/postgres` from 0.36.0 to 0.37.0 - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) Updates `github.com/testcontainers/testcontainers-go/modules/scylladb` from 0.36.0 to 0.37.0 - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.36.0...v0.37.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go/modules/neo4j dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: testcontainers-modules - dependency-name: github.com/testcontainers/testcontainers-go/modules/postgres dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: testcontainers-modules - dependency-name: github.com/testcontainers/testcontainers-go/modules/scylladb dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: testcontainers-modules ... Signed-off-by: dependabot[bot] --- neo4j/go.mod | 2 +- neo4j/go.sum | 8 ++++---- postgres/go.mod | 2 +- postgres/go.sum | 12 ++++++------ scylladb/go.mod | 2 +- scylladb/go.sum | 8 ++++---- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/neo4j/go.mod b/neo4j/go.mod index 9e194109..9751acbd 100644 --- a/neo4j/go.mod +++ b/neo4j/go.mod @@ -6,7 +6,7 @@ require ( github.com/neo4j/neo4j-go-driver/v5 v5.28.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/neo4j v0.36.0 + github.com/testcontainers/testcontainers-go/modules/neo4j v0.37.0 ) require ( diff --git a/neo4j/go.sum b/neo4j/go.sum index 86e38f9e..2a1e5051 100644 --- a/neo4j/go.sum +++ b/neo4j/go.sum @@ -99,8 +99,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/neo4j v0.36.0 h1:iJG9GVzUeKOWsPKrqgaY3//VyhsRPyscYiIZUBDuV3s= -github.com/testcontainers/testcontainers-go/modules/neo4j v0.36.0/go.mod h1:sqTRVpKR0fycv9FwHm0U/KhlQCUd8qfwgllaMtfJqgo= +github.com/testcontainers/testcontainers-go/modules/neo4j v0.37.0 h1:DP5HdG+09hvtCMZmatCLiDWO7Kb9oiyvHkQSo4z8Y+0= +github.com/testcontainers/testcontainers-go/modules/neo4j v0.37.0/go.mod h1:tNi2wrLU67kn7y+bS6oHz3oetC1j/NaroGBE/Rg4JCA= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -138,8 +138,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/postgres/go.mod b/postgres/go.mod index 044bbfce..ed8ae681 100644 --- a/postgres/go.mod +++ b/postgres/go.mod @@ -6,7 +6,7 @@ require ( github.com/jackc/pgx/v5 v5.7.4 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/postgres v0.36.0 + github.com/testcontainers/testcontainers-go/modules/postgres v0.37.0 ) require ( diff --git a/postgres/go.sum b/postgres/go.sum index b8fbcafd..0631ecf3 100644 --- a/postgres/go.sum +++ b/postgres/go.sum @@ -69,8 +69,8 @@ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mdelapenya/tlscert v0.1.0 h1:YTpF579PYUX475eOL+6zyEO3ngLTOUWck78NBuJVXaM= -github.com/mdelapenya/tlscert v0.1.0/go.mod h1:wrbyM/DwbFCeCeqdPX/8c6hNOqQgbf0rUDErE1uD+64= +github.com/mdelapenya/tlscert v0.2.0 h1:7H81W6Z/4weDvZBNOfQte5GpIMo0lGYEeWbkGp5LJHI= +github.com/mdelapenya/tlscert v0.2.0/go.mod h1:O4njj3ELLnJjGdkN7M/vIVCpZ+Cf0L6muqOG4tLSl8o= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= @@ -110,8 +110,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/postgres v0.36.0 h1:xTGNNsOD9IIssH0dnAGNUH+SD9GYWyaP2t5xD2lg0as= -github.com/testcontainers/testcontainers-go/modules/postgres v0.36.0/go.mod h1:WKS3MGq1lzbVibIRnL08TOaf5bKWPxJe5frzyQfV4oY= +github.com/testcontainers/testcontainers-go/modules/postgres v0.37.0 h1:hsVwFkS6s+79MbKEO+W7A1wNIw1fmkMtF4fg83m6kbc= +github.com/testcontainers/testcontainers-go/modules/postgres v0.37.0/go.mod h1:Qj/eGbRbO/rEYdcRLmN+bEojzatP/+NS1y8ojl2PQsc= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -149,8 +149,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/scylladb/go.mod b/scylladb/go.mod index 3ae52745..2113964a 100644 --- a/scylladb/go.mod +++ b/scylladb/go.mod @@ -6,7 +6,7 @@ require ( github.com/gocql/gocql v1.7.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/scylladb v0.36.0 + github.com/testcontainers/testcontainers-go/modules/scylladb v0.37.0 ) require ( diff --git a/scylladb/go.sum b/scylladb/go.sum index 6a4d1a18..729feb8f 100644 --- a/scylladb/go.sum +++ b/scylladb/go.sum @@ -145,8 +145,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= -github.com/testcontainers/testcontainers-go/modules/scylladb v0.36.0 h1:BZuuIbd8wFW20jhMaA7kaiV/F+UkFo9plOZjkxZZfoA= -github.com/testcontainers/testcontainers-go/modules/scylladb v0.36.0/go.mod h1:ya6sJzRmXxqwe7I+WiCeHfAkEgMxLoYHnW566jD6hWQ= +github.com/testcontainers/testcontainers-go/modules/scylladb v0.37.0 h1:Q1y30voRpCivvaY2kZcUk6+E0l8cjD/IiOFEjWHPv9Y= +github.com/testcontainers/testcontainers-go/modules/scylladb v0.37.0/go.mod h1:A1aa/oyBX3AsDF/JAvvvOrOk81nERNs2ZoqjmDzD6R0= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -185,8 +185,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= From afaaf8a92e9f6f320b4cef1b78dfb14ddf93198f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 08:02:09 +0000 Subject: [PATCH 116/168] chore(deps): bump github.com/aws/aws-sdk-go-v2/feature/s3/manager in /s3 Bumps [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) from 1.17.73 to 1.17.74. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/feature/s3/manager/v1.17.73...feature/s3/manager/v1.17.74) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager dependency-version: 1.17.74 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- s3/go.mod | 2 +- s3/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/s3/go.mod b/s3/go.mod index 2cfc2a92..476f6423 100644 --- a/s3/go.mod +++ b/s3/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.36.3 github.com/aws/aws-sdk-go-v2/config v1.29.14 github.com/aws/aws-sdk-go-v2/credentials v1.17.67 - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.73 + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.74 github.com/aws/aws-sdk-go-v2/service/s3 v1.79.3 github.com/aws/smithy-go v1.22.3 github.com/stretchr/testify v1.10.0 diff --git a/s3/go.sum b/s3/go.sum index cb84b5e7..3a0dea28 100644 --- a/s3/go.sum +++ b/s3/go.sum @@ -16,8 +16,8 @@ github.com/aws/aws-sdk-go-v2/credentials v1.17.67 h1:9KxtdcIA/5xPNQyZRgUSpYOE6j9 github.com/aws/aws-sdk-go-v2/credentials v1.17.67/go.mod h1:p3C44m+cfnbv763s52gCqrjaqyPikj9Sg47kUVaNZQQ= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mlnXuFrO4cOd3HLBroh1paFw= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.73 h1:I91eIdOJMVK9oNiH2jvhp/AxMW+Gff8Rb5VjVHMhcJU= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.73/go.mod h1:vq7/m7dahFXcdzWVOvvjasDI9RcsD3RsTfHmDundJYg= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.74 h1:+1lc5oMFFHlVBclPXQf/POqlvdpBzjLaN2c3ujDCcZw= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.74/go.mod h1:EiskBoFr4SpYnFIbw8UM7DP7CacQXDHEmJqLI1xpRFI= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 h1:ZK5jHhnrioRkUNOc+hOgQKlUL5JeC3S6JgLxtQ+Rm0Q= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34/go.mod h1:p4VfIceZokChbA9FzMbRGz5OV+lekcVtHlPKEO0gSZY= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 h1:SZwFm17ZUNNg5Np0ioo/gq8Mn6u9w19Mri8DnJ15Jf0= From 4785855bc6bc4a90ef23cba5bc4b97f1b42d9c6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 08:02:13 +0000 Subject: [PATCH 117/168] chore(deps): bump github.com/valkey-io/valkey-go in /valkey Bumps [github.com/valkey-io/valkey-go](https://github.com/valkey-io/valkey-go) from 1.0.57 to 1.0.59. - [Release notes](https://github.com/valkey-io/valkey-go/releases) - [Commits](https://github.com/valkey-io/valkey-go/compare/v1.0.57...v1.0.59) --- updated-dependencies: - dependency-name: github.com/valkey-io/valkey-go dependency-version: 1.0.59 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- valkey/go.mod | 2 +- valkey/go.sum | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/valkey/go.mod b/valkey/go.mod index b36977f3..c30c95d8 100644 --- a/valkey/go.mod +++ b/valkey/go.mod @@ -4,7 +4,7 @@ go 1.23.0 require ( github.com/stretchr/testify v1.10.0 - github.com/valkey-io/valkey-go v1.0.57 + github.com/valkey-io/valkey-go v1.0.59 ) require ( diff --git a/valkey/go.sum b/valkey/go.sum index 087a2549..6ee70fdf 100644 --- a/valkey/go.sum +++ b/valkey/go.sum @@ -12,10 +12,10 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/valkey-io/valkey-go v1.0.57 h1:rMpREZ7kvWwv9vHkB1WTpI9rX4dQHsvPHimSWenScvI= -github.com/valkey-io/valkey-go v1.0.57/go.mod h1:sxpCChk8i3oTG+A/lUi9Lj8C/7WI+yhnQCvDJlPVKNM= -golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c= -golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +github.com/valkey-io/valkey-go v1.0.59 h1:W67Z0UY+Qqk3k8NKkFCFlM3X4yQUniixl7dSJAch2Qo= +github.com/valkey-io/valkey-go v1.0.59/go.mod h1:bHmwjIEOrGq/ubOJfh5uMRs7Xj6mV3mQ/ZXUbmqpjqY= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= From 7006c9efc53a44593352ebe32e52250ecf917107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Tue, 29 Apr 2025 11:57:03 +0200 Subject: [PATCH 118/168] feat: use testcontainers-go for arangodb tests --- .github/workflows/benchmark.yml | 6 +- .github/workflows/test-arangodb.yml | 14 +-- arangodb/arangodb_test.go | 88 ++++++++++++- arangodb/go.mod | 50 +++++++- arangodb/go.sum | 184 +++++++++++++++++++++++++++- 5 files changed, 322 insertions(+), 20 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 15a6cd2d..50928eaa 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -66,11 +66,6 @@ jobs: with: node-version: '18' - - name: Install ArangoDB - if: ${{ matrix.package == 'arangodb' }} - run: | - docker run -d -p 8529:8529 -e "ARANGO_NO_AUTH=1" arangodb:latest - - name: Install Memcached if: ${{ matrix.package == 'memcache' }} run: | @@ -123,6 +118,7 @@ jobs: MSSQL_DATABASE: master MSSQL_USERNAME: sa MSSQL_PASSWORD: MsSql!1234 + TEST_ARANGODB_IMAGE: arangodb:latest TEST_AZURITE_IMAGE: mcr.microsoft.com/azure-storage/azurite:latest TEST_AEROSPIKE_IMAGE: aerospike/aerospike-server:latest TEST_CLICKHOUSE_IMAGE: "clickhouse/clickhouse-server:23-alpine" diff --git a/.github/workflows/test-arangodb.yml b/.github/workflows/test-arangodb.yml index 52205dbf..dca5266f 100644 --- a/.github/workflows/test-arangodb.yml +++ b/.github/workflows/test-arangodb.yml @@ -12,19 +12,11 @@ name: "Tests ArangoDB" jobs: Tests: runs-on: ubuntu-latest - services: - arangodb: - image: 'arangodb:latest' - env: - ARANGO_NO_AUTH: 1 - ports: - - '8529:8529' strategy: matrix: go-version: - - 1.19.x - - 1.20.x - - 1.21.x + - 1.23.x + - 1.24.x steps: - name: Fetch Repository uses: actions/checkout@v4 @@ -33,4 +25,6 @@ jobs: with: go-version: '${{ matrix.go-version }}' - name: Run Test + env: + TEST_ARANGODB_IMAGE: arangodb:latest run: cd ./arangodb && go test ./... -v -race diff --git a/arangodb/arangodb_test.go b/arangodb/arangodb_test.go index ef0ef4f1..439b5717 100644 --- a/arangodb/arangodb_test.go +++ b/arangodb/arangodb_test.go @@ -1,15 +1,57 @@ package arangodb import ( + "context" + "os" + "strconv" + "strings" "testing" "time" "github.com/stretchr/testify/require" + + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/modules/arangodb" ) -var testStore = New(Config{ - Reset: true, -}) +const ( + // arangoDB is the default image used for running arangoDB in tests. + arangoDBImage = "arangodb:latest" + arangoDBImageEnvVar = "TEST_ARANGODB_IMAGE" + arangoDBPassword = "test" +) + +func newTestStore(t testing.TB) *Storage { + t.Helper() + + img := arangoDBImage + if imgFromEnv := os.Getenv(arangoDBImageEnvVar); imgFromEnv != "" { + img = imgFromEnv + } + + ctx := context.Background() + + arangodbContainer, err := arangodb.Run(ctx, img, arangodb.WithRootPassword(arangoDBPassword)) + testcontainers.CleanupContainer(t, arangodbContainer) + require.NoError(t, err) + + endpoint, err := arangodbContainer.HTTPEndpoint(ctx) + require.NoError(t, err) + + lastColonIndex := strings.LastIndex(endpoint, ":") + host := endpoint[:lastColonIndex] + port := endpoint[lastColonIndex+1:] + + iPort, err := strconv.Atoi(port) + require.NoError(t, err) + + return New(Config{ + Host: host, + Port: iPort, + Username: "root", + Password: arangoDBPassword, + }) +} func Test_ArangoDB_Set(t *testing.T) { var ( @@ -17,6 +59,9 @@ func Test_ArangoDB_Set(t *testing.T) { val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) } @@ -27,6 +72,9 @@ func Test_ArangoDB_Upsert(t *testing.T) { val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) @@ -40,6 +88,9 @@ func Test_ArangoDB_Get(t *testing.T) { val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) @@ -55,6 +106,9 @@ func Test_ArangoDB_Set_Expiration(t *testing.T) { exp = 1 * time.Second ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, exp) require.NoError(t, err) @@ -64,12 +118,18 @@ func Test_ArangoDB_Set_Expiration(t *testing.T) { func Test_ArangoDB_Get_Expired(t *testing.T) { key := "john" + testStore := newTestStore(t) + defer testStore.Close() + result, err := testStore.Get(key) require.NoError(t, err) require.Zero(t, len(result)) } func Test_ArangoDB_Get_NotExist(t *testing.T) { + testStore := newTestStore(t) + defer testStore.Close() + result, err := testStore.Get("notexist") require.NoError(t, err) require.Zero(t, len(result)) @@ -81,6 +141,9 @@ func Test_ArangoDB_Delete(t *testing.T) { val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) @@ -95,6 +158,9 @@ func Test_ArangoDB_Delete(t *testing.T) { func Test_ArangoDB_Reset(t *testing.T) { val := []byte("doe") + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set("john1", val, 0) require.NoError(t, err) @@ -116,6 +182,9 @@ func Test_ArangoDB_Reset(t *testing.T) { func Test_ArangoDB_Non_UTF8(t *testing.T) { val := []byte("0xF5") + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set("0xF6", val, 0) require.NoError(t, err) @@ -125,14 +194,21 @@ func Test_ArangoDB_Non_UTF8(t *testing.T) { } func Test_ArangoDB_Close(t *testing.T) { + testStore := newTestStore(t) require.Nil(t, testStore.Close()) } func Test_ArangoDB_Conn(t *testing.T) { + testStore := newTestStore(t) + defer testStore.Close() + require.True(t, testStore.Conn() != nil) } func Benchmark_ArangoDB_Set(b *testing.B) { + testStore := newTestStore(b) + defer testStore.Close() + b.ReportAllocs() b.ResetTimer() @@ -145,6 +221,9 @@ func Benchmark_ArangoDB_Set(b *testing.B) { } func Benchmark_ArangoDB_Get(b *testing.B) { + testStore := newTestStore(b) + defer testStore.Close() + err := testStore.Set("john", []byte("doe"), 0) require.NoError(b, err) @@ -159,6 +238,9 @@ func Benchmark_ArangoDB_Get(b *testing.B) { } func Benchmark_ArangoDB_SetAndDelete(b *testing.B) { + testStore := newTestStore(b) + defer testStore.Close() + b.ReportAllocs() b.ResetTimer() diff --git a/arangodb/go.mod b/arangodb/go.mod index fde1e227..49e8a979 100644 --- a/arangodb/go.mod +++ b/arangodb/go.mod @@ -1,18 +1,66 @@ module github.com/gofiber/storage/arangodb/v2 -go 1.19 +go 1.23.0 + +toolchain go1.23.6 require ( github.com/arangodb/go-driver v1.6.6 github.com/gofiber/utils/v2 v2.0.0-beta.3 github.com/stretchr/testify v1.10.0 + github.com/testcontainers/testcontainers-go v0.37.0 + github.com/testcontainers/testcontainers-go/modules/arangodb v0.37.0 ) require ( + dario.cat/mergo v1.0.1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/containerd/platforms v0.2.1 // indirect + github.com/cpuguy83/dockercfg v0.3.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/distribution/reference v0.6.0 // indirect + github.com/docker/docker v28.0.1+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/ebitengine/purego v0.8.2 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/gogo/protobuf v1.3.2 // indirect github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect + github.com/klauspost/compress v1.17.4 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/magiconair/properties v1.8.10 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/patternmatcher v0.6.0 // indirect + github.com/moby/sys/sequential v0.5.0 // indirect + github.com/moby/sys/user v0.1.0 // indirect + github.com/moby/sys/userns v0.1.0 // indirect + github.com/moby/term v0.5.0 // indirect + github.com/morikuni/aec v1.0.0 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.1 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/shirou/gopsutil/v4 v4.25.1 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect + golang.org/x/crypto v0.37.0 // indirect + golang.org/x/sys v0.32.0 // indirect + google.golang.org/grpc v1.70.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/arangodb/go.sum b/arangodb/go.sum index ad4b06e8..ae36c1c7 100644 --- a/arangodb/go.sum +++ b/arangodb/go.sum @@ -1,24 +1,206 @@ +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/arangodb/go-driver v1.6.6 h1:yL1ybRCKqY+eREnVuJ/GYNYowoyy/g0fiUvL3fKNtJM= github.com/arangodb/go-driver v1.6.6/go.mod h1:ZWyW3T8YPA1weGxohGtW4lFjJmpr9aHNTTbaiD5bBhI= +github.com/arangodb/go-driver/v2 v2.1.3 h1:PpLSe8E2RalFuqTGi2yfHDe3ltOomfFCIToB66p1lr8= +github.com/arangodb/go-driver/v2 v2.1.3/go.mod h1:aoDzrsO7PQEFat3Q9pp4zfv6W+WotA7GcCeJQJfX+tc= github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e h1:Xg+hGrY2LcQBbxd0ZFdbGSyRKTYMZCfBbw/pMJFOk1g= github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e/go.mod h1:mq7Shfa/CaixoDxiyAAc5jZ6CVBAyPaNQCGS7mkj4Ho= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= +github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= +github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dchest/siphash v1.2.3 h1:QXwFc8cFOR2dSa/gE6o/HokBMWtLUaNDVd+22aKHeEA= +github.com/dchest/siphash v1.2.3/go.mod h1:0NvQU092bT0ipiFN++/rXm69QG9tVxLAlQHIXMPAkHc= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v28.0.1+incompatible h1:FCHjSRdXhNRFjlHMTv4jUNlIBbTeRjrWfeFuJp7jpo0= +github.com/docker/docker v28.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I= +github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/gofiber/utils/v2 v2.0.0-beta.3 h1:pfOhUDDVjBJpkWv6C5jaDyYLvpui7zQ97zpyFFsUOKw= github.com/gofiber/utils/v2 v2.0.0-beta.3/go.mod h1:jsl17+MsKfwJjM3ONCE9Rzji/j8XNbwjhUVTjzgfDCo= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkdai/maglev v0.2.0 h1:w6DCW0kAA6fstZqXkrBrlgIC3jeIRXkjOYea/m6EK/Y= +github.com/kkdai/maglev v0.2.0/go.mod h1:d+mt8Lmt3uqi9aRb/BnPjzD0fy+ETs1vVXiGRnqHVZ4= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= +github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= +github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= +github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= +github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= +github.com/testcontainers/testcontainers-go/modules/arangodb v0.37.0 h1:E9Q2wOfGgNmKtVy4TDAL0SOy0aN/1Z4eAlzVy0TD6as= +github.com/testcontainers/testcontainers-go/modules/arangodb v0.37.0/go.mod h1:odwRJL0mTTB8SJGm+d0cbbXZBdThQSacksU15eEUWjw= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 h1:1fTNlAIJZGWLP5FVu0fikVry1IsiUnXjf7QFvoNN3Xw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0/go.mod h1:zjPK58DtkqQFn+YUMbx0M2XV3QgKU0gS9LeGohREyK4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= +go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= +go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 h1:e0AIkUUhxyBKh6ssZNrAMeqhA7RKUj42346d1y02i2g= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= +google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= From 5d0188976bf5e08180553aa7becb738321917c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Tue, 29 Apr 2025 12:01:11 +0200 Subject: [PATCH 119/168] chore: use aerospike module --- aerospike/aerospike_test.go | 23 ++--------------------- aerospike/go.mod | 7 ++++--- aerospike/go.sum | 10 ++++++---- 3 files changed, 12 insertions(+), 28 deletions(-) diff --git a/aerospike/aerospike_test.go b/aerospike/aerospike_test.go index a50a840b..7d906f56 100644 --- a/aerospike/aerospike_test.go +++ b/aerospike/aerospike_test.go @@ -9,7 +9,7 @@ import ( "github.com/aerospike/aerospike-client-go/v8" "github.com/stretchr/testify/require" "github.com/testcontainers/testcontainers-go" - "github.com/testcontainers/testcontainers-go/wait" + tcaerospike "github.com/testcontainers/testcontainers-go/modules/aerospike" ) const ( @@ -34,27 +34,8 @@ func startAerospikeContainer(t testing.TB, ctx context.Context) testcontainers.C image = envImage } - // Container config - req := testcontainers.ContainerRequest{ - Image: image, - ExposedPorts: []string{aerospikePort, fabricPort, heartbeatPort, infoPort}, - WaitingFor: wait.ForAll( - wait.ForLog(aerospikeReadyLog), - wait.ForListeningPort(aerospikePort).WithStartupTimeout(5*time.Second), - wait.ForListeningPort(fabricPort).WithStartupTimeout(5*time.Second), - wait.ForListeningPort(heartbeatPort).WithStartupTimeout(5*time.Second), - ), - Cmd: []string{ - "--config-file", - "/etc/aerospike/aerospike.conf", - }, - } - // Start container - ctr, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{ - ContainerRequest: req, - Started: true, - }) + ctr, err := tcaerospike.Run(ctx, image) testcontainers.CleanupContainer(t, ctr) require.NoError(t, err) diff --git a/aerospike/go.mod b/aerospike/go.mod index dac44913..947f33e4 100644 --- a/aerospike/go.mod +++ b/aerospike/go.mod @@ -6,6 +6,7 @@ require ( github.com/aerospike/aerospike-client-go/v8 v8.2.1 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 + github.com/testcontainers/testcontainers-go/modules/aerospike v0.37.0 ) require ( @@ -28,6 +29,7 @@ require ( github.com/go-ole/go-ole v1.3.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 // indirect github.com/klauspost/compress v1.18.0 // indirect github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 // indirect github.com/magiconair/properties v1.8.10 // indirect @@ -54,14 +56,13 @@ require ( go.opentelemetry.io/auto/sdk v1.1.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect go.opentelemetry.io/otel v1.35.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 // indirect go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect - go.opentelemetry.io/proto/otlp v1.5.0 // indirect golang.org/x/crypto v0.37.0 // indirect golang.org/x/sync v0.13.0 // indirect golang.org/x/sys v0.32.0 // indirect golang.org/x/tools v0.32.0 // indirect - google.golang.org/protobuf v1.36.5 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250102185135-69823020774d // indirect + google.golang.org/grpc v1.69.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/aerospike/go.sum b/aerospike/go.sum index b3104654..3a796d22 100644 --- a/aerospike/go.sum +++ b/aerospike/go.sum @@ -107,6 +107,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= +github.com/testcontainers/testcontainers-go/modules/aerospike v0.37.0 h1:Hf+CIs1aOk+7LTgx8AeQWm43PN5ONnpSH1Xd3Dnp5fg= +github.com/testcontainers/testcontainers-go/modules/aerospike v0.37.0/go.mod h1:0sLjd5o8GsywSX6Jl+b5OiDk2bBm72yHYIUaGFB2+DE= github.com/tklauser/go-sysconf v0.3.15 h1:VE89k0criAymJ/Os65CSn1IXaol+1wrsFHEB8Ol49K4= github.com/tklauser/go-sysconf v0.3.15/go.mod h1:Dmjwr6tYFIseJw7a3dRLJfsHAMXZ3nEnL/aZY+0IuI4= github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfjso= @@ -187,12 +189,12 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/api v0.0.0-20250102185135-69823020774d h1:H8tOf8XM88HvKqLTxe755haY6r1fqqzLbEnfrmLXlSA= google.golang.org/genproto/googleapis/api v0.0.0-20250102185135-69823020774d/go.mod h1:2v7Z7gP2ZUOGsaFyxATQSRoBnKygqVq2Cwnvom7QiqY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250102185135-69823020774d h1:xJJRGY7TJcvIlpSrN3K6LAWgNFUILlO+OMAqtg9aqnw= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250102185135-69823020774d/go.mod h1:3ENsm/5D1mzDyhpzeRi1NR784I0BcofWBoSc5QqqMK4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250409194420-de1ac958c67a h1:GIqLhp/cYUkuGuiT+vJk8vhOP86L4+SP5j8yXgeVpvI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250409194420-de1ac958c67a/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= From 5de2251e886bb9ac0612c517e9d86088e9007563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Tue, 29 Apr 2025 12:12:02 +0200 Subject: [PATCH 120/168] chore: simplify --- arangodb/arangodb_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arangodb/arangodb_test.go b/arangodb/arangodb_test.go index 439b5717..3b4010b3 100644 --- a/arangodb/arangodb_test.go +++ b/arangodb/arangodb_test.go @@ -2,9 +2,9 @@ package arangodb import ( "context" + "net/url" "os" "strconv" - "strings" "testing" "time" @@ -38,9 +38,10 @@ func newTestStore(t testing.TB) *Storage { endpoint, err := arangodbContainer.HTTPEndpoint(ctx) require.NoError(t, err) - lastColonIndex := strings.LastIndex(endpoint, ":") - host := endpoint[:lastColonIndex] - port := endpoint[lastColonIndex+1:] + parsedURL, err := url.Parse(endpoint) + require.NoError(t, err) + host := parsedURL.Scheme + "://" + parsedURL.Hostname() + port := parsedURL.Port() iPort, err := strconv.Atoi(port) require.NoError(t, err) From 69b50a5f23214bb5648d247ac49715e7beed981d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Tue, 29 Apr 2025 12:12:52 +0200 Subject: [PATCH 121/168] chore: order alphabetically --- .github/workflows/benchmark.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 50928eaa..633e857a 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -118,11 +118,11 @@ jobs: MSSQL_DATABASE: master MSSQL_USERNAME: sa MSSQL_PASSWORD: MsSql!1234 + TEST_AEROSPIKE_IMAGE: aerospike/aerospike-server:latest TEST_ARANGODB_IMAGE: arangodb:latest TEST_AZURITE_IMAGE: mcr.microsoft.com/azure-storage/azurite:latest - TEST_AEROSPIKE_IMAGE: aerospike/aerospike-server:latest - TEST_CLICKHOUSE_IMAGE: "clickhouse/clickhouse-server:23-alpine" TEST_CASSANDRA_IMAGE: "cassandra:latest" + TEST_CLICKHOUSE_IMAGE: "clickhouse/clickhouse-server:23-alpine" TEST_COUCHBASE_IMAGE: "couchbase:enterprise-7.6.5" TEST_DYNAMODB_IMAGE: amazon/dynamodb-local:latest TEST_MINIO_IMAGE: "docker.io/minio/minio:latest" From e73dbf045cf58ec17502f64b84a5727a34ff7920 Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez <835733+gaby@users.noreply.github.com> Date: Tue, 29 Apr 2025 07:37:31 -0400 Subject: [PATCH 122/168] Update go.mod --- arangodb/go.mod | 1 - 1 file changed, 1 deletion(-) diff --git a/arangodb/go.mod b/arangodb/go.mod index 49e8a979..785719c6 100644 --- a/arangodb/go.mod +++ b/arangodb/go.mod @@ -2,7 +2,6 @@ module github.com/gofiber/storage/arangodb/v2 go 1.23.0 -toolchain go1.23.6 require ( github.com/arangodb/go-driver v1.6.6 From 1f42b00573a40989f03025e46c624054c7a140c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 30 Apr 2025 10:49:35 +0200 Subject: [PATCH 123/168] fix(benchmarks): re-add redis install for ruedis and valkey --- .github/workflows/benchmark.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index eb467c2d..eea33cc6 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -84,6 +84,19 @@ jobs: docker run -d -p 1408:1408 -p 30000:30000 ghcr.io/oracle/coherence-ce:22.06.5 sleep 30 + - name: Setup Redis + if: ${{ matrix.package == 'rueidis' || matrix.package == 'valkey' }} + uses: shogo82148/actions-setup-redis@v1 + with: + redis-version: '7.x' + auto-start: 'false' + + - name: Run Redis + if: ${{ matrix.package == 'rueidis' || matrix.package == 'valkey' }} + run: | + redis-server --port 6379 & + sleep 15 + - name: Install etcd if: ${{ matrix.package == 'etcd' }} run: | From b90664baad67503a39ecc607e9cdf142cdf3d949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 30 Apr 2025 12:37:39 +0200 Subject: [PATCH 124/168] feat: add a test module for testing redis and friends --- testhelpers/redis/go.mod | 65 +++++++++++++ testhelpers/redis/go.sum | 194 +++++++++++++++++++++++++++++++++++++ testhelpers/redis/redis.go | 153 +++++++++++++++++++++++++++++ 3 files changed, 412 insertions(+) create mode 100644 testhelpers/redis/go.mod create mode 100644 testhelpers/redis/go.sum create mode 100644 testhelpers/redis/redis.go diff --git a/testhelpers/redis/go.mod b/testhelpers/redis/go.mod new file mode 100644 index 00000000..94a7df5c --- /dev/null +++ b/testhelpers/redis/go.mod @@ -0,0 +1,65 @@ +module github.com/gofiber/storage/testhelpers/redis + +go 1.23.0 + +require ( + github.com/stretchr/testify v1.10.0 + github.com/testcontainers/testcontainers-go v0.37.0 + github.com/testcontainers/testcontainers-go/modules/redis v0.37.0 +) + +require ( + dario.cat/mergo v1.0.1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/containerd/platforms v0.2.1 // indirect + github.com/cpuguy83/dockercfg v0.3.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/distribution/reference v0.6.0 // indirect + github.com/docker/docker v28.0.1+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/ebitengine/purego v0.8.2 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect + github.com/klauspost/compress v1.17.4 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/magiconair/properties v1.8.10 // indirect + github.com/mdelapenya/tlscert v0.2.0 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/patternmatcher v0.6.0 // indirect + github.com/moby/sys/sequential v0.5.0 // indirect + github.com/moby/sys/user v0.1.0 // indirect + github.com/moby/sys/userns v0.1.0 // indirect + github.com/moby/term v0.5.0 // indirect + github.com/morikuni/aec v1.0.0 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.1 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/shirou/gopsutil/v4 v4.25.1 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/sdk v1.32.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect + golang.org/x/crypto v0.37.0 // indirect + golang.org/x/sys v0.32.0 // indirect + google.golang.org/grpc v1.70.0 // indirect + google.golang.org/protobuf v1.36.5 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/testhelpers/redis/go.sum b/testhelpers/redis/go.sum new file mode 100644 index 00000000..b7f31c70 --- /dev/null +++ b/testhelpers/redis/go.sum @@ -0,0 +1,194 @@ +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= +github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= +github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v28.0.1+incompatible h1:FCHjSRdXhNRFjlHMTv4jUNlIBbTeRjrWfeFuJp7jpo0= +github.com/docker/docker v28.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I= +github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mdelapenya/tlscert v0.2.0 h1:7H81W6Z/4weDvZBNOfQte5GpIMo0lGYEeWbkGp5LJHI= +github.com/mdelapenya/tlscert v0.2.0/go.mod h1:O4njj3ELLnJjGdkN7M/vIVCpZ+Cf0L6muqOG4tLSl8o= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= +github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= +github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= +github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/redis/go-redis/v9 v9.7.3 h1:YpPyAayJV+XErNsatSElgRZZVCwXX9QzkKYNvO7x0wM= +github.com/redis/go-redis/v9 v9.7.3/go.mod h1:bGUrSggJ9X9GUmZpZNEOQKaANxSGgOEBRltRTZHSvrA= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= +github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= +github.com/testcontainers/testcontainers-go/modules/redis v0.37.0 h1:9HIY28I9ME/Zmb+zey1p/I1mto5+5ch0wLX+nJdOsQ4= +github.com/testcontainers/testcontainers-go/modules/redis v0.37.0/go.mod h1:Abu9g/25Qv+FkYVx3U4Voaynou1c+7D0HIhaQJXvk6E= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= +go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= +google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= +google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= +google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= +google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= diff --git a/testhelpers/redis/redis.go b/testhelpers/redis/redis.go new file mode 100644 index 00000000..2c6dd04f --- /dev/null +++ b/testhelpers/redis/redis.go @@ -0,0 +1,153 @@ +package testredis + +import ( + "context" + "crypto/tls" + "os" + "strings" + "testing" + + "github.com/stretchr/testify/require" + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/modules/redis" +) + +const ( + // Image is the default image used for running Redis in tests. + Image = "docker.io/redis:7" + ImageEnvVar = "TEST_REDIS_IMAGE" + Port = "6379/tcp" +) + +// Config represents the configuration for a Redis container +type Config struct { + // TLS settings + UseTLS bool + SecureURL bool + MTLSDisabled bool + UseAddress bool + UseHostPort bool + UseURL bool +} + +// Option is a function that configures a Config +type Option func(*Config) + +// WithTLS configures the container to use TLS +func WithTLS(secureURL bool, mtlsDisabled bool) Option { + return func(c *Config) { + c.UseTLS = true + c.SecureURL = secureURL + c.MTLSDisabled = mtlsDisabled + } +} + +// WithAddress sets the container to use address-based connection +func WithAddress() Option { + return func(c *Config) { + c.UseAddress = true + } +} + +// WithHostPort sets the container to use host and port based connection +func WithHostPort() Option { + return func(c *Config) { + c.UseHostPort = true + } +} + +// WithURL sets the container to use a URL +func WithURL(useContainerURI bool) Option { + return func(c *Config) { + c.UseURL = useContainerURI + } +} + +// Container represents a running Redis container +type Container struct { + URL string + Addrs []string + Host string + Port int + TLSConfig *tls.Config +} + +// Start starts a Redis container for testing and returns its configuration +func Start(t testing.TB, opts ...Option) *Container { + t.Helper() + + config := &Config{ + UseURL: true, // by default, use the URL provided by the testcontainer + } + for _, o := range opts { + o(config) + } + + img := Image + if imgFromEnv := os.Getenv(ImageEnvVar); imgFromEnv != "" { + img = imgFromEnv + } + + ctx := context.Background() + tcOpts := []testcontainers.ContainerCustomizer{} + + if config.UseTLS { + tcOpts = append(tcOpts, redis.WithTLS()) + + cmds := []string{ + "--port", "0", + "--tls-port", "6379", + "--tls-cert-file", "/tls/server.crt", + "--tls-key-file", "/tls/server.key", + "--tls-ca-cert-file", "/tls/ca.crt", + } + + cmds = append(cmds, "--tls-auth-clients", func() string { + if config.MTLSDisabled { + return "no" + } + return "yes" + }()) + + tcOpts = append(tcOpts, testcontainers.WithCmd(cmds...)) + } + + c, err := redis.Run(ctx, img, tcOpts...) + testcontainers.CleanupContainer(t, c) + require.NoError(t, err) + + ctr := &Container{ + TLSConfig: c.TLSConfig(), + } + + uri, err := c.ConnectionString(ctx) + require.NoError(t, err) + + if config.UseHostPort { + host, err := c.Host(ctx) + require.NoError(t, err) + + port, err := c.MappedPort(ctx, Port) + require.NoError(t, err) + + ctr.Host = host + ctr.Port = port.Int() + } + + if config.UseAddress { + // trim the schemes from the URI + addr := strings.TrimPrefix(uri, "redis://") + addr = strings.TrimPrefix(addr, "rediss://") + ctr.Addrs = []string{addr} + } + + if config.UseURL { + ctr.URL = uri + if !config.SecureURL { + // Replace the scheme with the insecure one + ctr.URL = strings.Replace(ctr.URL, "rediss://", "redis://", 1) + } + } + + return ctr +} From 76a7b0a65770d31c9e4e5709af94903238f6d481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 30 Apr 2025 13:18:19 +0200 Subject: [PATCH 125/168] chore: support for overriding the redis image --- testhelpers/redis/redis.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/testhelpers/redis/redis.go b/testhelpers/redis/redis.go index 2c6dd04f..d12fbc06 100644 --- a/testhelpers/redis/redis.go +++ b/testhelpers/redis/redis.go @@ -28,6 +28,10 @@ type Config struct { UseAddress bool UseHostPort bool UseURL bool + // Image is the image to use for the Redis container + // + // Optional. Default is "docker.io/redis:7", but could be set to Valkey. + Image string } // Option is a function that configures a Config @@ -63,6 +67,13 @@ func WithURL(useContainerURI bool) Option { } } +// WithImage sets the image to use for the Redis container +func WithImage(image string) Option { + return func(c *Config) { + c.Image = image + } +} + // Container represents a running Redis container type Container struct { URL string @@ -88,6 +99,10 @@ func Start(t testing.TB, opts ...Option) *Container { img = imgFromEnv } + if config.Image != "" { + img = config.Image + } + ctx := context.Background() tcOpts := []testcontainers.ContainerCustomizer{} From 05b5be3f18a68ca4227054db3b9ae1186c9e10df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 30 Apr 2025 12:37:58 +0200 Subject: [PATCH 126/168] chore: consume the testredis module in redis --- redis/go.mod | 10 ++- redis/go.sum | 16 ++--- redis/redis_test.go | 167 +++++--------------------------------------- 3 files changed, 33 insertions(+), 160 deletions(-) diff --git a/redis/go.mod b/redis/go.mod index 0ab3209e..d169b1d5 100644 --- a/redis/go.mod +++ b/redis/go.mod @@ -3,18 +3,19 @@ module github.com/gofiber/storage/redis/v3 go 1.23.0 require ( + github.com/gofiber/storage/testhelpers/redis v0.0.0-00010101000000-000000000000 github.com/redis/go-redis/v9 v9.7.3 github.com/stretchr/testify v1.10.0 - github.com/testcontainers/testcontainers-go v0.37.0 - github.com/testcontainers/testcontainers-go/modules/redis v0.37.0 ) +replace github.com/gofiber/storage/testhelpers/redis => ../testhelpers/redis + require ( dario.cat/mergo v1.0.1 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect @@ -49,6 +50,8 @@ require ( github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/shirou/gopsutil/v4 v4.25.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect + github.com/testcontainers/testcontainers-go v0.37.0 // indirect + github.com/testcontainers/testcontainers-go/modules/redis v0.37.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect @@ -62,6 +65,7 @@ require ( go.opentelemetry.io/proto/otlp v1.5.0 // indirect golang.org/x/crypto v0.37.0 // indirect golang.org/x/sys v0.32.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e // indirect google.golang.org/protobuf v1.36.6 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/redis/go.sum b/redis/go.sum index e870d7b3..7acf264a 100644 --- a/redis/go.sum +++ b/redis/go.sum @@ -12,8 +12,8 @@ github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= @@ -53,8 +53,8 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 h1:VNqngBF40hVlDloBruUehVYC3ArSgIyScOAyMRqBxRg= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1/go.mod h1:RBRO7fro65R6tjKzYgLAFo0t1QEXY1Dp+i/bvpRiqiQ= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= @@ -180,12 +180,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20250102185135-69823020774d h1:H8tOf8XM88HvKqLTxe755haY6r1fqqzLbEnfrmLXlSA= -google.golang.org/genproto/googleapis/api v0.0.0-20250102185135-69823020774d/go.mod h1:2v7Z7gP2ZUOGsaFyxATQSRoBnKygqVq2Cwnvom7QiqY= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg= google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e h1:ztQaXfzEXTmCBvbtWYRhJxW+0iJcz2qXfd38/e9l7bA= google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= +google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/redis/redis_test.go b/redis/redis_test.go index 36e9f204..f32adde2 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -1,161 +1,30 @@ package redis import ( - "context" - "os" - "strings" "testing" "time" "github.com/stretchr/testify/require" - "github.com/testcontainers/testcontainers-go" - "github.com/testcontainers/testcontainers-go/modules/redis" + testredis "github.com/gofiber/storage/testhelpers/redis" ) -const ( - // redisImage is the default image used for running Redis in tests. - redisImage = "docker.io/redis:7" - redisImageEnvVar = "TEST_REDIS_IMAGE" - redisPort = "6379/tcp" -) - -type testStoreSettings struct { - address bool - hostPort bool - url bool - - // TLS settings - secureURL bool - mtlsDisabled bool - tls bool -} - -type testStoreOption func(*testStoreSettings) - -// withAddress sets the test store to use address-based connection. -func withAddress() testStoreOption { - return func(o *testStoreSettings) { - o.address = true - } -} - -// withHostPort sets the test store to use host and port based connection. -func withHostPort() testStoreOption { - return func(o *testStoreSettings) { - o.hostPort = true - } -} - -// withTLS configures the test store to use TLS. -// Parameters: -// - secureURL: when true, uses "rediss://" scheme, otherwise uses "redis://" -// - mtlsDisabled: when true, disables mutual TLS authentication (--tls-auth-clients no) -func withTLS(secureURL bool, mtlsDisabled bool) testStoreOption { - return func(o *testStoreSettings) { - o.tls = true - o.secureURL = secureURL - o.mtlsDisabled = mtlsDisabled - } -} - -// withURL sets the test store to use a URL. -// Use it when you want to explicitly combine multiple addresses in the same test -// to verify which one is being used. -// - true: the URL will receive the URI provided by the testcontainer -// - false: the URL will be set to an empty string -func withURL(useContainerURI bool) testStoreOption { - return func(o *testStoreSettings) { - o.url = useContainerURI - } -} - -// newConfigFromContainer creates a Redis configuration using a test container. +// newConfigFromContainer creates a Redis configuration using Testcontainers. // It configures the container based on the provided options and returns a Config // that can be used to connect to the container. // The container is cleaned up when the test completes. -func newConfigFromContainer(t testing.TB, opts ...testStoreOption) Config { +func newConfigFromContainer(t testing.TB, opts ...testredis.Option) Config { t.Helper() - settings := &testStoreSettings{ - url: true, // by default, the URL will be set to the URI provided by the testcontainer - address: false, - hostPort: false, - } - for _, o := range opts { - o(settings) - } - - img := redisImage - if imgFromEnv := os.Getenv(redisImageEnvVar); imgFromEnv != "" { - img = imgFromEnv - } + redisCtr := testredis.Start(t, opts...) cfg := Config{ - Reset: true, - } - - ctx := context.Background() - - tcOpts := []testcontainers.ContainerCustomizer{} - - if settings.tls { - tcOpts = append(tcOpts, redis.WithTLS()) - - // Use Redis module's TLS options, but for the MTLS case, disable the auth-clients flag - cmds := []string{ - "--port", "0", - "--tls-port", "6379", - "--tls-cert-file", "/tls/server.crt", - "--tls-key-file", "/tls/server.key", - "--tls-ca-cert-file", "/tls/ca.crt", - } - - cmds = append(cmds, "--tls-auth-clients", func() string { - if settings.mtlsDisabled { - return "no" - } - return "yes" - }()) - - // completely override the default CMD, as the Redis module is opinionated about the CMD - tcOpts = append(tcOpts, testcontainers.WithCmd(cmds...)) - } - - c, err := redis.Run(ctx, img, tcOpts...) - testcontainers.CleanupContainer(t, c) - require.NoError(t, err) - - cfg.TLSConfig = c.TLSConfig() - - uri, err := c.ConnectionString(ctx) - require.NoError(t, err) - - if settings.hostPort { - host, err := c.Host(ctx) - require.NoError(t, err) - - port, err := c.MappedPort(ctx, redisPort) - require.NoError(t, err) - - cfg.Host = host - cfg.Port = port.Int() - } - - if settings.address { - // trim the schemes from the URI - addr := strings.TrimPrefix(uri, "redis://") - addr = strings.TrimPrefix(addr, "rediss://") - cfg.Addrs = []string{addr} - } - - if settings.url { - cfg.URL = uri - } - - if !settings.secureURL { - // Replace the scheme with the insecure one - cfg.URL = strings.Replace(cfg.URL, "rediss://", "redis://", 1) + Reset: true, + TLSConfig: redisCtr.TLSConfig, + Host: redisCtr.Host, + Port: redisCtr.Port, + Addrs: redisCtr.Addrs, + URL: redisCtr.URL, } return cfg @@ -165,7 +34,7 @@ func newConfigFromContainer(t testing.TB, opts ...testStoreOption) Config { // It configures the container based on the provided options and returns a Storage // instance connected to the container. The caller is responsible for calling // Close() on the returned Storage when done. -func newTestStore(t testing.TB, opts ...testStoreOption) *Storage { +func newTestStore(t testing.TB, opts ...testredis.Option) *Storage { return New(newConfigFromContainer(t, opts...)) } @@ -330,7 +199,7 @@ func Test_Redis_Initialize_WithHostPort(t *testing.T) { val = []byte("kent") ) - testStore := newTestStore(t, withHostPort()) + testStore := newTestStore(t, testredis.WithHostPort()) defer testStore.Close() err := testStore.Set(key, val, 0) @@ -348,7 +217,7 @@ func Test_Redis_Initialize_WithURL_TLS_Verify(t *testing.T) { testFn := func(t *testing.T, secureURL bool, mtlsDisabled bool) { t.Helper() - testStore := newTestStore(t, withTLS(secureURL, mtlsDisabled)) + testStore := newTestStore(t, testredis.WithTLS(secureURL, mtlsDisabled)) defer testStore.Close() var ( @@ -390,7 +259,7 @@ func Test_Redis_Initialize_WithURL_TLS_Verify(t *testing.T) { func Test_Redis_Universal_Addrs(t *testing.T) { // This should failover and create a Single Node connection. - testStoreUniversal := newTestStore(t, withAddress()) + testStoreUniversal := newTestStore(t, testredis.WithAddress()) defer testStoreUniversal.Close() var ( key = "bruce" @@ -416,7 +285,7 @@ func Test_Redis_Universal_With_URL_Undefined(t *testing.T) { // This should failover to creating a regular *redis.Client // The URL should get ignored since it's empty // the withURL option goes last to include it in the config - testStoreUniversal := newTestStore(t, withAddress(), withURL(false)) + testStoreUniversal := newTestStore(t, testredis.WithAddress(), testredis.WithURL(false)) defer testStoreUniversal.Close() var ( key = "bruce" @@ -441,7 +310,7 @@ func Test_Redis_Universal_With_URL_Undefined(t *testing.T) { func Test_Redis_Universal_With_URL_Defined(t *testing.T) { // This should failover to creating a regular *redis.Client // The Addrs field should get ignored since URL is defined - testStoreUniversal := newTestStore(t, withAddress(), withURL(true)) + testStoreUniversal := newTestStore(t, testredis.WithAddress(), testredis.WithURL(true)) defer testStoreUniversal.Close() var ( @@ -467,7 +336,7 @@ func Test_Redis_Universal_With_URL_Defined(t *testing.T) { func Test_Redis_Universal_With_HostPort(t *testing.T) { // This should failover to creating a regular *redis.Client // The Host and Port should get ignored since Addrs is defined - testStoreUniversal := newTestStore(t, withAddress(), withHostPort(), withURL(false)) + testStoreUniversal := newTestStore(t, testredis.WithAddress(), testredis.WithHostPort(), testredis.WithURL(false)) defer testStoreUniversal.Close() var ( key = "bruce" @@ -492,7 +361,7 @@ func Test_Redis_Universal_With_HostPort(t *testing.T) { func Test_Redis_Universal_With_HostPort_And_URL(t *testing.T) { // This should failover to creating a regular *redis.Client // The Host and Port should get ignored since Addrs is defined - testStoreUniversal := newTestStore(t, withAddress(), withHostPort(), withURL(true)) + testStoreUniversal := newTestStore(t, testredis.WithAddress(), testredis.WithHostPort(), testredis.WithURL(true)) defer testStoreUniversal.Close() var ( From 5b7af066bbb6d59a9fe219b0830a5fffd8f5d7b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 30 Apr 2025 12:58:15 +0200 Subject: [PATCH 127/168] chore: consume the testredis module in rueidis --- .github/workflows/benchmark.yml | 4 +- .github/workflows/test-rueidis.yml | 28 +---- rueidis/go.mod | 53 +++++++- rueidis/go.sum | 192 +++++++++++++++++++++++++++-- rueidis/rueidis_test.go | 179 +++++++++++++++++++-------- 5 files changed, 373 insertions(+), 83 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index eea33cc6..efe01955 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -85,14 +85,14 @@ jobs: sleep 30 - name: Setup Redis - if: ${{ matrix.package == 'rueidis' || matrix.package == 'valkey' }} + if: ${{ matrix.package == 'valkey' }} uses: shogo82148/actions-setup-redis@v1 with: redis-version: '7.x' auto-start: 'false' - name: Run Redis - if: ${{ matrix.package == 'rueidis' || matrix.package == 'valkey' }} + if: ${{ matrix.package == 'valkey' }} run: | redis-server --port 6379 & sleep 15 diff --git a/.github/workflows/test-rueidis.yml b/.github/workflows/test-rueidis.yml index 933aedf9..d2487eff 100644 --- a/.github/workflows/test-rueidis.yml +++ b/.github/workflows/test-rueidis.yml @@ -15,33 +15,15 @@ jobs: strategy: matrix: go-version: - - 1.20.x - - 1.21.x + - 1.23.x + - 1.24.x redis: - - '6.x' - - '7.x' + - '6' + - '7' steps: - name: Fetch Repository uses: actions/checkout@v4 - - name: Generate TLS certs - run: ./.github/scripts/gen-test-certs.sh - - - name: Setup Redis - uses: shogo82148/actions-setup-redis@v1 - with: - redis-version: ${{ matrix.redis }} - auto-start: 'false' - redis-port: '6379' - redis-tls-port: '6380' - - - name: Run Redis - run: | - redis-server --tls-port 6380 --port 6379 \ - --tls-cert-file /home/runner/work/storage/storage/tls/redis.crt \ - --tls-key-file /home/runner/work/storage/storage/tls/redis.key \ - --tls-ca-cert-file /home/runner/work/storage/storage/tls/ca.crt & - - name: Setup Redis Cluster uses: vishnudxb/redis-cluster@1.0.9 with: @@ -59,4 +41,6 @@ jobs: go-version: '${{ matrix.go-version }}' - name: Run Test + env: + TEST_REDIS_IMAGE: "docker.io/redis:${{ matrix.redis }}" run: cd ./rueidis && go test ./... -v -race diff --git a/rueidis/go.mod b/rueidis/go.mod index d3cbac8b..77e42a08 100644 --- a/rueidis/go.mod +++ b/rueidis/go.mod @@ -1,15 +1,64 @@ module github.com/gofiber/storage/rueidis -go 1.20 +go 1.23.0 require ( + github.com/gofiber/storage/testhelpers/redis v0.0.0-00010101000000-000000000000 github.com/redis/rueidis v1.0.44 github.com/stretchr/testify v1.10.0 ) +replace github.com/gofiber/storage/testhelpers/redis => ../testhelpers/redis + require ( + dario.cat/mergo v1.0.1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/containerd/platforms v0.2.1 // indirect + github.com/cpuguy83/dockercfg v0.3.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/distribution/reference v0.6.0 // indirect + github.com/docker/docker v28.0.1+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/ebitengine/purego v0.8.2 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/klauspost/compress v1.17.4 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/magiconair/properties v1.8.10 // indirect + github.com/mdelapenya/tlscert v0.2.0 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/patternmatcher v0.6.0 // indirect + github.com/moby/sys/sequential v0.5.0 // indirect + github.com/moby/sys/user v0.1.0 // indirect + github.com/moby/sys/userns v0.1.0 // indirect + github.com/moby/term v0.5.0 // indirect + github.com/morikuni/aec v1.0.0 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.1 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/sys v0.24.0 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/shirou/gopsutil/v4 v4.25.1 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/testcontainers/testcontainers-go v0.37.0 // indirect + github.com/testcontainers/testcontainers-go/modules/redis v0.37.0 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect + golang.org/x/crypto v0.37.0 // indirect + golang.org/x/sys v0.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/rueidis/go.sum b/rueidis/go.sum index 9945233e..9c321b8e 100644 --- a/rueidis/go.sum +++ b/rueidis/go.sum @@ -1,20 +1,198 @@ +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= +github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= +github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v28.0.1+incompatible h1:FCHjSRdXhNRFjlHMTv4jUNlIBbTeRjrWfeFuJp7jpo0= +github.com/docker/docker v28.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I= +github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mdelapenya/tlscert v0.2.0 h1:7H81W6Z/4weDvZBNOfQte5GpIMo0lGYEeWbkGp5LJHI= +github.com/mdelapenya/tlscert v0.2.0/go.mod h1:O4njj3ELLnJjGdkN7M/vIVCpZ+Cf0L6muqOG4tLSl8o= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= +github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= +github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo= +github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= +github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/redis/go-redis/v9 v9.7.3 h1:YpPyAayJV+XErNsatSElgRZZVCwXX9QzkKYNvO7x0wM= +github.com/redis/go-redis/v9 v9.7.3/go.mod h1:bGUrSggJ9X9GUmZpZNEOQKaANxSGgOEBRltRTZHSvrA= github.com/redis/rueidis v1.0.44 h1:QfhfuovwEabcywfEXofRjPZuT29pjtpIWDJlCGHZfg8= github.com/redis/rueidis v1.0.44/go.mod h1:bnbkk4+CkXZgDPEbUtSos/o55i4RhFYYesJ4DS2zmq0= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= +github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= +github.com/testcontainers/testcontainers-go/modules/redis v0.37.0 h1:9HIY28I9ME/Zmb+zey1p/I1mto5+5ch0wLX+nJdOsQ4= +github.com/testcontainers/testcontainers-go/modules/redis v0.37.0/go.mod h1:Abu9g/25Qv+FkYVx3U4Voaynou1c+7D0HIhaQJXvk6E= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= +go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= +google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= +google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= +google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= diff --git a/rueidis/rueidis_test.go b/rueidis/rueidis_test.go index 265fb5a7..cca815e6 100644 --- a/rueidis/rueidis_test.go +++ b/rueidis/rueidis_test.go @@ -1,17 +1,40 @@ package rueidis import ( - "crypto/tls" - "log" "testing" "time" "github.com/stretchr/testify/require" + + testredis "github.com/gofiber/storage/testhelpers/redis" ) -var testStore = New(Config{ - Reset: true, -}) +// newConfigFromContainer creates a Rueidis configuration using Testcontainers. +// It configures the container based on the provided options and returns a Config +// that can be used to connect to the container. +// The container is cleaned up when the test completes. +func newConfigFromContainer(t testing.TB, opts ...testredis.Option) Config { + t.Helper() + + redisCtr := testredis.Start(t, opts...) + + cfg := Config{ + Reset: true, + TLSConfig: redisCtr.TLSConfig, + InitAddress: redisCtr.Addrs, + URL: redisCtr.URL, + } + + return cfg +} + +// newTestStore creates a new Rueidis storage instance backed by Testcontainers. +// It configures the container based on the provided options and returns a Storage +// instance connected to the container. The caller is responsible for calling +// Close() on the returned Storage when done. +func newTestStore(t testing.TB, opts ...testredis.Option) *Storage { + return New(newConfigFromContainer(t, opts...)) +} func Test_Rueidis_Set(t *testing.T) { var ( @@ -19,6 +42,9 @@ func Test_Rueidis_Set(t *testing.T) { val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) } @@ -29,6 +55,9 @@ func Test_Rueidis_Set_Override(t *testing.T) { val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) @@ -42,6 +71,9 @@ func Test_Rueidis_Get(t *testing.T) { val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) @@ -57,6 +89,9 @@ func Test_Rueidis_Set_Expiration(t *testing.T) { exp = 1 * time.Second ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, exp) require.NoError(t, err) @@ -66,12 +101,18 @@ func Test_Rueidis_Set_Expiration(t *testing.T) { func Test_Rueidis_Get_Expired(t *testing.T) { key := "john" + testStore := newTestStore(t) + defer testStore.Close() + result, err := testStore.Get(key) require.NoError(t, err) require.Zero(t, len(result)) } func Test_Rueidis_Get_NotExist(t *testing.T) { + testStore := newTestStore(t) + defer testStore.Close() + result, err := testStore.Get("notexist") require.NoError(t, err) require.Zero(t, len(result)) @@ -83,6 +124,9 @@ func Test_Rueidis_Delete(t *testing.T) { val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) @@ -97,6 +141,9 @@ func Test_Rueidis_Delete(t *testing.T) { func Test_Rueidis_Reset(t *testing.T) { val := []byte("doe") + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set("john1", val, 0) require.NoError(t, err) @@ -116,99 +163,122 @@ func Test_Rueidis_Reset(t *testing.T) { } func Test_Rueidis_Close(t *testing.T) { + testStore := newTestStore(t) require.Nil(t, testStore.Close()) } func Test_Rueidis_Conn(t *testing.T) { + testStore := newTestStore(t) + defer testStore.Close() + require.True(t, testStore.Conn() != nil) } func Test_Rueidis_WithTLS(t *testing.T) { - cer, err := tls.LoadX509KeyPair("/home/runner/work/storage/storage/tls/client.crt", "/home/runner/work/storage/storage/tls/client.key") - if err != nil { - log.Println(err) + testFn := func(t *testing.T, secureURL bool, mtlsDisabled bool) { + t.Helper() + + testStore := newTestStore(t, testredis.WithTLS(secureURL, mtlsDisabled)) + defer testStore.Close() + + var ( + key = "clark" + val = []byte("kent") + ) + + err := testStore.Set(key, val, 0) + require.NoError(t, err) + + result, err := testStore.Get(key) + require.NoError(t, err) + require.Equal(t, val, result) + + err = testStore.Delete(key) require.NoError(t, err) } - tlsCfg := &tls.Config{ - MinVersion: tls.VersionTLS12, - CurvePreferences: []tls.CurveID{tls.CurveP521, tls.CurveP384, tls.CurveP256}, - InsecureSkipVerify: true, - Certificates: []tls.Certificate{cer}, - CipherSuites: []uint16{ - tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, - tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, - tls.TLS_RSA_WITH_AES_256_GCM_SHA384, - tls.TLS_RSA_WITH_AES_256_CBC_SHA, - }, - } - storeTLS := New(Config{ - InitAddress: []string{"localhost:6380"}, - TLSConfig: tlsCfg, + t.Run("insecure-url/mtls-disabled", func(t *testing.T) { + testFn(t, false, true) }) - var ( - key = "clark" - val = []byte("kent") - ) + t.Run("insecure-url/mtls-enabled", func(t *testing.T) { + testFn(t, false, false) + }) - err = storeTLS.Set(key, val, 0) - require.NoError(t, err) + t.Run("secure-url/mtls-disabled", func(t *testing.T) { + testFn(t, true, true) + }) - result, err := storeTLS.Get(key) - require.NoError(t, err) - require.Equal(t, val, result) - - err = storeTLS.Delete(key) - require.NoError(t, err) - require.Nil(t, storeTLS.Close()) + t.Run("secure-url/mtls-enabled", func(t *testing.T) { + testFn(t, true, false) + }) } func Test_Rueidis_With_HostPort(t *testing.T) { - store := New(Config{ - InitAddress: []string{"localhost:6379"}, - }) + testStore := newTestStore(t, testredis.WithHostPort()) + defer testStore.Close() var ( key = "bruce" val = []byte("wayne") ) - err := store.Set(key, val, 0) + err := testStore.Set(key, val, 0) require.NoError(t, err) - result, err := store.Get(key) + result, err := testStore.Get(key) require.NoError(t, err) require.Equal(t, val, result) - err = store.Delete(key) + err = testStore.Delete(key) require.NoError(t, err) - require.Nil(t, store.Close()) + require.Nil(t, testStore.Close()) } func Test_Rueidis_With_URL(t *testing.T) { - store := New(Config{ - URL: "redis://localhost:6379", - }) + testStore := newTestStore(t, testredis.WithAddress(), testredis.WithURL(false)) + defer testStore.Close() var ( key = "bruce" val = []byte("wayne") ) - err := store.Set(key, val, 0) + err := testStore.Set(key, val, 0) require.NoError(t, err) - result, err := store.Get(key) + result, err := testStore.Get(key) require.NoError(t, err) require.Equal(t, val, result) - err = store.Delete(key) + err = testStore.Delete(key) require.NoError(t, err) - require.Nil(t, store.Close()) + require.Nil(t, testStore.Close()) +} + +func Test_Rueidis_With_TLS_URL(t *testing.T) { + testStore := newTestStore(t, testredis.WithTLS(true, false), testredis.WithAddress(), testredis.WithURL(true)) + defer testStore.Close() + + var ( + key = "bruce" + val = []byte("wayne") + ) + + err := testStore.Set(key, val, 0) + require.NoError(t, err) + + result, err := testStore.Get(key) + require.NoError(t, err) + require.Equal(t, val, result) + + err = testStore.Delete(key) + require.NoError(t, err) + require.Nil(t, testStore.Close()) } func Test_Rueidis_Cluster(t *testing.T) { + // TODO: Replace with containerized cluster when testcontainers-go Rueidis module supports clustering store := New(Config{ InitAddress: []string{ "localhost:7000", @@ -238,6 +308,9 @@ func Test_Rueidis_Cluster(t *testing.T) { } func Benchmark_Rueidis_Set(b *testing.B) { + testStore := newTestStore(b) + defer testStore.Close() + b.ReportAllocs() b.ResetTimer() @@ -250,6 +323,9 @@ func Benchmark_Rueidis_Set(b *testing.B) { } func Benchmark_Rueidis_Get(b *testing.B) { + testStore := newTestStore(b) + defer testStore.Close() + err := testStore.Set("john", []byte("doe"), 0) require.NoError(b, err) @@ -264,6 +340,9 @@ func Benchmark_Rueidis_Get(b *testing.B) { } func Benchmark_Rueidis_SetAndDelete(b *testing.B) { + testStore := newTestStore(b) + defer testStore.Close() + b.ReportAllocs() b.ResetTimer() From 892e6fec63d0c792a27d95bd55fab1a9ef6d755c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 30 Apr 2025 13:21:16 +0200 Subject: [PATCH 128/168] chore: consume the testredis module in valkey --- .github/workflows/benchmark.yml | 14 +-- .github/workflows/test-valkey.yml | 26 +--- valkey/go.mod | 49 ++++++++ valkey/go.sum | 183 +++++++++++++++++++++++++++- valkey/valkey_test.go | 195 ++++++++++++++++++++++-------- 5 files changed, 377 insertions(+), 90 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index efe01955..158c4923 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -84,19 +84,6 @@ jobs: docker run -d -p 1408:1408 -p 30000:30000 ghcr.io/oracle/coherence-ce:22.06.5 sleep 30 - - name: Setup Redis - if: ${{ matrix.package == 'valkey' }} - uses: shogo82148/actions-setup-redis@v1 - with: - redis-version: '7.x' - auto-start: 'false' - - - name: Run Redis - if: ${{ matrix.package == 'valkey' }} - run: | - redis-server --port 6379 & - sleep 15 - - name: Install etcd if: ${{ matrix.package == 'etcd' }} run: | @@ -132,6 +119,7 @@ jobs: TEST_POSTGRES_IMAGE: "docker.io/postgres:16-alpine" TEST_REDIS_IMAGE: "docker.io/redis:7" TEST_SCYLLADB_IMAGE: "scylladb/scylla:6.2" + TEST_VALKEY_IMAGE: "valkey/valkey:8" - name: Get Previous Benchmark Results uses: actions/cache@v4 diff --git a/.github/workflows/test-valkey.yml b/.github/workflows/test-valkey.yml index 9e66e3f7..1040116c 100644 --- a/.github/workflows/test-valkey.yml +++ b/.github/workflows/test-valkey.yml @@ -17,32 +17,14 @@ jobs: matrix: go-version: - 1.23.x + - 1.24.x valkey: - - '7.x' - - '8.x' + - '7' + - '8' steps: - name: Fetch Repository uses: actions/checkout@v4 - - name: Generate TLS certs - run: ./.github/scripts/gen-test-certs.sh - - - name: Setup Valkey - uses: shogo82148/actions-setup-redis@v1 - with: - distribution: 'valkey' - redis-version: ${{ matrix.valkey }} - auto-start: 'false' - redis-port: '6379' - redis-tls-port: '6380' - - - name: Run Valkey - run: | - valkey-server --tls-port 6380 --port 6379 \ - --tls-cert-file /home/runner/work/storage/storage/tls/valkey.crt \ - --tls-key-file /home/runner/work/storage/storage/tls/valkey.key \ - --tls-ca-cert-file /home/runner/work/storage/storage/tls/ca.crt & - - name: Setup Valkey Cluster uses: vishnudxb/redis-cluster@1.0.9 with: @@ -60,4 +42,6 @@ jobs: go-version: '${{ matrix.go-version }}' - name: Run Test + env: + TEST_VALKEY_IMAGE: "valkey/valkey:${{ matrix.valkey }}" run: cd ./valkey && go test ./... -v -race diff --git a/valkey/go.mod b/valkey/go.mod index c30c95d8..f465ca59 100644 --- a/valkey/go.mod +++ b/valkey/go.mod @@ -3,13 +3,62 @@ module github.com/gofiber/storage/valkey go 1.23.0 require ( + github.com/gofiber/storage/testhelpers/redis v0.0.0-00010101000000-000000000000 github.com/stretchr/testify v1.10.0 github.com/valkey-io/valkey-go v1.0.59 ) +replace github.com/gofiber/storage/testhelpers/redis => ../testhelpers/redis + require ( + dario.cat/mergo v1.0.1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/containerd/platforms v0.2.1 // indirect + github.com/cpuguy83/dockercfg v0.3.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/distribution/reference v0.6.0 // indirect + github.com/docker/docker v28.0.1+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/ebitengine/purego v0.8.2 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/klauspost/compress v1.17.4 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/magiconair/properties v1.8.10 // indirect + github.com/mdelapenya/tlscert v0.2.0 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/patternmatcher v0.6.0 // indirect + github.com/moby/sys/sequential v0.5.0 // indirect + github.com/moby/sys/user v0.1.0 // indirect + github.com/moby/sys/userns v0.1.0 // indirect + github.com/moby/term v0.5.0 // indirect + github.com/morikuni/aec v1.0.0 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.1 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/shirou/gopsutil/v4 v4.25.1 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/testcontainers/testcontainers-go v0.37.0 // indirect + github.com/testcontainers/testcontainers-go/modules/redis v0.37.0 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect + golang.org/x/crypto v0.37.0 // indirect golang.org/x/sys v0.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/valkey/go.sum b/valkey/go.sum index 6ee70fdf..cca10b90 100644 --- a/valkey/go.sum +++ b/valkey/go.sum @@ -1,27 +1,198 @@ +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= +github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= +github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v28.0.1+incompatible h1:FCHjSRdXhNRFjlHMTv4jUNlIBbTeRjrWfeFuJp7jpo0= +github.com/docker/docker v28.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I= +github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mdelapenya/tlscert v0.2.0 h1:7H81W6Z/4weDvZBNOfQte5GpIMo0lGYEeWbkGp5LJHI= +github.com/mdelapenya/tlscert v0.2.0/go.mod h1:O4njj3ELLnJjGdkN7M/vIVCpZ+Cf0L6muqOG4tLSl8o= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= +github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= +github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8= github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= +github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/redis/go-redis/v9 v9.7.3 h1:YpPyAayJV+XErNsatSElgRZZVCwXX9QzkKYNvO7x0wM= +github.com/redis/go-redis/v9 v9.7.3/go.mod h1:bGUrSggJ9X9GUmZpZNEOQKaANxSGgOEBRltRTZHSvrA= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= +github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= +github.com/testcontainers/testcontainers-go/modules/redis v0.37.0 h1:9HIY28I9ME/Zmb+zey1p/I1mto5+5ch0wLX+nJdOsQ4= +github.com/testcontainers/testcontainers-go/modules/redis v0.37.0/go.mod h1:Abu9g/25Qv+FkYVx3U4Voaynou1c+7D0HIhaQJXvk6E= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/valkey-io/valkey-go v1.0.59 h1:W67Z0UY+Qqk3k8NKkFCFlM3X4yQUniixl7dSJAch2Qo= github.com/valkey-io/valkey-go v1.0.59/go.mod h1:bHmwjIEOrGq/ubOJfh5uMRs7Xj6mV3mQ/ZXUbmqpjqY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= +go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= -golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= +google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= +google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= +google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= diff --git a/valkey/valkey_test.go b/valkey/valkey_test.go index cf59cf75..80dd3520 100644 --- a/valkey/valkey_test.go +++ b/valkey/valkey_test.go @@ -1,17 +1,55 @@ package valkey import ( - "crypto/tls" - "log" + "os" "testing" "time" "github.com/stretchr/testify/require" + + testredis "github.com/gofiber/storage/testhelpers/redis" ) -var testStore = New(Config{ - Reset: true, -}) +const ( + // valkeyImage is the default image used for running Valkey in tests. + valkeyImage = "valkey/valkey:8" + valkeyImageEnvVar = "TEST_VALKEY_IMAGE" +) + +// newConfigFromContainer creates a Redis configuration using Testcontainers. +// It configures the container based on the provided options and returns a Config +// that can be used to connect to the container. +// The container is cleaned up when the test completes. +func newConfigFromContainer(t testing.TB, opts ...testredis.Option) Config { + t.Helper() + + img := valkeyImage + if imgFromEnv := os.Getenv(valkeyImageEnvVar); imgFromEnv != "" { + img = imgFromEnv + } + + // Force Valkey image when running outside of GitHub Actions + opts = append(opts, testredis.WithImage(img)) + + redisCtr := testredis.Start(t, opts...) + + cfg := Config{ + Reset: true, + TLSConfig: redisCtr.TLSConfig, + InitAddress: redisCtr.Addrs, + URL: redisCtr.URL, + } + + return cfg +} + +// newTestStore creates a new Redis storage instance backed by Testcontainers. +// It configures the container based on the provided options and returns a Storage +// instance connected to the container. The caller is responsible for calling +// Close() on the returned Storage when done. +func newTestStore(t testing.TB, opts ...testredis.Option) *Storage { + return New(newConfigFromContainer(t, opts...)) +} func Test_Valkey_Set(t *testing.T) { var ( @@ -19,6 +57,9 @@ func Test_Valkey_Set(t *testing.T) { val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) } @@ -29,6 +70,9 @@ func Test_Valkey_Set_Override(t *testing.T) { val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) @@ -42,6 +86,9 @@ func Test_Valkey_Get(t *testing.T) { val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) @@ -57,6 +104,9 @@ func Test_Valkey_Set_Expiration(t *testing.T) { exp = 1 * time.Second ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, exp) require.NoError(t, err) @@ -66,12 +116,18 @@ func Test_Valkey_Set_Expiration(t *testing.T) { func Test_Valkey_Get_Expired(t *testing.T) { key := "john" + testStore := newTestStore(t) + defer testStore.Close() + result, err := testStore.Get(key) require.NoError(t, err) require.Zero(t, len(result)) } func Test_Valkey_Get_NotExist(t *testing.T) { + testStore := newTestStore(t) + defer testStore.Close() + result, err := testStore.Get("notexist") require.NoError(t, err) require.Zero(t, len(result)) @@ -83,6 +139,9 @@ func Test_Valkey_Delete(t *testing.T) { val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) @@ -97,6 +156,9 @@ func Test_Valkey_Delete(t *testing.T) { func Test_Valkey_Reset(t *testing.T) { val := []byte("doe") + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set("john1", val, 0) require.NoError(t, err) @@ -116,99 +178,123 @@ func Test_Valkey_Reset(t *testing.T) { } func Test_Valkey_Close(t *testing.T) { + testStore := newTestStore(t) require.Nil(t, testStore.Close()) } func Test_Valkey_Conn(t *testing.T) { + testStore := newTestStore(t) + defer testStore.Close() + require.True(t, testStore.Conn() != nil) } func Test_Valkey_WithTLS(t *testing.T) { - cer, err := tls.LoadX509KeyPair("/home/runner/work/storage/storage/tls/client.crt", "/home/runner/work/storage/storage/tls/client.key") - if err != nil { - log.Println(err) + testFn := func(t *testing.T, secureURL bool, mtlsDisabled bool) { + t.Helper() + + testStore := newTestStore(t, testredis.WithTLS(secureURL, mtlsDisabled)) + defer testStore.Close() + + var ( + key = "clark" + val = []byte("kent") + ) + + err := testStore.Set(key, val, 0) + require.NoError(t, err) + + result, err := testStore.Get(key) + require.NoError(t, err) + require.Equal(t, val, result) + + err = testStore.Delete(key) require.NoError(t, err) } - tlsCfg := &tls.Config{ - MinVersion: tls.VersionTLS12, - CurvePreferences: []tls.CurveID{tls.CurveP521, tls.CurveP384, tls.CurveP256}, - InsecureSkipVerify: true, - Certificates: []tls.Certificate{cer}, - CipherSuites: []uint16{ - tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, - tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, - tls.TLS_RSA_WITH_AES_256_GCM_SHA384, - tls.TLS_RSA_WITH_AES_256_CBC_SHA, - }, - } - storeTLS := New(Config{ - InitAddress: []string{"localhost:6380"}, - TLSConfig: tlsCfg, + t.Run("insecure-url/mtls-disabled", func(t *testing.T) { + testFn(t, false, true) }) - var ( - key = "clark" - val = []byte("kent") - ) + t.Run("insecure-url/mtls-enabled", func(t *testing.T) { + testFn(t, false, false) + }) - err = storeTLS.Set(key, val, 0) - require.NoError(t, err) + t.Run("secure-url/mtls-disabled", func(t *testing.T) { + testFn(t, true, true) + }) - result, err := storeTLS.Get(key) - require.NoError(t, err) - require.Equal(t, val, result) - - err = storeTLS.Delete(key) - require.NoError(t, err) - require.Nil(t, storeTLS.Close()) + t.Run("secure-url/mtls-enabled", func(t *testing.T) { + testFn(t, true, false) + }) } func Test_Valkey_With_HostPort(t *testing.T) { - store := New(Config{ - InitAddress: []string{"localhost:6379"}, - }) + testStore := newTestStore(t, testredis.WithHostPort()) + defer testStore.Close() var ( key = "bruce" val = []byte("wayne") ) - err := store.Set(key, val, 0) + err := testStore.Set(key, val, 0) require.NoError(t, err) - result, err := store.Get(key) + result, err := testStore.Get(key) require.NoError(t, err) require.Equal(t, val, result) - err = store.Delete(key) + err = testStore.Delete(key) require.NoError(t, err) - require.Nil(t, store.Close()) + require.Nil(t, testStore.Close()) } func Test_Valkey_With_URL(t *testing.T) { - store := New(Config{ - URL: "redis://localhost:6379", - }) + testStore := newTestStore(t, testredis.WithAddress(), testredis.WithURL(false)) + defer testStore.Close() var ( key = "bruce" val = []byte("wayne") ) - err := store.Set(key, val, 0) + err := testStore.Set(key, val, 0) require.NoError(t, err) - result, err := store.Get(key) + result, err := testStore.Get(key) require.NoError(t, err) require.Equal(t, val, result) - err = store.Delete(key) + err = testStore.Delete(key) require.NoError(t, err) - require.Nil(t, store.Close()) + require.Nil(t, testStore.Close()) +} + +func Test_Valkey_With_TLS_URL(t *testing.T) { + testStore := newTestStore(t, testredis.WithTLS(true, false), testredis.WithAddress(), testredis.WithURL(true)) + defer testStore.Close() + + var ( + key = "bruce" + val = []byte("wayne") + ) + + err := testStore.Set(key, val, 0) + require.NoError(t, err) + + result, err := testStore.Get(key) + require.NoError(t, err) + require.Equal(t, val, result) + + err = testStore.Delete(key) + require.NoError(t, err) + require.Nil(t, testStore.Close()) } func Test_Valkey_Cluster(t *testing.T) { + t.Skip("TODO: Replace with containerized cluster when testcontainers-go Valkey module supports clustering") + // TODO: Replace with containerized cluster when testcontainers-go Valkey module supports clustering store := New(Config{ InitAddress: []string{ "localhost:7000", @@ -238,6 +324,9 @@ func Test_Valkey_Cluster(t *testing.T) { } func Benchmark_Valkey_Set(b *testing.B) { + testStore := newTestStore(b) + defer testStore.Close() + b.ReportAllocs() b.ResetTimer() @@ -250,6 +339,9 @@ func Benchmark_Valkey_Set(b *testing.B) { } func Benchmark_Valkey_Get(b *testing.B) { + testStore := newTestStore(b) + defer testStore.Close() + err := testStore.Set("john", []byte("doe"), 0) require.NoError(b, err) @@ -264,6 +356,9 @@ func Benchmark_Valkey_Get(b *testing.B) { } func Benchmark_Valkey_SetAndDelete(b *testing.B) { + testStore := newTestStore(b) + defer testStore.Close() + b.ReportAllocs() b.ResetTimer() From 7866e27c7598e458ced1fce4bfa401bec71d7ed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 30 Apr 2025 13:22:50 +0200 Subject: [PATCH 129/168] chore: remove shell script for cert generation --- .github/scripts/gen-test-certs.sh | 63 ------------------------------- 1 file changed, 63 deletions(-) delete mode 100755 .github/scripts/gen-test-certs.sh diff --git a/.github/scripts/gen-test-certs.sh b/.github/scripts/gen-test-certs.sh deleted file mode 100755 index 2cef602b..00000000 --- a/.github/scripts/gen-test-certs.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -# Generate some test certificates which are used by the regression test suite: -# -# ./tls/ca.{crt,key} Self signed CA certificate. -# ./tls/redis.{crt,key} A certificate with no key usage/policy restrictions. -# ./tls/client.{crt,key} A certificate restricted for SSL client usage. -# ./tls/server.{crt,key} A certificate restricted for SSL server usage. - -set -e - -generate_cert() { - local name=$1 - local cn="$2" - local opts="$3" - - local keyfile=./tls/${name}.key - local certfile=./tls/${name}.crt - - [ -f $keyfile ] || openssl genrsa -out $keyfile 2048 - openssl req \ - -new -sha256 \ - -subj "/O=Redis Test/CN=$cn" \ - -key $keyfile | \ - openssl x509 \ - -req -sha256 \ - -CA ./tls/ca.crt \ - -CAkey ./tls/ca.key \ - -CAserial ./tls/ca.txt \ - -CAcreateserial \ - -days 365 \ - $opts \ - -out $certfile -} - -mkdir -p ./tls -[ -f ./tls/ca.key ] || openssl genrsa -out ./tls/ca.key 4096 -openssl req \ - -x509 -new -nodes -sha256 \ - -key ./tls/ca.key \ - -days 3650 \ - -subj '/O=Redis Test/CN=Certificate Authority' \ - -out ./tls/ca.crt - -cat > ./tls/openssl.cnf <<_END_ -[ server_cert ] -keyUsage = digitalSignature, keyEncipherment -nsCertType = server -subjectAltName = DNS:localhost" - -[ client_cert ] -keyUsage = digitalSignature, keyEncipherment -nsCertType = client -_END_ - -generate_cert server "Server-only" "-extfile ./tls/openssl.cnf -extensions server_cert" -generate_cert client "Client-only" "-extfile ./tls/openssl.cnf -extensions client_cert" -generate_cert redis "localhost" "-extfile ./tls/openssl.cnf -extensions server_cert" -generate_cert valkey "localhost" "-extfile ./tls/openssl.cnf -extensions server_cert" - -# List generated certs -ls -la ./tls -echo "$PWD" From dd7391a11a7fb6fc6122cbfc429d789adfb43bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 30 Apr 2025 13:38:12 +0200 Subject: [PATCH 130/168] chore(ci): exclude testhelpers root dir from the filters --- .github/workflows/benchmark.yml | 5 ++++- .github/workflows/golangci-lint.yml | 5 ++++- .github/workflows/release-drafter.yml | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 158c4923..5f92fcd1 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -28,7 +28,10 @@ jobs: - name: Generate filters id: filter-setup run: | - filters=$(find . -maxdepth 1 -type d ! -path ./.git ! -path . -exec basename {} \; | grep -v '^\.' | awk '{printf "%s: \"%s/**\"\n", $1, $1}') + filters=$(find . -maxdepth 1 -type d ! -path ./.git ! -path . ! -path ./testhelpers -exec basename {} \; | grep -v '^\.' | awk '{printf "%s: \"%s/**\"\n", $1, $1}') + # Add all testhelpers subdirectories to filters + testhelpers_filters=$(find ./testhelpers -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | awk '{printf "testhelpers/%s: \"testhelpers/%s/**\"\n", $1, $1}') + filters="$filters\n$testhelpers_filters" echo "filters<> $GITHUB_OUTPUT echo "$filters" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index bb4abea6..ebd07f09 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -31,7 +31,10 @@ jobs: - name: Generate filters id: filter-setup run: | - filters=$(find . -maxdepth 1 -type d ! -path ./.git ! -path . -exec basename {} \; | grep -v '^\.' | awk '{printf "%s: \"%s/**\"\n", $1, $1}') + filters=$(find . -maxdepth 1 -type d ! -path ./.git ! -path . ! -path ./testhelpers -exec basename {} \; | grep -v '^\.' | awk '{printf "%s: \"%s/**\"\n", $1, $1}') + # Add all testhelpers subdirectories to filters + testhelpers_filters=$(find ./testhelpers -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | awk '{printf "testhelpers/%s: \"testhelpers/%s/**\"\n", $1, $1}') + filters="$filters\n$testhelpers_filters" echo "filters<> $GITHUB_OUTPUT echo "$filters" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index e42ccc8e..c90f9adc 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -18,7 +18,7 @@ jobs: - name: Generate filters id: filter-setup run: | - filters=$(find . -maxdepth 1 -type d ! -path ./.git ! -path . -exec basename {} \; | grep -v '^\.' | awk '{printf "%s: \"%s/**\"\n", $1, $1}') + filters=$(find . -maxdepth 1 -type d ! -path ./.git ! -path . ! -path ./testhelpers -exec basename {} \; | grep -v '^\.' | awk '{printf "%s: \"%s/**\"\n", $1, $1}') echo "filters<> $GITHUB_OUTPUT echo "$filters" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT From ba60ab9a1f14e03deaf42b5f15af351177cf5100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 30 Apr 2025 13:41:37 +0200 Subject: [PATCH 131/168] fix: indentation --- .github/workflows/benchmark.yml | 2 +- .github/workflows/golangci-lint.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 5f92fcd1..f593e5ca 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -31,9 +31,9 @@ jobs: filters=$(find . -maxdepth 1 -type d ! -path ./.git ! -path . ! -path ./testhelpers -exec basename {} \; | grep -v '^\.' | awk '{printf "%s: \"%s/**\"\n", $1, $1}') # Add all testhelpers subdirectories to filters testhelpers_filters=$(find ./testhelpers -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | awk '{printf "testhelpers/%s: \"testhelpers/%s/**\"\n", $1, $1}') - filters="$filters\n$testhelpers_filters" echo "filters<> $GITHUB_OUTPUT echo "$filters" >> $GITHUB_OUTPUT + echo "$testhelpers_filters" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT shell: bash diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index ebd07f09..0895f9a6 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -34,9 +34,9 @@ jobs: filters=$(find . -maxdepth 1 -type d ! -path ./.git ! -path . ! -path ./testhelpers -exec basename {} \; | grep -v '^\.' | awk '{printf "%s: \"%s/**\"\n", $1, $1}') # Add all testhelpers subdirectories to filters testhelpers_filters=$(find ./testhelpers -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | awk '{printf "testhelpers/%s: \"testhelpers/%s/**\"\n", $1, $1}') - filters="$filters\n$testhelpers_filters" echo "filters<> $GITHUB_OUTPUT echo "$filters" >> $GITHUB_OUTPUT + echo "$testhelpers_filters" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT shell: bash From b7893d7d4ac76fbce3b0e0e5e52defb9ebbdf508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 30 Apr 2025 13:44:50 +0200 Subject: [PATCH 132/168] fix: do not run benchmarks for the helpers --- .github/workflows/benchmark.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index f593e5ca..65fe54c2 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -29,11 +29,8 @@ jobs: id: filter-setup run: | filters=$(find . -maxdepth 1 -type d ! -path ./.git ! -path . ! -path ./testhelpers -exec basename {} \; | grep -v '^\.' | awk '{printf "%s: \"%s/**\"\n", $1, $1}') - # Add all testhelpers subdirectories to filters - testhelpers_filters=$(find ./testhelpers -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | awk '{printf "testhelpers/%s: \"testhelpers/%s/**\"\n", $1, $1}') echo "filters<> $GITHUB_OUTPUT echo "$filters" >> $GITHUB_OUTPUT - echo "$testhelpers_filters" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT shell: bash From 79d60436392abce748a5549b98b7ccef7db93f8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Thu, 1 May 2025 01:55:47 +0200 Subject: [PATCH 133/168] feat(memcached): use testcontainers-go in tests --- .github/workflows/benchmark.yml | 6 +- .github/workflows/test-memcache.yml | 12 +- memcache/go.mod | 55 ++++++++- memcache/go.sum | 180 +++++++++++++++++++++++++++- memcache/memcache_test.go | 84 +++++++++++-- 5 files changed, 311 insertions(+), 26 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index eb467c2d..66e2f4f4 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -66,11 +66,6 @@ jobs: with: node-version: '18' - - name: Install Memcached - if: ${{ matrix.package == 'memcache' }} - run: | - docker run -d -p 11211:11211 memcached:latest - - name: Install Cloudflare Worker if: ${{ matrix.package == 'cloudflarekv' }} run : | @@ -112,6 +107,7 @@ jobs: TEST_CLICKHOUSE_IMAGE: "clickhouse/clickhouse-server:23-alpine" TEST_COUCHBASE_IMAGE: "couchbase:enterprise-7.6.5" TEST_DYNAMODB_IMAGE: amazon/dynamodb-local:latest + TEST_MEMCACHED_IMAGE: "memcached:latest" TEST_MINIO_IMAGE: "docker.io/minio/minio:latest" TEST_MONGODB_IMAGE: "docker.io/mongo:7" TEST_MYSQL_IMAGE: "docker.io/mysql:9" diff --git a/.github/workflows/test-memcache.yml b/.github/workflows/test-memcache.yml index e7ebd64c..7ad15b80 100644 --- a/.github/workflows/test-memcache.yml +++ b/.github/workflows/test-memcache.yml @@ -12,17 +12,11 @@ name: "Tests Memcache" jobs: Tests: runs-on: ubuntu-latest - services: - mongo: - image: 'memcached:latest' - ports: - - '11211:11211' strategy: matrix: go-version: - - 1.19.x - - 1.20.x - - 1.21.x + - 1.23.x + - 1.24.x steps: - name: Fetch Repository uses: actions/checkout@v4 @@ -31,4 +25,6 @@ jobs: with: go-version: '${{ matrix.go-version }}' - name: Run Test + env: + TEST_MEMCACHED_IMAGE: "memcached:latest" run: cd ./memcache && go test ./... -v -race diff --git a/memcache/go.mod b/memcache/go.mod index 722e1490..b2daabdd 100644 --- a/memcache/go.mod +++ b/memcache/go.mod @@ -1,14 +1,65 @@ module github.com/gofiber/storage/memcache/v2 -go 1.19 +go 1.23.0 + +toolchain go1.24.1 require ( - github.com/bradfitz/gomemcache v0.0.0-20230611145640-acc696258285 + github.com/bradfitz/gomemcache v0.0.0-20250403215159-8d39553ac7cf github.com/stretchr/testify v1.10.0 + github.com/testcontainers/testcontainers-go v0.37.0 ) require ( + dario.cat/mergo v1.0.1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/containerd/platforms v0.2.1 // indirect + github.com/cpuguy83/dockercfg v0.3.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/distribution/reference v0.6.0 // indirect + github.com/docker/docker v28.0.1+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/ebitengine/purego v0.8.2 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/klauspost/compress v1.17.4 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/magiconair/properties v1.8.10 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/patternmatcher v0.6.0 // indirect + github.com/moby/sys/sequential v0.5.0 // indirect + github.com/moby/sys/user v0.1.0 // indirect + github.com/moby/sys/userns v0.1.0 // indirect + github.com/moby/term v0.5.0 // indirect + github.com/morikuni/aec v1.0.0 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.1 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/shirou/gopsutil/v4 v4.25.1 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/sdk v1.35.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect + go.opentelemetry.io/proto/otlp v1.6.0 // indirect + golang.org/x/crypto v0.37.0 // indirect + golang.org/x/sys v0.32.0 // indirect + google.golang.org/protobuf v1.36.6 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/memcache/go.sum b/memcache/go.sum index f7cfd332..5b4a0011 100644 --- a/memcache/go.sum +++ b/memcache/go.sum @@ -1,12 +1,186 @@ -github.com/bradfitz/gomemcache v0.0.0-20230611145640-acc696258285 h1:Dr+ezPI5ivhMn/3WOoB86XzMhie146DNaBbhaQWZHMY= -github.com/bradfitz/gomemcache v0.0.0-20230611145640-acc696258285/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/bradfitz/gomemcache v0.0.0-20250403215159-8d39553ac7cf h1:TqhNAT4zKbTdLa62d2HDBFdvgSbIGB3eJE8HqhgiL9I= +github.com/bradfitz/gomemcache v0.0.0-20250403215159-8d39553ac7cf/go.mod h1:r5xuitiExdLAJ09PR7vBVENGvp4ZuTBeWTGtxuX3K+c= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= +github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= +github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v28.0.1+incompatible h1:FCHjSRdXhNRFjlHMTv4jUNlIBbTeRjrWfeFuJp7jpo0= +github.com/docker/docker v28.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I= +github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= +github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= +github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= +github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= +github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 h1:1fTNlAIJZGWLP5FVu0fikVry1IsiUnXjf7QFvoNN3Xw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0/go.mod h1:zjPK58DtkqQFn+YUMbx0M2XV3QgKU0gS9LeGohREyK4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= +go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/proto/otlp v1.6.0 h1:jQjP+AQyTf+Fe7OKj/MfkDrmK4MNVtw2NpXsf9fefDI= +go.opentelemetry.io/proto/otlp v1.6.0/go.mod h1:cicgGehlFuNdgZkcALOCh3VE6K/u2tAjzlRhDwmVpZc= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= +golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/api v0.0.0-20250428153025-10db94c68c34 h1:0PeQib/pH3nB/5pEmFeVQJotzGohV0dq4Vcp09H5yhE= +google.golang.org/genproto/googleapis/api v0.0.0-20250428153025-10db94c68c34/go.mod h1:0awUlEkap+Pb1UMeJwJQQAdJQrt3moU7J2moTy69irI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250428153025-10db94c68c34 h1:h6p3mQqrmT1XkHVTfzLdNz1u7IhINeZkz67/xTbOuWs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250428153025-10db94c68c34/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.72.0 h1:S7UkcVa60b5AAQTaO6ZKamFp1zMZSU0fGDK2WZLbBnM= +google.golang.org/grpc v1.72.0/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= diff --git a/memcache/memcache_test.go b/memcache/memcache_test.go index 479fa954..a6449f28 100644 --- a/memcache/memcache_test.go +++ b/memcache/memcache_test.go @@ -1,24 +1,55 @@ package memcache import ( + "context" "os" "testing" "time" "github.com/stretchr/testify/require" + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/wait" ) -var testStore *Storage +const ( + // memcachedImage is the default image used for running memcached in tests. + memcachedImage = "memcached:latest" + memcachedImageEnvVar string = "TEST_MEMCACHED_IMAGE" + memcachedPort = "11211/tcp" +) -func TestMain(m *testing.M) { - testStore = New(Config{ - Reset: true, - }) +func newTestStore(t testing.TB) *Storage { + t.Helper() - code := m.Run() + img := memcachedImage + if imgFromEnv := os.Getenv(memcachedImageEnvVar); imgFromEnv != "" { + img = imgFromEnv + } - _ = testStore.Close() - os.Exit(code) + ctx := context.Background() + + c, err := testcontainers.Run(ctx, + img, + testcontainers.WithExposedPorts(memcachedPort), + testcontainers.WithWaitStrategy( + wait.ForListeningPort(memcachedPort), + ), + ) + testcontainers.CleanupContainer(t, c) + require.NoError(t, err) + + host, err := c.Host(ctx) + require.NoError(t, err) + + port, err := c.MappedPort(ctx, memcachedPort) + require.NoError(t, err) + + return New( + Config{ + Reset: true, + Servers: host + ":" + port.Port(), + }, + ) } func Test_Memcache_Set(t *testing.T) { @@ -27,6 +58,9 @@ func Test_Memcache_Set(t *testing.T) { val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) } @@ -37,6 +71,9 @@ func Test_Memcache_Set_Override(t *testing.T) { val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) @@ -50,6 +87,9 @@ func Test_Memcache_Get(t *testing.T) { val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) @@ -65,6 +105,9 @@ func Test_Memcache_Set_Expiration(t *testing.T) { exp = 1 * time.Second ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, exp) require.NoError(t, err) @@ -74,12 +117,18 @@ func Test_Memcache_Set_Expiration(t *testing.T) { func Test_Memcache_Get_Expired(t *testing.T) { key := "john" + testStore := newTestStore(t) + defer testStore.Close() + result, err := testStore.Get(key) require.NoError(t, err) require.Zero(t, len(result)) } func Test_Memcache_Get_NotExist(t *testing.T) { + testStore := newTestStore(t) + defer testStore.Close() + result, err := testStore.Get("notexist") require.NoError(t, err) require.Zero(t, len(result)) @@ -91,6 +140,9 @@ func Test_Memcache_Delete(t *testing.T) { val = []byte("doe") ) + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key, val, 0) require.NoError(t, err) @@ -105,6 +157,9 @@ func Test_Memcache_Delete(t *testing.T) { func Test_Memcache_Reset(t *testing.T) { val := []byte("doe") + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set("john1", val, 0) require.NoError(t, err) @@ -124,14 +179,21 @@ func Test_Memcache_Reset(t *testing.T) { } func Test_Memcache_Close(t *testing.T) { + testStore := newTestStore(t) require.Nil(t, testStore.Close()) } func Test_Memcache_Conn(t *testing.T) { + testStore := newTestStore(t) + defer testStore.Close() + require.True(t, testStore.Conn() != nil) } func Benchmark_Memcache_Set(b *testing.B) { + testStore := newTestStore(b) + defer testStore.Close() + b.ReportAllocs() b.ResetTimer() @@ -144,6 +206,9 @@ func Benchmark_Memcache_Set(b *testing.B) { } func Benchmark_Memcache_Get(b *testing.B) { + testStore := newTestStore(b) + defer testStore.Close() + err := testStore.Set("john", []byte("doe"), 0) require.NoError(b, err) @@ -158,6 +223,9 @@ func Benchmark_Memcache_Get(b *testing.B) { } func Benchmark_Memcache_SetAndDelete(b *testing.B) { + testStore := newTestStore(b) + defer testStore.Close() + b.ReportAllocs() b.ResetTimer() From 7ed83dd1616f48c7299e65be981569426e2c183d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Thu, 1 May 2025 02:25:07 +0200 Subject: [PATCH 134/168] feat(coherence): use testcontainers-go in tests --- coherence/coherence_test.go | 138 ++++++++++++++++++++++------ coherence/go.mod | 51 ++++++++++- coherence/go.sum | 174 ++++++++++++++++++++++++++++++++---- 3 files changed, 311 insertions(+), 52 deletions(-) diff --git a/coherence/coherence_test.go b/coherence/coherence_test.go index db599b3a..44e4e611 100644 --- a/coherence/coherence_test.go +++ b/coherence/coherence_test.go @@ -4,10 +4,14 @@ package coherence * Copyright © 2023, 2024 Oracle and/or its affiliates. */ import ( - "github.com/stretchr/testify/require" + "context" "os" "testing" "time" + + "github.com/stretchr/testify/require" + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/wait" ) var ( @@ -18,35 +22,74 @@ var ( value2 = []byte("value2") ) -var testStore *Storage +const ( + // coherenceImage is the default image used for running coherence in tests. + coherenceImage = "ghcr.io/oracle/coherence-ce:25.03.1-graal" + coherenceImageEnvVar string = "TEST_COHERENCE_IMAGE" + coherencePort = "1408/tcp" + coherencePort2 = "30000/tcp" +) -func TestMain(m *testing.M) { - testStore, _ = New(Config{ - Reset: true, - NearCacheTimeout: time.Duration(4) * time.Second, - }) - - code := m.Run() - - _ = testStore.Close() - os.Exit(code) -} - -// newTestStore returns a new Coherence Store and ensures it is reset. -func newTestStore(t testing.TB, config ...Config) (*Storage, error) { +func newTestConfig(t testing.TB) Config { t.Helper() - testStore, err := New(config...) + img := coherenceImage + if imgFromEnv := os.Getenv(coherenceImageEnvVar); imgFromEnv != "" { + img = imgFromEnv + } + + ctx := context.Background() + + c, err := testcontainers.Run(ctx, + img, + testcontainers.WithExposedPorts(coherencePort, coherencePort2), + testcontainers.WithWaitStrategy( + wait.ForListeningPort(coherencePort), + wait.ForListeningPort(coherencePort2), + ), + ) + testcontainers.CleanupContainer(t, c) require.NoError(t, err) - err = testStore.Reset() + host, err := c.Host(ctx) + require.NoError(t, err) - return testStore, err + port, err := c.MappedPort(ctx, coherencePort) + require.NoError(t, err) + + return Config{ + Reset: true, + Address: host + ":" + port.Port(), + NearCacheTimeout: time.Duration(4) * time.Second, + } +} + +func newTestStore(t testing.TB) *Storage { + return newTestStoreWithConfig(t, nil) +} + +func newTestStoreWithConfig(t testing.TB, config *Config) *Storage { + t.Helper() + + var cfg Config + if config == nil { + cfg = newTestConfig(t) + } else { + cfg = *config + } + + storage, err := New(cfg) + require.NoError(t, err) + + return storage } func Test_Coherence_Set_And_Get(t *testing.T) { var val []byte + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key1, value1, 0) require.NoError(t, err) @@ -60,6 +103,9 @@ func Test_Coherence_Set_And_Get(t *testing.T) { func Test_Coherence_Set_Override(t *testing.T) { var val []byte + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key1, value1, 0) require.NoError(t, err) @@ -74,6 +120,11 @@ func Test_Coherence_Set_Override(t *testing.T) { func Test_Coherence_Set_With_Reset(t *testing.T) { var val []byte + cfg := newTestConfig(t) + + testStore := newTestStoreWithConfig(t, &cfg) + defer testStore.Close() + err := testStore.Set(key1, value1, 0) require.NoError(t, err) @@ -82,7 +133,10 @@ func Test_Coherence_Set_With_Reset(t *testing.T) { require.Equal(t, value1, val) // get a new store but reset it, so the subsequent Get will return nil - testStore2, err := newTestStore(t, Config{Reset: true}) + testStore2 := newTestStoreWithConfig(t, &cfg) + defer testStore2.Close() + + err = testStore2.Reset() require.NoError(t, err) val, err = testStore2.Get(key1) @@ -95,6 +149,9 @@ func Test_Coherence_Set_With_Reset(t *testing.T) { func Test_Coherence_Set_With_Expiry(t *testing.T) { var val []byte + testStore := newTestStore(t) + defer testStore.Close() + // set with an expiry of 5 seconds err := testStore.Set(key1, value1, time.Duration(5)*time.Second) require.NoError(t, err) @@ -108,6 +165,9 @@ func Test_Coherence_Set_With_Expiry(t *testing.T) { func Test_Coherence_Get_Missing(t *testing.T) { var val []byte + testStore := newTestStore(t) + defer testStore.Close() + val, err := testStore.Get(missingKey) require.NoError(t, err) require.True(t, len(val) == 0) @@ -116,6 +176,9 @@ func Test_Coherence_Get_Missing(t *testing.T) { func Test_Coherence_Reset(t *testing.T) { var val []byte + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key1, value1, 0) require.NoError(t, err) @@ -133,6 +196,7 @@ func Test_Coherence_Reset(t *testing.T) { // reset the store, this should remove both entries err = testStore.Reset() + require.NoError(t, err) // check the keys have expired val, err = testStore.Get(key1) @@ -147,6 +211,9 @@ func Test_Coherence_Reset(t *testing.T) { func Test_Coherence_Set_And_Delete(t *testing.T) { var val []byte + testStore := newTestStore(t) + defer testStore.Close() + err := testStore.Set(key1, value1, 0) require.NoError(t, err) @@ -163,15 +230,22 @@ func Test_Coherence_Set_And_Delete(t *testing.T) { func Test_Coherence_With_Scope(t *testing.T) { var val []byte - // create two session stores with different scopes - testStore1, err := newTestStore(t, Config{ScopeName: "scope1"}) - require.NoError(t, err) + cfg := newTestConfig(t) - testStore2, err := newTestStore(t, Config{ScopeName: "scope2"}) - require.NoError(t, err) + cfg1 := cfg + cfg1.ScopeName = "scope1" + + testStore1 := newTestStoreWithConfig(t, &cfg1) + defer testStore1.Close() + + // create two session stores with different scopes + cfg2 := cfg + cfg2.ScopeName = "scope2" + testStore2 := newTestStoreWithConfig(t, &cfg2) + defer testStore2.Close() // ensure we can put the same key with different values in each scope - err = testStore1.Set(key1, value1, 0) + err := testStore1.Set(key1, value1, 0) require.NoError(t, err) err = testStore2.Set(key1, value2, 0) @@ -185,12 +259,12 @@ func Test_Coherence_With_Scope(t *testing.T) { val, err = testStore2.Get(key1) require.NoError(t, err) require.Equal(t, value2, val) - - require.NoError(t, testStore1.Close()) - require.NoError(t, testStore2.Close()) } func Benchmark_Coherence_Set(b *testing.B) { + testStore := newTestStore(b) + defer testStore.Close() + b.ReportAllocs() b.ResetTimer() @@ -203,6 +277,9 @@ func Benchmark_Coherence_Set(b *testing.B) { } func Benchmark_Coherence_Get(b *testing.B) { + testStore := newTestStore(b) + defer testStore.Close() + err := testStore.Set("john", []byte("doe"), 0) require.NoError(b, err) @@ -217,6 +294,9 @@ func Benchmark_Coherence_Get(b *testing.B) { } func Benchmark_Coherence_SetAndDelete(b *testing.B) { + testStore := newTestStore(b) + defer testStore.Close() + b.ReportAllocs() b.ResetTimer() diff --git a/coherence/go.mod b/coherence/go.mod index da4ca4f2..024f5d82 100644 --- a/coherence/go.mod +++ b/coherence/go.mod @@ -5,23 +5,66 @@ go 1.23.0 require ( github.com/oracle/coherence-go-client/v2 v2.1.0 github.com/stretchr/testify v1.10.0 + github.com/testcontainers/testcontainers-go v0.37.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/kr/text v0.2.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250425173222-7b384671a197 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250428153025-10db94c68c34 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) require ( + dario.cat/mergo v1.0.1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/containerd/platforms v0.2.1 // indirect + github.com/cpuguy83/dockercfg v0.3.2 // indirect + github.com/distribution/reference v0.6.0 // indirect + github.com/docker/docker v28.0.1+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/ebitengine/purego v0.8.2 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/gogo/protobuf v1.3.2 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/kr/pretty v0.1.0 // indirect + github.com/klauspost/compress v1.17.4 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/magiconair/properties v1.8.10 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/patternmatcher v0.6.0 // indirect + github.com/moby/sys/sequential v0.5.0 // indirect + github.com/moby/sys/user v0.1.0 // indirect + github.com/moby/sys/userns v0.1.0 // indirect + github.com/moby/term v0.5.0 // indirect + github.com/morikuni/aec v1.0.0 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.1 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/shirou/gopsutil/v4 v4.25.1 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/sdk v1.35.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect + go.opentelemetry.io/proto/otlp v1.6.0 // indirect + golang.org/x/crypto v0.37.0 // indirect golang.org/x/net v0.39.0 // indirect golang.org/x/sys v0.32.0 // indirect golang.org/x/text v0.24.0 // indirect google.golang.org/grpc v1.72.0 // indirect google.golang.org/protobuf v1.36.6 // indirect - gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect ) diff --git a/coherence/go.sum b/coherence/go.sum index 4b6a7e67..8b520101 100644 --- a/coherence/go.sum +++ b/coherence/go.sum @@ -1,56 +1,192 @@ -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= +github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= +github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v28.0.1+incompatible h1:FCHjSRdXhNRFjlHMTv4jUNlIBbTeRjrWfeFuJp7jpo0= +github.com/docker/docker v28.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I= +github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= +github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= +github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8= github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= +github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= github.com/oracle/coherence-go-client/v2 v2.1.0 h1:EQ9kmwJP9ERA/TtdsIG/mEDyUMm596FxM2pKR+9l1zw= github.com/oracle/coherence-go-client/v2 v2.1.0/go.mod h1:Myuz1GfRntOmNTV2tdFLSFJafmL1Iq1PJiwXZjGCmhI= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= +github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw7Z/PtHS/QzZZ5Ra/hg= +github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= -go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= -go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= -go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= -go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= -go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 h1:1fTNlAIJZGWLP5FVu0fikVry1IsiUnXjf7QFvoNN3Xw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0/go.mod h1:zjPK58DtkqQFn+YUMbx0M2XV3QgKU0gS9LeGohREyK4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= +go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= -go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= -go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/proto/otlp v1.6.0 h1:jQjP+AQyTf+Fe7OKj/MfkDrmK4MNVtw2NpXsf9fefDI= +go.opentelemetry.io/proto/otlp v1.6.0/go.mod h1:cicgGehlFuNdgZkcALOCh3VE6K/u2tAjzlRhDwmVpZc= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250425173222-7b384671a197 h1:29cjnHVylHwTzH66WfFZqgSQgnxzvWE+jvBwpZCLRxY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250425173222-7b384671a197/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/api v0.0.0-20250428153025-10db94c68c34 h1:0PeQib/pH3nB/5pEmFeVQJotzGohV0dq4Vcp09H5yhE= +google.golang.org/genproto/googleapis/api v0.0.0-20250428153025-10db94c68c34/go.mod h1:0awUlEkap+Pb1UMeJwJQQAdJQrt3moU7J2moTy69irI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250428153025-10db94c68c34 h1:h6p3mQqrmT1XkHVTfzLdNz1u7IhINeZkz67/xTbOuWs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250428153025-10db94c68c34/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= google.golang.org/grpc v1.72.0 h1:S7UkcVa60b5AAQTaO6ZKamFp1zMZSU0fGDK2WZLbBnM= google.golang.org/grpc v1.72.0/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= From bf7fc605239d7a1db1601782d8574d4d17da65e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Thu, 1 May 2025 02:27:22 +0200 Subject: [PATCH 135/168] chore: remove coherence from GH actions --- .github/workflows/benchmark.yml | 7 +------ .github/workflows/test-coherence.yml | 18 ++++++++---------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 66e2f4f4..5bbb923e 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -73,12 +73,6 @@ jobs: cd cloudflarekv && npx wrangler dev & npx wait-on tcp:8787 - - name: Install Coherence - if: ${{ matrix.package == 'coherence' }} - run: | - docker run -d -p 1408:1408 -p 30000:30000 ghcr.io/oracle/coherence-ce:22.06.5 - sleep 30 - - name: Install etcd if: ${{ matrix.package == 'etcd' }} run: | @@ -104,6 +98,7 @@ jobs: TEST_ARANGODB_IMAGE: arangodb:latest TEST_AZURITE_IMAGE: mcr.microsoft.com/azure-storage/azurite:latest TEST_CASSANDRA_IMAGE: "cassandra:latest" + TEST_COHERENCE_IMAGE: "ghcr.io/oracle/coherence-ce:25.03.1-graal" TEST_CLICKHOUSE_IMAGE: "clickhouse/clickhouse-server:23-alpine" TEST_COUCHBASE_IMAGE: "couchbase:enterprise-7.6.5" TEST_DYNAMODB_IMAGE: amazon/dynamodb-local:latest diff --git a/.github/workflows/test-coherence.yml b/.github/workflows/test-coherence.yml index e0721370..c026c08c 100644 --- a/.github/workflows/test-coherence.yml +++ b/.github/workflows/test-coherence.yml @@ -20,13 +20,11 @@ jobs: steps: - name: Fetch Repository uses: actions/checkout@v4 - - name: Startup Coherence - run: | - docker run -d -p 1408:1408 -p 30000:30000 ghcr.io/oracle/coherence-ce:25.03 - sleep 30 - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: '${{ matrix.go-version }}' - - name: Run Test - run: cd ./coherence && COHERENCE_SESSION_DEBUG=true go clean -testcache && go test ./... -v -race + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '${{ matrix.go-version }}' + - name: Run Test + env: + TEST_COHERENCE_IMAGE: "ghcr.io/oracle/coherence-ce:25.03.1-graal" + run: cd ./coherence && COHERENCE_SESSION_DEBUG=true go clean -testcache && go test ./... -v -race From 3a1a37e00fe559a3f151ee508b8a0a364839cdab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 May 2025 07:26:27 +0000 Subject: [PATCH 136/168] chore(deps): bump github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue Bumps [github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue](https://github.com/aws/aws-sdk-go-v2) from 1.18.14 to 1.19.0. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.19.0/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.14...v1.19.0) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue dependency-version: 1.19.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- dynamodb/go.mod | 2 +- dynamodb/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dynamodb/go.mod b/dynamodb/go.mod index bb586dc5..bc92a99b 100644 --- a/dynamodb/go.mod +++ b/dynamodb/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.36.3 github.com/aws/aws-sdk-go-v2/config v1.29.14 github.com/aws/aws-sdk-go-v2/credentials v1.17.67 - github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.18.14 + github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.19.0 github.com/aws/aws-sdk-go-v2/service/dynamodb v1.43.1 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 diff --git a/dynamodb/go.sum b/dynamodb/go.sum index 9ccdfadd..b612c4ba 100644 --- a/dynamodb/go.sum +++ b/dynamodb/go.sum @@ -12,8 +12,8 @@ github.com/aws/aws-sdk-go-v2/config v1.29.14 h1:f+eEi/2cKCg9pqKBoAIwRGzVb70MRKqW github.com/aws/aws-sdk-go-v2/config v1.29.14/go.mod h1:wVPHWcIFv3WO89w0rE10gzf17ZYy+UVS1Geq8Iei34g= github.com/aws/aws-sdk-go-v2/credentials v1.17.67 h1:9KxtdcIA/5xPNQyZRgUSpYOE6j9Bc4+D7nZua0KGYOM= github.com/aws/aws-sdk-go-v2/credentials v1.17.67/go.mod h1:p3C44m+cfnbv763s52gCqrjaqyPikj9Sg47kUVaNZQQ= -github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.18.14 h1:Qvnm8jtST/nidLDVHASEEVmB8neXuoA8O7u3if+nGYw= -github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.18.14/go.mod h1:xC/rXqmBJnY3SRUP+qAWg+ryTzDcpiUQiOJGN5in9Dg= +github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.19.0 h1:F3W0YqWZrpCcelbvXMP9LWSTOI620aAq1+8fZ/71TBg= +github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.19.0/go.mod h1:34X+UzFJwsQfyk5U1hYiCO/gv9ZVL+Hh8w+bJQ6+HbU= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mlnXuFrO4cOd3HLBroh1paFw= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 h1:ZK5jHhnrioRkUNOc+hOgQKlUL5JeC3S6JgLxtQ+Rm0Q= From e91e04b166cd6f3c448c3e61f491ba28e5ba4bb6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 May 2025 07:26:36 +0000 Subject: [PATCH 137/168] chore(deps): bump github.com/redis/go-redis/v9 in /redis Bumps [github.com/redis/go-redis/v9](https://github.com/redis/go-redis) from 9.7.3 to 9.8.0. - [Release notes](https://github.com/redis/go-redis/releases) - [Changelog](https://github.com/redis/go-redis/blob/master/CHANGELOG.md) - [Commits](https://github.com/redis/go-redis/compare/v9.7.3...v9.8.0) --- updated-dependencies: - dependency-name: github.com/redis/go-redis/v9 dependency-version: 9.8.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- redis/go.mod | 4 ++-- redis/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/redis/go.mod b/redis/go.mod index 0ab3209e..fa44db03 100644 --- a/redis/go.mod +++ b/redis/go.mod @@ -3,7 +3,7 @@ module github.com/gofiber/storage/redis/v3 go 1.23.0 require ( - github.com/redis/go-redis/v9 v9.7.3 + github.com/redis/go-redis/v9 v9.8.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/redis v0.37.0 @@ -14,7 +14,7 @@ require ( github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect diff --git a/redis/go.sum b/redis/go.sum index e870d7b3..e2c16f0c 100644 --- a/redis/go.sum +++ b/redis/go.sum @@ -12,8 +12,8 @@ github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= @@ -93,8 +93,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/redis/go-redis/v9 v9.7.3 h1:YpPyAayJV+XErNsatSElgRZZVCwXX9QzkKYNvO7x0wM= -github.com/redis/go-redis/v9 v9.7.3/go.mod h1:bGUrSggJ9X9GUmZpZNEOQKaANxSGgOEBRltRTZHSvrA= +github.com/redis/go-redis/v9 v9.8.0 h1:q3nRvjrlge/6UD7eTu/DSg2uYiU2mCL0G/uzBWqhicI= +github.com/redis/go-redis/v9 v9.8.0/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= From 722e242fdfcb43e6804f215e5eed0dbc21265561 Mon Sep 17 00:00:00 2001 From: aliyasirnac Date: Thu, 1 May 2025 17:37:09 +0300 Subject: [PATCH 138/168] changed testStore signature --- surrealdb/surrealdb_test.go | 70 ++++++++++++++----------------------- 1 file changed, 27 insertions(+), 43 deletions(-) diff --git a/surrealdb/surrealdb_test.go b/surrealdb/surrealdb_test.go index 7bf353b8..6b4fd276 100644 --- a/surrealdb/surrealdb_test.go +++ b/surrealdb/surrealdb_test.go @@ -19,7 +19,7 @@ var ( surrealDbPass string = "root" ) -func newTestStore(t testing.TB) (*Storage, error) { +func newTestStore(t testing.TB) *Storage { t.Helper() ctx := context.Background() @@ -32,16 +32,12 @@ func newTestStore(t testing.TB) (*Storage, error) { surrealdb.WithUsername(surrealDbUser), surrealdb.WithPassword(surrealDbPass), ) - if err != nil { - return nil, err - } + require.NoError(t, err) testcontainers.CleanupContainer(t, surrealdbContainer) url, err := surrealdbContainer.URL(ctx) - if err != nil { - return nil, err - } + require.NoError(t, err) return New( Config{ @@ -52,24 +48,22 @@ func newTestStore(t testing.TB) (*Storage, error) { Password: surrealDbPass, DefaultTable: "fiber_storage", }, - ), nil + ) } func Test_Surrealdb_Create(t *testing.T) { - testStore, err := newTestStore(t) - require.NoError(t, err) + testStore := newTestStore(t) defer testStore.Close() - err = testStore.Set("test", []byte("test12345"), 0) + err := testStore.Set("test", []byte("test12345"), 0) require.NoError(t, err) } func Test_Surrealdb_CreateAndGet(t *testing.T) { - testStore, err := newTestStore(t) - require.NoError(t, err) + testStore := newTestStore(t) defer testStore.Close() - err = testStore.Set("test", []byte("test12345"), 0) + err := testStore.Set("test", []byte("test12345"), 0) require.NoError(t, err) get, err := testStore.Get("test") @@ -78,8 +72,7 @@ func Test_Surrealdb_CreateAndGet(t *testing.T) { } func Test_Surrealdb_ListTable(t *testing.T) { - testStore, err := newTestStore(t) - require.NoError(t, err) + testStore := newTestStore(t) defer testStore.Close() bytes, err := testStore.List() @@ -88,11 +81,10 @@ func Test_Surrealdb_ListTable(t *testing.T) { } func Test_Surrealdb_Get_WithNoErr(t *testing.T) { - testStore, err := newTestStore(t) - require.NoError(t, err) + testStore := newTestStore(t) defer testStore.Close() - err = testStore.Set("test", []byte("test1234"), 0) + err := testStore.Set("test", []byte("test1234"), 0) require.NoError(t, err) get, err := testStore.Get("test") @@ -101,11 +93,10 @@ func Test_Surrealdb_Get_WithNoErr(t *testing.T) { } func Test_Surrealdb_Delete(t *testing.T) { - testStore, err := newTestStore(t) - require.NoError(t, err) + testStore := newTestStore(t) defer testStore.Close() - err = testStore.Set("test", []byte("delete1234"), 0) + err := testStore.Set("test", []byte("delete1234"), 0) require.NoError(t, err) err = testStore.Delete("test") @@ -117,11 +108,10 @@ func Test_Surrealdb_Delete(t *testing.T) { } func Test_Surrealdb_Flush(t *testing.T) { - testStore, err := newTestStore(t) - require.NoError(t, err) + testStore := newTestStore(t) defer testStore.Close() - err = testStore.Set("test_key", []byte("test_value"), 0) + err := testStore.Set("test_key", []byte("test_value"), 0) require.NoError(t, err) val, err := testStore.Get("test_key") @@ -137,11 +127,10 @@ func Test_Surrealdb_Flush(t *testing.T) { } func Test_Surrealdb_GetExpired(t *testing.T) { - testStore, err := newTestStore(t) - require.NoError(t, err) + testStore := newTestStore(t) defer testStore.Close() - err = testStore.Set("temp", []byte("value"), 1*time.Second) + err := testStore.Set("temp", []byte("value"), 1*time.Second) require.NoError(t, err) require.Eventually(t, func() bool { @@ -152,8 +141,7 @@ func Test_Surrealdb_GetExpired(t *testing.T) { } func Test_Surrealdb_GetMissing(t *testing.T) { - testStore, err := newTestStore(t) - require.NoError(t, err) + testStore := newTestStore(t) defer testStore.Close() val, err := testStore.Get("non-existent-key") @@ -162,8 +150,7 @@ func Test_Surrealdb_GetMissing(t *testing.T) { } func Test_Surrealdb_ListSkipsExpired(t *testing.T) { - testStore, err := newTestStore(t) - require.NoError(t, err) + testStore := newTestStore(t) defer testStore.Close() _ = testStore.Set("valid", []byte("123"), 0) @@ -183,11 +170,10 @@ func Test_Surrealdb_ListSkipsExpired(t *testing.T) { } func Test_Surrealdb_GarbageCollector_RemovesExpiredKeys(t *testing.T) { - testStore, err := newTestStore(t) - require.NoError(t, err) + testStore := newTestStore(t) defer testStore.Close() - err = testStore.Set("temp_key", []byte("temp_value"), 1*time.Second) + err := testStore.Set("temp_key", []byte("temp_value"), 1*time.Second) require.NoError(t, err) val, err := testStore.Get("temp_key") @@ -204,13 +190,13 @@ func Test_Surrealdb_GarbageCollector_RemovesExpiredKeys(t *testing.T) { } func Benchmark_SurrealDB_Set(b *testing.B) { - testStore, err := newTestStore(b) - require.NoError(b, err) + testStore := newTestStore(b) defer testStore.Close() b.ReportAllocs() b.ResetTimer() + var err error for i := 0; i < b.N; i++ { err = testStore.Set("john", []byte("doe"), 0) } @@ -219,11 +205,10 @@ func Benchmark_SurrealDB_Set(b *testing.B) { } func Benchmark_SurrealDB_Get(b *testing.B) { - testStore, err := newTestStore(b) - require.NoError(b, err) + testStore := newTestStore(b) defer testStore.Close() - err = testStore.Set("john", []byte("doe"), 0) + err := testStore.Set("john", []byte("doe"), 0) require.NoError(b, err) b.ReportAllocs() @@ -237,13 +222,12 @@ func Benchmark_SurrealDB_Get(b *testing.B) { } func Benchmark_SurrealDB_SetAndDelete(b *testing.B) { - testStore, err := newTestStore(b) - require.NoError(b, err) + testStore := newTestStore(b) defer testStore.Close() b.ReportAllocs() b.ResetTimer() - + var err error for i := 0; i < b.N; i++ { testStore.Set("john", []byte("doe"), 0) err = testStore.Delete("john") From 32f7699d7a472d8342b3adc9a49976bf0c49c58e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 May 2025 07:55:34 +0000 Subject: [PATCH 139/168] chore(deps): bump github.com/neo4j/neo4j-go-driver/v5 in /neo4j Bumps [github.com/neo4j/neo4j-go-driver/v5](https://github.com/neo4j/neo4j-go-driver) from 5.28.0 to 5.28.1. - [Release notes](https://github.com/neo4j/neo4j-go-driver/releases) - [Commits](https://github.com/neo4j/neo4j-go-driver/compare/v5.28.0...v5.28.1) --- updated-dependencies: - dependency-name: github.com/neo4j/neo4j-go-driver/v5 dependency-version: 5.28.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- neo4j/go.mod | 2 +- neo4j/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/neo4j/go.mod b/neo4j/go.mod index 9751acbd..7141a6a7 100644 --- a/neo4j/go.mod +++ b/neo4j/go.mod @@ -3,7 +3,7 @@ module github.com/gofiber/storage/neo4j go 1.23.0 require ( - github.com/neo4j/neo4j-go-driver/v5 v5.28.0 + github.com/neo4j/neo4j-go-driver/v5 v5.28.1 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/neo4j v0.37.0 diff --git a/neo4j/go.sum b/neo4j/go.sum index 2a1e5051..40f9bc0e 100644 --- a/neo4j/go.sum +++ b/neo4j/go.sum @@ -73,8 +73,8 @@ github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/neo4j/neo4j-go-driver/v5 v5.28.0 h1:chDT68PHNa8JZRmjSkGzAbk1weLWo4rMtDvccvpobg0= -github.com/neo4j/neo4j-go-driver/v5 v5.28.0/go.mod h1:Vff8OwT7QpLm7L2yYr85XNWe9Rbqlbeb9asNXJTHO4k= +github.com/neo4j/neo4j-go-driver/v5 v5.28.1 h1:RKWQW7wTgYAY2fU9S+9LaJ9OwRPbRc0I17tlT7nDmAY= +github.com/neo4j/neo4j-go-driver/v5 v5.28.1/go.mod h1:Vff8OwT7QpLm7L2yYr85XNWe9Rbqlbeb9asNXJTHO4k= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= From fba083b9de80c7fba2d95c7ef531ef5d07fbd39d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 08:17:49 +0000 Subject: [PATCH 140/168] chore(deps): bump github.com/nats-io/nats.go in /nats Bumps [github.com/nats-io/nats.go](https://github.com/nats-io/nats.go) from 1.41.2 to 1.42.0. - [Release notes](https://github.com/nats-io/nats.go/releases) - [Commits](https://github.com/nats-io/nats.go/compare/v1.41.2...v1.42.0) --- updated-dependencies: - dependency-name: github.com/nats-io/nats.go dependency-version: 1.42.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- nats/go.mod | 2 +- nats/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nats/go.mod b/nats/go.mod index 7d8fa7e8..a5d56a62 100644 --- a/nats/go.mod +++ b/nats/go.mod @@ -4,7 +4,7 @@ go 1.23.0 require ( github.com/mdelapenya/tlscert v0.2.0 - github.com/nats-io/nats.go v1.41.2 + github.com/nats-io/nats.go v1.42.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/nats v0.37.0 diff --git a/nats/go.sum b/nats/go.sum index 184c83b9..14d7b22f 100644 --- a/nats/go.sum +++ b/nats/go.sum @@ -75,8 +75,8 @@ github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/nats-io/nats.go v1.41.2 h1:5UkfLAtu/036s99AhFRlyNDI1Ieylb36qbGjJzHixos= -github.com/nats-io/nats.go v1.41.2/go.mod h1:iRWIPokVIFbVijxuMQq4y9ttaBTMe0SFdlZfMDd+33g= +github.com/nats-io/nats.go v1.42.0 h1:ynIMupIOvf/ZWH/b2qda6WGKGNSjwOUutTpWRvAmhaM= +github.com/nats-io/nats.go v1.42.0/go.mod h1:iRWIPokVIFbVijxuMQq4y9ttaBTMe0SFdlZfMDd+33g= github.com/nats-io/nkeys v0.4.11 h1:q44qGV008kYd9W1b1nEBkNzvnWxtRSQ7A8BoqRrcfa0= github.com/nats-io/nkeys v0.4.11/go.mod h1:szDimtgmfOi9n25JpfIdGw12tZFYXqhGxjhVxsatHVE= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= From d0e25aa2316d2bf21f1f2fe498baf5eafe0f5709 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 07:31:23 +0000 Subject: [PATCH 141/168] chore(deps): bump github.com/aerospike/aerospike-client-go/v8 Bumps [github.com/aerospike/aerospike-client-go/v8](https://github.com/aerospike/aerospike-client-go) from 8.2.1 to 8.2.2. - [Release notes](https://github.com/aerospike/aerospike-client-go/releases) - [Changelog](https://github.com/aerospike/aerospike-client-go/blob/v8/CHANGELOG.md) - [Commits](https://github.com/aerospike/aerospike-client-go/compare/v8.2.1...v8.2.2) --- updated-dependencies: - dependency-name: github.com/aerospike/aerospike-client-go/v8 dependency-version: 8.2.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- aerospike/go.mod | 2 +- aerospike/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aerospike/go.mod b/aerospike/go.mod index 947f33e4..17daaf9e 100644 --- a/aerospike/go.mod +++ b/aerospike/go.mod @@ -3,7 +3,7 @@ module github.com/gofiber/storage/aerospike go 1.23.0 require ( - github.com/aerospike/aerospike-client-go/v8 v8.2.1 + github.com/aerospike/aerospike-client-go/v8 v8.2.2 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/aerospike v0.37.0 diff --git a/aerospike/go.sum b/aerospike/go.sum index 3a796d22..a211c285 100644 --- a/aerospike/go.sum +++ b/aerospike/go.sum @@ -6,8 +6,8 @@ github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEK github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/aerospike/aerospike-client-go/v8 v8.2.1 h1:Vxp+E1Sj+r5o67x+BP8FE07DVwo7x1AHWzfnQU1wzIU= -github.com/aerospike/aerospike-client-go/v8 v8.2.1/go.mod h1:H6CzKDoHxBj1yY/oQPci1bUIbEx2ATQtJ2GtZ+N64Wg= +github.com/aerospike/aerospike-client-go/v8 v8.2.2 h1:NV1GxB+ATUb1cQtwaIS731A/6EkwuAX4/heh8CpvQOI= +github.com/aerospike/aerospike-client-go/v8 v8.2.2/go.mod h1:H6CzKDoHxBj1yY/oQPci1bUIbEx2ATQtJ2GtZ+N64Wg= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= From ca3a52c65b64d29c2adea7a0d04f95e270747bbd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 07:32:20 +0000 Subject: [PATCH 142/168] chore(deps): bump github.com/aws/aws-sdk-go-v2/feature/s3/manager in /s3 Bumps [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) from 1.17.74 to 1.17.75. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/feature/s3/manager/v1.17.74...feature/s3/manager/v1.17.75) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager dependency-version: 1.17.75 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- s3/go.mod | 2 +- s3/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/s3/go.mod b/s3/go.mod index 476f6423..69d4b31a 100644 --- a/s3/go.mod +++ b/s3/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.36.3 github.com/aws/aws-sdk-go-v2/config v1.29.14 github.com/aws/aws-sdk-go-v2/credentials v1.17.67 - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.74 + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.75 github.com/aws/aws-sdk-go-v2/service/s3 v1.79.3 github.com/aws/smithy-go v1.22.3 github.com/stretchr/testify v1.10.0 diff --git a/s3/go.sum b/s3/go.sum index 3a0dea28..8b1537ef 100644 --- a/s3/go.sum +++ b/s3/go.sum @@ -16,8 +16,8 @@ github.com/aws/aws-sdk-go-v2/credentials v1.17.67 h1:9KxtdcIA/5xPNQyZRgUSpYOE6j9 github.com/aws/aws-sdk-go-v2/credentials v1.17.67/go.mod h1:p3C44m+cfnbv763s52gCqrjaqyPikj9Sg47kUVaNZQQ= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mlnXuFrO4cOd3HLBroh1paFw= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.74 h1:+1lc5oMFFHlVBclPXQf/POqlvdpBzjLaN2c3ujDCcZw= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.74/go.mod h1:EiskBoFr4SpYnFIbw8UM7DP7CacQXDHEmJqLI1xpRFI= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.75 h1:S61/E3N01oral6B3y9hZ2E1iFDqCZPPOBoBQretCnBI= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.75/go.mod h1:bDMQbkI1vJbNjnvJYpPTSNYBkI/VIv18ngWb/K84tkk= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 h1:ZK5jHhnrioRkUNOc+hOgQKlUL5JeC3S6JgLxtQ+Rm0Q= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34/go.mod h1:p4VfIceZokChbA9FzMbRGz5OV+lekcVtHlPKEO0gSZY= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 h1:SZwFm17ZUNNg5Np0ioo/gq8Mn6u9w19Mri8DnJ15Jf0= From 7b2d4bb285861e382841b8647352a4be175c9154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 7 May 2025 05:57:21 +0200 Subject: [PATCH 143/168] chore: add healthcheck to coherence --- coherence/coherence_test.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/coherence/coherence_test.go b/coherence/coherence_test.go index 44e4e611..e48fa397 100644 --- a/coherence/coherence_test.go +++ b/coherence/coherence_test.go @@ -28,6 +28,10 @@ const ( coherenceImageEnvVar string = "TEST_COHERENCE_IMAGE" coherencePort = "1408/tcp" coherencePort2 = "30000/tcp" + + // configuration for the health check + coherenceHealthEnvVar = "COHERENCE_HEALTH_HTTP_PORT" + coherenceHealthPort = "6676" ) func newTestConfig(t testing.TB) Config { @@ -42,10 +46,15 @@ func newTestConfig(t testing.TB) Config { c, err := testcontainers.Run(ctx, img, - testcontainers.WithExposedPorts(coherencePort, coherencePort2), + testcontainers.WithExposedPorts(coherencePort, coherencePort2, coherenceHealthPort), + testcontainers.WithEnv(map[string]string{ + coherenceHealthEnvVar: coherenceHealthPort, + }), testcontainers.WithWaitStrategy( wait.ForListeningPort(coherencePort), wait.ForListeningPort(coherencePort2), + wait.ForListeningPort(coherenceHealthPort+"/tcp"), + wait.ForHTTP("/ready").WithPort(coherenceHealthPort+"/tcp").WithStartupTimeout(time.Second*30), ), ) testcontainers.CleanupContainer(t, c) From adc1376cc62315d1eddeff73b57bb591cb70c301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 7 May 2025 06:17:23 +0200 Subject: [PATCH 144/168] fix: lint --- coherence/coherence.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coherence/coherence.go b/coherence/coherence.go index e3fa6dc8..fcf7e5c2 100644 --- a/coherence/coherence.go +++ b/coherence/coherence.go @@ -7,8 +7,9 @@ import ( "context" "crypto/tls" "fmt" - coh "github.com/oracle/coherence-go-client/v2/coherence" "time" + + coh "github.com/oracle/coherence-go-client/v2/coherence" ) const ( From af5649d1a7c1f3b1fbf2d9a0553cba10af40b062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 7 May 2025 06:23:44 +0200 Subject: [PATCH 145/168] fix: suppress session debug logs --- coherence/coherence_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/coherence/coherence_test.go b/coherence/coherence_test.go index e48fa397..a0ff2453 100644 --- a/coherence/coherence_test.go +++ b/coherence/coherence_test.go @@ -37,6 +37,13 @@ const ( func newTestConfig(t testing.TB) Config { t.Helper() + // The coherence client adds debug messages to stdout, which corrupt + // the output of the benchmarks. See "[Coherence Client Debug]" for + // more information. + // + // [Coherence Client Debug]: https://github.com/oracle/coherence-go-client/blob/6383df14821ecf7c1ecd5f33a2c2fd402102d797/coherence/session.go#L195 + t.Setenv("COHERENCE_SESSION_DEBUG", "false") + img := coherenceImage if imgFromEnv := os.Getenv(coherenceImageEnvVar); imgFromEnv != "" { img = imgFromEnv From 8f0819b1c54df5a8a43a6531bc78fa9b59a96526 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 07:19:49 +0000 Subject: [PATCH 146/168] chore(deps): bump github.com/microsoft/go-mssqldb in /mssql Bumps [github.com/microsoft/go-mssqldb](https://github.com/microsoft/go-mssqldb) from 1.8.0 to 1.8.1. - [Release notes](https://github.com/microsoft/go-mssqldb/releases) - [Changelog](https://github.com/microsoft/go-mssqldb/blob/main/CHANGELOG.md) - [Commits](https://github.com/microsoft/go-mssqldb/compare/v1.8.0...v1.8.1) --- updated-dependencies: - dependency-name: github.com/microsoft/go-mssqldb dependency-version: 1.8.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- mssql/go.mod | 2 +- mssql/go.sum | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mssql/go.mod b/mssql/go.mod index e0a30a9b..6069b4b8 100644 --- a/mssql/go.mod +++ b/mssql/go.mod @@ -3,7 +3,7 @@ module github.com/gofiber/storage/mssql/v2 go 1.19 require ( - github.com/microsoft/go-mssqldb v1.8.0 + github.com/microsoft/go-mssqldb v1.8.1 github.com/stretchr/testify v1.10.0 ) diff --git a/mssql/go.sum b/mssql/go.sum index 9cb3d65c..ba371c22 100644 --- a/mssql/go.sum +++ b/mssql/go.sum @@ -6,7 +6,7 @@ github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 h1:D3occ github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= +github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA= github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A= @@ -14,8 +14,8 @@ github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EO github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/microsoft/go-mssqldb v1.8.0 h1:7cyZ/AT7ycDsEoWPIXibd+aVKFtteUNhDGf3aobP+tw= -github.com/microsoft/go-mssqldb v1.8.0/go.mod h1:6znkekS3T2vp0waiMhen4GPU1BiAsrP+iXHcE7a7rFo= +github.com/microsoft/go-mssqldb v1.8.1 h1:/LPVjSb992vTa8CMVvliTMT//UAKj/jpe1xb/jJBjIk= +github.com/microsoft/go-mssqldb v1.8.1/go.mod h1:vp38dT33FGfVotRiTmDo3bFyaHq+p3LektQrjTULowo= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= From f5f112f987a9b93b0b22e5844ba29c9dda823454 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 07:42:09 +0000 Subject: [PATCH 147/168] chore(deps): bump dependabot/fetch-metadata from 2.3.0 to 2.4.0 Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 2.3.0 to 2.4.0. - [Release notes](https://github.com/dependabot/fetch-metadata/releases) - [Commits](https://github.com/dependabot/fetch-metadata/compare/v2.3.0...v2.4.0) --- updated-dependencies: - dependency-name: dependabot/fetch-metadata dependency-version: 2.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/dependabot_automerge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependabot_automerge.yml b/.github/workflows/dependabot_automerge.yml index f3307b9e..243b9497 100644 --- a/.github/workflows/dependabot_automerge.yml +++ b/.github/workflows/dependabot_automerge.yml @@ -28,7 +28,7 @@ jobs: steps: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@v2.3.0 + uses: dependabot/fetch-metadata@v2.4.0 with: github-token: "${{ secrets.PR_TOKEN }}" - name: Enable auto-merge for Dependabot PRs From b703f5f64ca2fe2c3fd56861db939de463ed99ee Mon Sep 17 00:00:00 2001 From: Tim Middleton Date: Tue, 13 May 2025 08:20:28 +0800 Subject: [PATCH 148/168] Update coherence storage to v2.2.0 --- coherence/go.mod | 2 +- coherence/go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/coherence/go.mod b/coherence/go.mod index 024f5d82..58f5e07b 100644 --- a/coherence/go.mod +++ b/coherence/go.mod @@ -3,7 +3,7 @@ module github.com/gofiber/storage/coherence go 1.23.0 require ( - github.com/oracle/coherence-go-client/v2 v2.1.0 + github.com/oracle/coherence-go-client/v2 v2.2.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 ) diff --git a/coherence/go.sum b/coherence/go.sum index 8b520101..c9533416 100644 --- a/coherence/go.sum +++ b/coherence/go.sum @@ -83,6 +83,8 @@ github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJw github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= github.com/oracle/coherence-go-client/v2 v2.1.0 h1:EQ9kmwJP9ERA/TtdsIG/mEDyUMm596FxM2pKR+9l1zw= github.com/oracle/coherence-go-client/v2 v2.1.0/go.mod h1:Myuz1GfRntOmNTV2tdFLSFJafmL1Iq1PJiwXZjGCmhI= +github.com/oracle/coherence-go-client/v2 v2.2.0 h1:ZO8tsN8Z4JTFGnoERez+rYYlQAyH7g1MwSY5THG7c+o= +github.com/oracle/coherence-go-client/v2 v2.2.0/go.mod h1:IUOIVsyaeccST2AZa/F3/PpY8uukF5Sy3Ko79pqleO0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= From b366427f963a36368e4b701d4de822df545a4109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Tue, 13 May 2025 11:52:35 +0200 Subject: [PATCH 149/168] fix(coherence): set coherence log level to ERROR in benchmarks --- .github/workflows/benchmark.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index f9260ced..1f3b6fe7 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -111,6 +111,7 @@ jobs: TEST_REDIS_IMAGE: "docker.io/redis:7" TEST_SCYLLADB_IMAGE: "scylladb/scylla:6.2" TEST_SURREALDB_IMAGE: "surrealdb/surrealdb:latest" + COHERENCE_LOG_LEVEL: "ERROR" - name: Get Previous Benchmark Results uses: actions/cache@v4 From 7faca3f2d021f38ca686af74b5c6c2330a732114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Tue, 13 May 2025 12:10:52 +0200 Subject: [PATCH 150/168] chore: make sure the client gets the variable locally --- coherence/coherence_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/coherence/coherence_test.go b/coherence/coherence_test.go index a0ff2453..c9e12188 100644 --- a/coherence/coherence_test.go +++ b/coherence/coherence_test.go @@ -278,6 +278,8 @@ func Test_Coherence_With_Scope(t *testing.T) { } func Benchmark_Coherence_Set(b *testing.B) { + b.Setenv("COHERENCE_LOG_LEVEL", "ERROR") + testStore := newTestStore(b) defer testStore.Close() @@ -293,6 +295,8 @@ func Benchmark_Coherence_Set(b *testing.B) { } func Benchmark_Coherence_Get(b *testing.B) { + b.Setenv("COHERENCE_LOG_LEVEL", "ERROR") + testStore := newTestStore(b) defer testStore.Close() @@ -310,6 +314,8 @@ func Benchmark_Coherence_Get(b *testing.B) { } func Benchmark_Coherence_SetAndDelete(b *testing.B) { + b.Setenv("COHERENCE_LOG_LEVEL", "ERROR") + testStore := newTestStore(b) defer testStore.Close() From a77e60ff9fbe61f86b94c62fcf6d9bda51a91c10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 30 Apr 2025 14:40:41 +0200 Subject: [PATCH 151/168] chore: add tests for the helper module --- .github/workflows/test-teshelpers-redis.yml | 36 ++++ testhelpers/redis/redis_test.go | 192 ++++++++++++++++++++ 2 files changed, 228 insertions(+) create mode 100644 .github/workflows/test-teshelpers-redis.yml create mode 100644 testhelpers/redis/redis_test.go diff --git a/.github/workflows/test-teshelpers-redis.yml b/.github/workflows/test-teshelpers-redis.yml new file mode 100644 index 00000000..d8a5e0c6 --- /dev/null +++ b/.github/workflows/test-teshelpers-redis.yml @@ -0,0 +1,36 @@ +on: + push: + branches: + - master + - main + paths: + - 'testhelpers/redis/**' + pull_request: + paths: + - 'testhelpers/redis/**' +name: "Tests TestHelper Redis" +jobs: + Tests: + runs-on: ubuntu-latest + strategy: + matrix: + go-version: + - 1.23.x + - 1.24.x + redis: + - '6' + - '7' + steps: + - name: Fetch Repository + uses: actions/checkout@v4 + + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '${{ matrix.go-version }}' + + - name: Run Test + env: + TEST_REDIS_IMAGE: "docker.io/redis:${{ matrix.redis }}" + working-directory: testhelpers/redis + run: go test ./... -v -race diff --git a/testhelpers/redis/redis_test.go b/testhelpers/redis/redis_test.go new file mode 100644 index 00000000..7e04fdf6 --- /dev/null +++ b/testhelpers/redis/redis_test.go @@ -0,0 +1,192 @@ +package testredis + +import ( + "strings" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestStart(t *testing.T) { + t.Run("default-configuration", func(t *testing.T) { + ctr := Start(t) + require.NotEmpty(t, ctr.URL) + require.True(t, strings.HasPrefix(ctr.URL, "redis://")) + require.Nil(t, ctr.TLSConfig) + require.Empty(t, ctr.Addrs) + require.Empty(t, ctr.Host) + require.Zero(t, ctr.Port) + }) + + t.Run("with-custom-image", func(t *testing.T) { + customImage := "docker.io/redis:6" + ctr := Start(t, WithImage(customImage)) + require.True(t, strings.HasPrefix(ctr.URL, "redis://")) + require.Nil(t, ctr.TLSConfig) + require.Empty(t, ctr.Addrs) + require.Empty(t, ctr.Host) + require.Zero(t, ctr.Port) + }) + + t.Run("with-image-from-env", func(t *testing.T) { + envImage := "docker.io/redis:7" + t.Setenv(ImageEnvVar, envImage) + + ctr := Start(t) + require.True(t, strings.HasPrefix(ctr.URL, "redis://")) + require.Nil(t, ctr.TLSConfig) + require.Empty(t, ctr.Addrs) + require.Empty(t, ctr.Host) + require.Zero(t, ctr.Port) + }) + + t.Run("with-tls", func(t *testing.T) { + t.Run("secure-url", func(t *testing.T) { + t.Run("mtls-disabled", func(t *testing.T) { + t.Parallel() + + ctr := Start(t, WithTLS(true, false)) + require.NotEmpty(t, ctr.URL) + require.True(t, strings.HasPrefix(ctr.URL, "rediss://")) + require.NotNil(t, ctr.TLSConfig) + require.Empty(t, ctr.Addrs) + require.Empty(t, ctr.Host) + require.Zero(t, ctr.Port) + }) + + t.Run("mtls-enabled", func(t *testing.T) { + t.Parallel() + + ctr := Start(t, WithTLS(true, true)) + require.NotEmpty(t, ctr.URL) + require.True(t, strings.HasPrefix(ctr.URL, "rediss://")) + require.NotNil(t, ctr.TLSConfig) + }) + }) + + t.Run("insecure-url", func(t *testing.T) { + t.Run("mtls-disabled", func(t *testing.T) { + t.Parallel() + + ctr := Start(t, WithTLS(false, true)) + require.NotEmpty(t, ctr.URL) + require.True(t, strings.HasPrefix(ctr.URL, "redis://")) + require.NotNil(t, ctr.TLSConfig) + require.Empty(t, ctr.Addrs) + require.Empty(t, ctr.Host) + require.Zero(t, ctr.Port) + }) + + t.Run("mtls-enabled", func(t *testing.T) { + t.Parallel() + + ctr := Start(t, WithTLS(false, false)) + require.NotEmpty(t, ctr.URL) + require.True(t, strings.HasPrefix(ctr.URL, "redis://")) + require.NotNil(t, ctr.TLSConfig) + require.Empty(t, ctr.Addrs) + require.Empty(t, ctr.Host) + require.Zero(t, ctr.Port) + }) + }) + }) + + t.Run("with-host-and-port", func(t *testing.T) { + t.Parallel() + + ctr := Start(t, WithHostPort()) + require.NotEmpty(t, ctr.Host) + require.NotZero(t, ctr.Port) + require.NotEmpty(t, ctr.URL) + require.Empty(t, ctr.Addrs) + }) + + t.Run("with-address", func(t *testing.T) { + t.Parallel() + + ctr := Start(t, WithAddress()) + require.NotEmpty(t, ctr.Addrs) + require.Len(t, ctr.Addrs, 1) + require.NotEmpty(t, ctr.URL) + require.Empty(t, ctr.Host) + require.Zero(t, ctr.Port) + }) + + t.Run("with-url", func(t *testing.T) { + t.Parallel() + + ctr := Start(t, WithURL(true)) + require.NotEmpty(t, ctr.URL) + require.True(t, strings.HasPrefix(ctr.URL, "redis://")) + }) + + t.Run("with-multiple-options", func(t *testing.T) { + t.Run("address/url", func(t *testing.T) { + t.Run("no-tls", func(t *testing.T) { + t.Parallel() + + ctr := Start(t, + WithAddress(), + WithURL(true), + ) + require.NotEmpty(t, ctr.URL) + require.True(t, strings.HasPrefix(ctr.URL, "redis://")) + require.NotEmpty(t, ctr.Addrs) + require.Len(t, ctr.Addrs, 1) + require.Empty(t, ctr.Host) + require.Zero(t, ctr.Port) + }) + + t.Run("tls", func(t *testing.T) { + t.Parallel() + + ctr := Start(t, + WithTLS(true, false), + WithAddress(), + WithURL(true), + ) + require.NotEmpty(t, ctr.URL) + require.True(t, strings.HasPrefix(ctr.URL, "rediss://")) + require.NotEmpty(t, ctr.Addrs) + require.Len(t, ctr.Addrs, 1) + require.Empty(t, ctr.Host) + require.Zero(t, ctr.Port) + }) + }) + }) +} + +func TestConfig(t *testing.T) { + t.Run("with-tls", func(t *testing.T) { + config := &Config{} + WithTLS(true, false)(config) + require.True(t, config.UseTLS) + require.True(t, config.SecureURL) + require.False(t, config.MTLSDisabled) + }) + + t.Run("with-address", func(t *testing.T) { + config := &Config{} + WithAddress()(config) + require.True(t, config.UseAddress) + }) + + t.Run("with-host-port", func(t *testing.T) { + config := &Config{} + WithHostPort()(config) + require.True(t, config.UseHostPort) + }) + + t.Run("with-url", func(t *testing.T) { + config := &Config{} + WithURL(true)(config) + require.True(t, config.UseURL) + }) + + t.Run("with-image", func(t *testing.T) { + customImage := "docker.io/redis:6" + config := &Config{} + WithImage(customImage)(config) + require.Equal(t, customImage, config.Image) + }) +} From 3db82583cc20bd0a1d8b7fdf4599ad7ae2430189 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 May 2025 08:01:14 +0000 Subject: [PATCH 152/168] chore(deps): bump github.com/jackc/pgx/v5 in /postgres Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.7.4 to 5.7.5. - [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md) - [Commits](https://github.com/jackc/pgx/compare/v5.7.4...v5.7.5) --- updated-dependencies: - dependency-name: github.com/jackc/pgx/v5 dependency-version: 5.7.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- postgres/go.mod | 2 +- postgres/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/postgres/go.mod b/postgres/go.mod index ed8ae681..076235be 100644 --- a/postgres/go.mod +++ b/postgres/go.mod @@ -3,7 +3,7 @@ module github.com/gofiber/storage/postgres/v3 go 1.23.0 require ( - github.com/jackc/pgx/v5 v5.7.4 + github.com/jackc/pgx/v5 v5.7.5 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/postgres v0.37.0 diff --git a/postgres/go.sum b/postgres/go.sum index 0631ecf3..cc0fc37f 100644 --- a/postgres/go.sum +++ b/postgres/go.sum @@ -51,8 +51,8 @@ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsI github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= -github.com/jackc/pgx/v5 v5.7.4 h1:9wKznZrhWa2QiHL+NjTSPP6yjl3451BX3imWDnokYlg= -github.com/jackc/pgx/v5 v5.7.4/go.mod h1:ncY89UGWxg82EykZUwSpUKEfccBGGYq1xjrOpsbsfGQ= +github.com/jackc/pgx/v5 v5.7.5 h1:JHGfMnQY+IEtGM63d+NGMjoRpysB2JBwDr5fsngwmJs= +github.com/jackc/pgx/v5 v5.7.5/go.mod h1:aruU7o91Tc2q2cFp5h4uP3f6ztExVpyVv88Xl/8Vl8M= github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= From 24f8717aa08ce73dab292b171c788167fea5cada Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 May 2025 08:01:22 +0000 Subject: [PATCH 153/168] chore(deps): bump github.com/valkey-io/valkey-go in /valkey Bumps [github.com/valkey-io/valkey-go](https://github.com/valkey-io/valkey-go) from 1.0.59 to 1.0.60. - [Release notes](https://github.com/valkey-io/valkey-go/releases) - [Commits](https://github.com/valkey-io/valkey-go/compare/v1.0.59...v1.0.60) --- updated-dependencies: - dependency-name: github.com/valkey-io/valkey-go dependency-version: 1.0.60 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- valkey/go.mod | 2 +- valkey/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/valkey/go.mod b/valkey/go.mod index c30c95d8..1f6c668b 100644 --- a/valkey/go.mod +++ b/valkey/go.mod @@ -4,7 +4,7 @@ go 1.23.0 require ( github.com/stretchr/testify v1.10.0 - github.com/valkey-io/valkey-go v1.0.59 + github.com/valkey-io/valkey-go v1.0.60 ) require ( diff --git a/valkey/go.sum b/valkey/go.sum index 6ee70fdf..9f95969b 100644 --- a/valkey/go.sum +++ b/valkey/go.sum @@ -12,8 +12,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/valkey-io/valkey-go v1.0.59 h1:W67Z0UY+Qqk3k8NKkFCFlM3X4yQUniixl7dSJAch2Qo= -github.com/valkey-io/valkey-go v1.0.59/go.mod h1:bHmwjIEOrGq/ubOJfh5uMRs7Xj6mV3mQ/ZXUbmqpjqY= +github.com/valkey-io/valkey-go v1.0.60 h1:idh959D20H5n7D/kwEdTKNaMn5+4HpZTn7bLXnAhQIw= +github.com/valkey-io/valkey-go v1.0.60/go.mod h1:bHmwjIEOrGq/ubOJfh5uMRs7Xj6mV3mQ/ZXUbmqpjqY= golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= From 093d2519c77d64506fd0c33091e8f9db7e8a7dd8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 May 2025 07:42:14 +0000 Subject: [PATCH 154/168] chore(deps): bump github.com/minio/minio-go/v7 in /minio Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.91 to 7.0.92. - [Release notes](https://github.com/minio/minio-go/releases) - [Commits](https://github.com/minio/minio-go/compare/v7.0.91...v7.0.92) --- updated-dependencies: - dependency-name: github.com/minio/minio-go/v7 dependency-version: 7.0.92 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- minio/go.mod | 4 +++- minio/go.sum | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/minio/go.mod b/minio/go.mod index 6da3eda4..c9754df8 100644 --- a/minio/go.mod +++ b/minio/go.mod @@ -3,7 +3,7 @@ module github.com/gofiber/storage/minio go 1.23.0 require ( - github.com/minio/minio-go/v7 v7.0.91 + github.com/minio/minio-go/v7 v7.0.92 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/minio v0.37.0 @@ -49,12 +49,14 @@ require ( github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect + github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/rs/xid v1.6.0 // indirect github.com/shirou/gopsutil/v4 v4.25.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect + github.com/tinylib/msgp v1.3.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect diff --git a/minio/go.sum b/minio/go.sum index b3547968..c21b8acb 100644 --- a/minio/go.sum +++ b/minio/go.sum @@ -72,8 +72,8 @@ github.com/minio/crc64nvme v1.0.1 h1:DHQPrYPdqK7jQG/Ls5CTBZWeex/2FMS3G5XGkycuFrY github.com/minio/crc64nvme v1.0.1/go.mod h1:eVfm2fAzLlxMdUGc0EEBGSMmPwmXD5XiNRpnu9J3bvg= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.91 h1:tWLZnEfo3OZl5PoXQwcwTAPNNrjyWwOh6cbZitW5JQc= -github.com/minio/minio-go/v7 v7.0.91/go.mod h1:uvMUcGrpgeSAAI6+sD3818508nUyMULw94j2Nxku/Go= +github.com/minio/minio-go/v7 v7.0.92 h1:jpBFWyRS3p8P/9tsRc+NuvqoFi7qAmTCFPoRFmobbVw= +github.com/minio/minio-go/v7 v7.0.92/go.mod h1:vTIc8DNcnAZIhyFsk8EB90AbPjj3j68aWIEQCiPj7d0= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= @@ -92,6 +92,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c h1:dAMKvw0MlJT1GshSTtih8C2gDs04w8dReiOGXrGLNoY= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -116,6 +118,8 @@ github.com/testcontainers/testcontainers-go v0.37.0 h1:L2Qc0vkTw2EHWQ08djon0D2uw github.com/testcontainers/testcontainers-go v0.37.0/go.mod h1:QPzbxZhQ6Bclip9igjLFj6z0hs01bU8lrl2dHQmgFGM= github.com/testcontainers/testcontainers-go/modules/minio v0.37.0 h1:p2LXViCDHBP0JfVfT9hDxkbTxv+BzAL5ZYOF8sj1q1I= github.com/testcontainers/testcontainers-go/modules/minio v0.37.0/go.mod h1:OhJqQ9L2FOnb/otqLbjskhj7utl1Z5RFt2k6mhG9aeI= +github.com/tinylib/msgp v1.3.0 h1:ULuf7GPooDaIlbyvgAxBV/FI7ynli6LZ1/nVUNu+0ww= +github.com/tinylib/msgp v1.3.0/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= From fc3a3a91dcfdecb008dad09f4c76ec7b2d4bce00 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 07:29:07 +0000 Subject: [PATCH 155/168] chore(deps): bump github.com/ClickHouse/clickhouse-go/v2 in /clickhouse Bumps [github.com/ClickHouse/clickhouse-go/v2](https://github.com/ClickHouse/clickhouse-go) from 2.34.0 to 2.35.0. - [Release notes](https://github.com/ClickHouse/clickhouse-go/releases) - [Changelog](https://github.com/ClickHouse/clickhouse-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/ClickHouse/clickhouse-go/compare/v2.34.0...v2.35.0) --- updated-dependencies: - dependency-name: github.com/ClickHouse/clickhouse-go/v2 dependency-version: 2.35.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- clickhouse/go.mod | 11 ++++++----- clickhouse/go.sum | 44 ++++++++++++++++++++++++-------------------- 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/clickhouse/go.mod b/clickhouse/go.mod index aeb024bf..94220bd8 100644 --- a/clickhouse/go.mod +++ b/clickhouse/go.mod @@ -3,7 +3,7 @@ module github.com/gofiber/storage/clickhouse go 1.23.0 require ( - github.com/ClickHouse/clickhouse-go/v2 v2.34.0 + github.com/ClickHouse/clickhouse-go/v2 v2.35.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/clickhouse v0.37.0 @@ -12,7 +12,7 @@ require ( require ( dario.cat/mergo v1.0.1 // indirect github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect - github.com/ClickHouse/ch-go v0.65.1 // indirect + github.com/ClickHouse/ch-go v0.66.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/andybalholm/brotli v1.1.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect @@ -21,7 +21,7 @@ require ( github.com/cpuguy83/dockercfg v0.3.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/docker/docker v28.0.4+incompatible // indirect + github.com/docker/docker v28.1.1+incompatible // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.8.2 // indirect @@ -38,6 +38,7 @@ require ( github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 // indirect github.com/magiconair/properties v1.8.10 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/go-archive v0.1.0 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.6.0 // indirect github.com/moby/sys/user v0.4.0 // indirect @@ -63,7 +64,7 @@ require ( go.opentelemetry.io/otel v1.35.0 // indirect go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect - golang.org/x/crypto v0.37.0 // indirect - golang.org/x/sys v0.32.0 // indirect + golang.org/x/crypto v0.38.0 // indirect + golang.org/x/sys v0.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/clickhouse/go.sum b/clickhouse/go.sum index e4edf18e..c9ba45b4 100644 --- a/clickhouse/go.sum +++ b/clickhouse/go.sum @@ -1,13 +1,13 @@ dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= -github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 h1:He8afgbRMd7mFxO99hRNu+6tazq8nFF9lIwo9JFroBk= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/ClickHouse/ch-go v0.65.1 h1:SLuxmLl5Mjj44/XbINsK2HFvzqup0s6rwKLFH347ZhU= -github.com/ClickHouse/ch-go v0.65.1/go.mod h1:bsodgURwmrkvkBe5jw1qnGDgyITsYErfONKAHn05nv4= -github.com/ClickHouse/clickhouse-go/v2 v2.34.0 h1:Y4rqkdrRHgExvC4o/NTbLdY5LFQ3LHS77/RNFxFX3Co= -github.com/ClickHouse/clickhouse-go/v2 v2.34.0/go.mod h1:yioSINoRLVZkLyDzdMXPLRIqhDvel8iLBlwh6Iefso8= +github.com/ClickHouse/ch-go v0.66.0 h1:hLslxxAVb2PHpbHr4n0d6aP8CEIpUYGMVT1Yj/Q5Img= +github.com/ClickHouse/ch-go v0.66.0/go.mod h1:noiHWyLMJAZ5wYuq3R/K0TcRhrNA8h7o1AqHX0klEhM= +github.com/ClickHouse/clickhouse-go/v2 v2.35.0 h1:ZMLZqxu+NiW55f4JS32kzyEbMb7CthGn3ziCcULOvSE= +github.com/ClickHouse/clickhouse-go/v2 v2.35.0/go.mod h1:O2FFT/rugdpGEW2VKyEGyMUWyQU0ahmenY9/emxLPxs= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA= @@ -27,8 +27,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v28.0.4+incompatible h1:JNNkBctYKurkw6FrHfKqY0nKIDf5nrbxjVBtS+cdcok= -github.com/docker/docker v28.0.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v28.1.1+incompatible h1:49M11BFLsVO1gxY9UX9p/zwkE/rswggs8AdFmXQw51I= +github.com/docker/docker v28.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -79,8 +79,12 @@ github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8S github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/go-archive v0.1.0 h1:Kk/5rdW/g+H8NHdJW2gsXyZ7UnzvJNOy6VKJqueWdcQ= +github.com/moby/go-archive v0.1.0/go.mod h1:G9B+YoujNohJmrIYFBpSd54GTUB4lt9S+xVQvsJyFuo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/sys/atomicwriter v0.1.0 h1:kw5D/EqkBwsBFi0ss9v1VG3wIkVhzGvLklJ+w3A14Sw= +github.com/moby/sys/atomicwriter v0.1.0/go.mod h1:Ul8oqv2ZMNHOceF643P6FKPXeCmYtlQMvpizfsSoaWs= github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU= github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko= github.com/moby/sys/user v0.4.0 h1:jhcMKit7SA80hivmFJcbB1vqmw//wU61Zdui2eQXuMs= @@ -168,8 +172,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= -golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= +golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8= +golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -177,8 +181,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= -golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= +golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -194,17 +198,17 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= -golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= -golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= +golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= +golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= -golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= +golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= +golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -233,5 +237,5 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= -gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= +gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= From 07846ad515b15b28015d511833ef973f2a45578f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 May 2025 07:26:08 +0000 Subject: [PATCH 156/168] chore(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 in /s3 Bumps [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2) from 1.79.3 to 1.79.4. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.79.3...service/s3/v1.79.4) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-version: 1.79.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- s3/go.mod | 4 ++-- s3/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/s3/go.mod b/s3/go.mod index 69d4b31a..27a2ec72 100644 --- a/s3/go.mod +++ b/s3/go.mod @@ -7,7 +7,7 @@ require ( github.com/aws/aws-sdk-go-v2/config v1.29.14 github.com/aws/aws-sdk-go-v2/credentials v1.17.67 github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.75 - github.com/aws/aws-sdk-go-v2/service/s3 v1.79.3 + github.com/aws/aws-sdk-go-v2/service/s3 v1.79.4 github.com/aws/smithy-go v1.22.3 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 @@ -25,7 +25,7 @@ require ( github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.2 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.25.3 // indirect diff --git a/s3/go.sum b/s3/go.sum index 8b1537ef..5e70dc3a 100644 --- a/s3/go.sum +++ b/s3/go.sum @@ -28,14 +28,14 @@ github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34 h1:ZNTqv4nIdE/DiBfUUfXcLZ/Spcu github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34/go.mod h1:zf7Vcd1ViW7cPqYWEHLHJkS50X0JS2IKz9Cgaj6ugrs= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b5IzM/lum78bZ590jy36+d/aFLgKF/4Vd1xPE= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3/go.mod h1:0yKJC/kb8sAnmlYa6Zs3QVYqaC8ug2AbnNChv5Ox3uA= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.1 h1:4nm2G6A4pV9rdlWzGMPv4BNtQp22v1hg3yrtkYpeLl8= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.1/go.mod h1:iu6FSzgt+M2/x3Dk8zhycdIcHjEFb36IS8HVUVFoMg0= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.2 h1:BCG7DCXEXpNCcpwCxg1oi9pkJWH2+eZzTn9MY56MbVw= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.2/go.mod h1:iu6FSzgt+M2/x3Dk8zhycdIcHjEFb36IS8HVUVFoMg0= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 h1:dM9/92u2F1JbDaGooxTq18wmmFzbJRfXfVfy96/1CXM= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15/go.mod h1:SwFBy2vjtA0vZbjjaFtfN045boopadnoVPhu4Fv66vY= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15 h1:moLQUoVq91LiqT1nbvzDukyqAlCv89ZmwaHw/ZFlFZg= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15/go.mod h1:ZH34PJUc8ApjBIfgQCFvkWcUDBtl/WTD+uiYHjd8igA= -github.com/aws/aws-sdk-go-v2/service/s3 v1.79.3 h1:BRXS0U76Z8wfF+bnkilA2QwpIch6URlm++yPUt9QPmQ= -github.com/aws/aws-sdk-go-v2/service/s3 v1.79.3/go.mod h1:bNXKFFyaiVvWuR6O16h/I1724+aXe/tAkA9/QS01t5k= +github.com/aws/aws-sdk-go-v2/service/s3 v1.79.4 h1:4yxno6bNHkekkfqG/a1nz/gC2gBwhJSojV1+oTE7K+4= +github.com/aws/aws-sdk-go-v2/service/s3 v1.79.4/go.mod h1:qbn305Je/IofWBJ4bJz/Q7pDEtnnoInw/dGt71v6rHE= github.com/aws/aws-sdk-go-v2/service/sso v1.25.3 h1:1Gw+9ajCV1jogloEv1RRnvfRFia2cL6c9cuKV2Ps+G8= github.com/aws/aws-sdk-go-v2/service/sso v1.25.3/go.mod h1:qs4a9T5EMLl/Cajiw2TcbNt2UNo/Hqlyp+GiuG4CFDI= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 h1:hXmVKytPfTy5axZ+fYbR5d0cFmC3JvwLm5kM83luako= From 189b125e02542ccf8a7a0cac461e9ad53a1dc335 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 May 2025 07:29:17 +0000 Subject: [PATCH 157/168] chore(deps): bump github.com/aws/aws-sdk-go-v2/feature/s3/manager in /s3 Bumps [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) from 1.17.75 to 1.17.76. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/feature/s3/manager/v1.17.75...feature/s3/manager/v1.17.76) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager dependency-version: 1.17.76 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- s3/go.mod | 2 +- s3/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/s3/go.mod b/s3/go.mod index 27a2ec72..513c7b9c 100644 --- a/s3/go.mod +++ b/s3/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.36.3 github.com/aws/aws-sdk-go-v2/config v1.29.14 github.com/aws/aws-sdk-go-v2/credentials v1.17.67 - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.75 + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.76 github.com/aws/aws-sdk-go-v2/service/s3 v1.79.4 github.com/aws/smithy-go v1.22.3 github.com/stretchr/testify v1.10.0 diff --git a/s3/go.sum b/s3/go.sum index 5e70dc3a..eae0d72b 100644 --- a/s3/go.sum +++ b/s3/go.sum @@ -16,8 +16,8 @@ github.com/aws/aws-sdk-go-v2/credentials v1.17.67 h1:9KxtdcIA/5xPNQyZRgUSpYOE6j9 github.com/aws/aws-sdk-go-v2/credentials v1.17.67/go.mod h1:p3C44m+cfnbv763s52gCqrjaqyPikj9Sg47kUVaNZQQ= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mlnXuFrO4cOd3HLBroh1paFw= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.75 h1:S61/E3N01oral6B3y9hZ2E1iFDqCZPPOBoBQretCnBI= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.75/go.mod h1:bDMQbkI1vJbNjnvJYpPTSNYBkI/VIv18ngWb/K84tkk= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.76 h1:TZEAZHyLeRbSvETr20mAoJDUPhIMuFZ9ZwjkftWongU= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.76/go.mod h1:7h7z0FVKk7IYXuIZ8bWI58Afwc3kPMHqVIdczGgU3wc= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 h1:ZK5jHhnrioRkUNOc+hOgQKlUL5JeC3S6JgLxtQ+Rm0Q= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34/go.mod h1:p4VfIceZokChbA9FzMbRGz5OV+lekcVtHlPKEO0gSZY= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 h1:SZwFm17ZUNNg5Np0ioo/gq8Mn6u9w19Mri8DnJ15Jf0= From 30b20739d0aa7a88f9cada8a72cf156fdd64cc9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Fri, 23 May 2025 09:48:40 +0200 Subject: [PATCH 158/168] chore: verify mtls properly in tests --- testhelpers/redis/redis.go | 7 +++++-- testhelpers/redis/redis_test.go | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/testhelpers/redis/redis.go b/testhelpers/redis/redis.go index d12fbc06..9b6f49a4 100644 --- a/testhelpers/redis/redis.go +++ b/testhelpers/redis/redis.go @@ -77,6 +77,7 @@ func WithImage(image string) Option { // Container represents a running Redis container type Container struct { URL string + cmds []string Addrs []string Host string Port int @@ -106,16 +107,17 @@ func Start(t testing.TB, opts ...Option) *Container { ctx := context.Background() tcOpts := []testcontainers.ContainerCustomizer{} + var cmds []string if config.UseTLS { tcOpts = append(tcOpts, redis.WithTLS()) - cmds := []string{ + cmds = append(cmds, "--port", "0", "--tls-port", "6379", "--tls-cert-file", "/tls/server.crt", "--tls-key-file", "/tls/server.key", "--tls-ca-cert-file", "/tls/ca.crt", - } + ) cmds = append(cmds, "--tls-auth-clients", func() string { if config.MTLSDisabled { @@ -133,6 +135,7 @@ func Start(t testing.TB, opts ...Option) *Container { ctr := &Container{ TLSConfig: c.TLSConfig(), + cmds: cmds, } uri, err := c.ConnectionString(ctx) diff --git a/testhelpers/redis/redis_test.go b/testhelpers/redis/redis_test.go index 7e04fdf6..68085b1c 100644 --- a/testhelpers/redis/redis_test.go +++ b/testhelpers/redis/redis_test.go @@ -42,7 +42,7 @@ func TestStart(t *testing.T) { t.Run("with-tls", func(t *testing.T) { t.Run("secure-url", func(t *testing.T) { - t.Run("mtls-disabled", func(t *testing.T) { + t.Run("mtls-enabled", func(t *testing.T) { t.Parallel() ctr := Start(t, WithTLS(true, false)) @@ -52,15 +52,17 @@ func TestStart(t *testing.T) { require.Empty(t, ctr.Addrs) require.Empty(t, ctr.Host) require.Zero(t, ctr.Port) + require.Contains(t, ctr.cmds, "--tls-auth-clients", "yes") }) - t.Run("mtls-enabled", func(t *testing.T) { + t.Run("mtls-disabled", func(t *testing.T) { t.Parallel() ctr := Start(t, WithTLS(true, true)) require.NotEmpty(t, ctr.URL) require.True(t, strings.HasPrefix(ctr.URL, "rediss://")) require.NotNil(t, ctr.TLSConfig) + require.Contains(t, ctr.cmds, "--tls-auth-clients", "no") }) }) From 941ef46eaa8201e570a508a2dc3376fa172fd120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Fri, 23 May 2025 09:57:19 +0200 Subject: [PATCH 159/168] chore: add integration tests to the redis helper module --- testhelpers/redis/go.mod | 2 ++ testhelpers/redis/go.sum | 8 ++++++-- testhelpers/redis/redis_test.go | 25 +++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/testhelpers/redis/go.mod b/testhelpers/redis/go.mod index 94a7df5c..4f50761a 100644 --- a/testhelpers/redis/go.mod +++ b/testhelpers/redis/go.mod @@ -3,6 +3,7 @@ module github.com/gofiber/storage/testhelpers/redis go 1.23.0 require ( + github.com/redis/go-redis/v9 v9.8.0 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.37.0 github.com/testcontainers/testcontainers-go/modules/redis v0.37.0 @@ -18,6 +19,7 @@ require ( github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/docker v28.0.1+incompatible // indirect github.com/docker/go-connections v0.5.0 // indirect diff --git a/testhelpers/redis/go.sum b/testhelpers/redis/go.sum index b7f31c70..f4e21362 100644 --- a/testhelpers/redis/go.sum +++ b/testhelpers/redis/go.sum @@ -6,6 +6,10 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOEl github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= +github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= +github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= +github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= @@ -89,8 +93,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/redis/go-redis/v9 v9.7.3 h1:YpPyAayJV+XErNsatSElgRZZVCwXX9QzkKYNvO7x0wM= -github.com/redis/go-redis/v9 v9.7.3/go.mod h1:bGUrSggJ9X9GUmZpZNEOQKaANxSGgOEBRltRTZHSvrA= +github.com/redis/go-redis/v9 v9.8.0 h1:q3nRvjrlge/6UD7eTu/DSg2uYiU2mCL0G/uzBWqhicI= +github.com/redis/go-redis/v9 v9.8.0/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= diff --git a/testhelpers/redis/redis_test.go b/testhelpers/redis/redis_test.go index 68085b1c..2c44a9da 100644 --- a/testhelpers/redis/redis_test.go +++ b/testhelpers/redis/redis_test.go @@ -1,9 +1,12 @@ package testredis import ( + "context" "strings" "testing" + "github.com/redis/go-redis/v9" + "github.com/stretchr/testify/require" ) @@ -156,6 +159,28 @@ func TestStart(t *testing.T) { }) }) }) + + t.Run("can-connect", func(t *testing.T) { + ctr := Start(t) + + options, err := redis.ParseURL(ctr.URL) + require.NoError(t, err) + + // Use go-redis client to verify connectivity + client := redis.NewUniversalClient(&redis.UniversalOptions{ + Addrs: []string{options.Addr}, + TLSConfig: ctr.TLSConfig, + Username: options.Username, + Password: options.Password, + DB: options.DB, + }) + defer client.Close() + + // Ping should succeed and return "PONG" + resp := client.Ping(context.Background()) + require.NoError(t, resp.Err()) + require.Equal(t, "PONG", resp.Val()) + }) } func TestConfig(t *testing.T) { From 5794b5068f57e5412ba2ab3a46922c568e0d71cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Fri, 23 May 2025 10:00:56 +0200 Subject: [PATCH 160/168] chore: proper parallel layout --- testhelpers/redis/redis_test.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/testhelpers/redis/redis_test.go b/testhelpers/redis/redis_test.go index 2c44a9da..9d62f5c4 100644 --- a/testhelpers/redis/redis_test.go +++ b/testhelpers/redis/redis_test.go @@ -44,7 +44,11 @@ func TestStart(t *testing.T) { }) t.Run("with-tls", func(t *testing.T) { + t.Parallel() + t.Run("secure-url", func(t *testing.T) { + t.Parallel() + t.Run("mtls-enabled", func(t *testing.T) { t.Parallel() @@ -70,6 +74,8 @@ func TestStart(t *testing.T) { }) t.Run("insecure-url", func(t *testing.T) { + t.Parallel() + t.Run("mtls-disabled", func(t *testing.T) { t.Parallel() @@ -126,7 +132,11 @@ func TestStart(t *testing.T) { }) t.Run("with-multiple-options", func(t *testing.T) { + t.Parallel() + t.Run("address/url", func(t *testing.T) { + t.Parallel() + t.Run("no-tls", func(t *testing.T) { t.Parallel() @@ -161,6 +171,8 @@ func TestStart(t *testing.T) { }) t.Run("can-connect", func(t *testing.T) { + t.Parallel() + ctr := Start(t) options, err := redis.ParseURL(ctr.URL) @@ -184,7 +196,11 @@ func TestStart(t *testing.T) { } func TestConfig(t *testing.T) { + t.Parallel() + t.Run("with-tls", func(t *testing.T) { + t.Parallel() + config := &Config{} WithTLS(true, false)(config) require.True(t, config.UseTLS) @@ -193,24 +209,32 @@ func TestConfig(t *testing.T) { }) t.Run("with-address", func(t *testing.T) { + t.Parallel() + config := &Config{} WithAddress()(config) require.True(t, config.UseAddress) }) t.Run("with-host-port", func(t *testing.T) { + t.Parallel() + config := &Config{} WithHostPort()(config) require.True(t, config.UseHostPort) }) t.Run("with-url", func(t *testing.T) { + t.Parallel() + config := &Config{} WithURL(true)(config) require.True(t, config.UseURL) }) t.Run("with-image", func(t *testing.T) { + t.Parallel() + customImage := "docker.io/redis:6" config := &Config{} WithImage(customImage)(config) From 1e6e787ec53f940ed18dfc19d7f42c5da2a9d8c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Fri, 23 May 2025 10:20:28 +0200 Subject: [PATCH 161/168] fix: missing eval of redis image from env var --- redis/redis_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/redis/redis_test.go b/redis/redis_test.go index f32adde2..656637d5 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -1,6 +1,7 @@ package redis import ( + "os" "testing" "time" @@ -9,6 +10,12 @@ import ( testredis "github.com/gofiber/storage/testhelpers/redis" ) +const ( + // redisImage is the default image used for running Redis in tests. + redisImage = "docker.io/redis:7" + redisImageEnvVar = "TEST_REDIS_IMAGE" +) + // newConfigFromContainer creates a Redis configuration using Testcontainers. // It configures the container based on the provided options and returns a Config // that can be used to connect to the container. @@ -16,6 +23,13 @@ import ( func newConfigFromContainer(t testing.TB, opts ...testredis.Option) Config { t.Helper() + img := redisImage + if imgFromEnv := os.Getenv(redisImageEnvVar); imgFromEnv != "" { + img = imgFromEnv + } + + opts = append(opts, testredis.WithImage(img)) + redisCtr := testredis.Start(t, opts...) cfg := Config{ From 4d516c348a7775d1dc99afef2df8d5b962dc6f8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Fri, 23 May 2025 10:38:30 +0200 Subject: [PATCH 162/168] chore: pass the redis-like image explicitly in tests --- redis/redis_test.go | 4 +-- testhelpers/redis/redis.go | 28 +++-------------- testhelpers/redis/redis_test.go | 54 +++++++++++++-------------------- valkey/valkey_test.go | 5 +-- 4 files changed, 27 insertions(+), 64 deletions(-) diff --git a/redis/redis_test.go b/redis/redis_test.go index 656637d5..b8be18dd 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -28,9 +28,7 @@ func newConfigFromContainer(t testing.TB, opts ...testredis.Option) Config { img = imgFromEnv } - opts = append(opts, testredis.WithImage(img)) - - redisCtr := testredis.Start(t, opts...) + redisCtr := testredis.Start(t, img, opts...) cfg := Config{ Reset: true, diff --git a/testhelpers/redis/redis.go b/testhelpers/redis/redis.go index 9b6f49a4..23b7b9fc 100644 --- a/testhelpers/redis/redis.go +++ b/testhelpers/redis/redis.go @@ -3,7 +3,6 @@ package testredis import ( "context" "crypto/tls" - "os" "strings" "testing" @@ -13,10 +12,7 @@ import ( ) const ( - // Image is the default image used for running Redis in tests. - Image = "docker.io/redis:7" - ImageEnvVar = "TEST_REDIS_IMAGE" - Port = "6379/tcp" + Port = "6379/tcp" ) // Config represents the configuration for a Redis container @@ -28,10 +24,6 @@ type Config struct { UseAddress bool UseHostPort bool UseURL bool - // Image is the image to use for the Redis container - // - // Optional. Default is "docker.io/redis:7", but could be set to Valkey. - Image string } // Option is a function that configures a Config @@ -67,13 +59,6 @@ func WithURL(useContainerURI bool) Option { } } -// WithImage sets the image to use for the Redis container -func WithImage(image string) Option { - return func(c *Config) { - c.Image = image - } -} - // Container represents a running Redis container type Container struct { URL string @@ -85,7 +70,7 @@ type Container struct { } // Start starts a Redis container for testing and returns its configuration -func Start(t testing.TB, opts ...Option) *Container { +func Start(t testing.TB, img string, opts ...Option) *Container { t.Helper() config := &Config{ @@ -95,13 +80,8 @@ func Start(t testing.TB, opts ...Option) *Container { o(config) } - img := Image - if imgFromEnv := os.Getenv(ImageEnvVar); imgFromEnv != "" { - img = imgFromEnv - } - - if config.Image != "" { - img = config.Image + if img == "" { + panic("Redis image is not set: callers must provide an image using WithImage()") } ctx := context.Background() diff --git a/testhelpers/redis/redis_test.go b/testhelpers/redis/redis_test.go index 9d62f5c4..588b3f56 100644 --- a/testhelpers/redis/redis_test.go +++ b/testhelpers/redis/redis_test.go @@ -10,9 +10,18 @@ import ( "github.com/stretchr/testify/require" ) +// Image is the default image used for running Redis in tests. +const testImage = "docker.io/redis:7" + func TestStart(t *testing.T) { + t.Run("panics-if-image-is-not-set", func(t *testing.T) { + require.Panics(t, func() { + Start(t, "") + }) + }) + t.Run("default-configuration", func(t *testing.T) { - ctr := Start(t) + ctr := Start(t, testImage) require.NotEmpty(t, ctr.URL) require.True(t, strings.HasPrefix(ctr.URL, "redis://")) require.Nil(t, ctr.TLSConfig) @@ -23,19 +32,7 @@ func TestStart(t *testing.T) { t.Run("with-custom-image", func(t *testing.T) { customImage := "docker.io/redis:6" - ctr := Start(t, WithImage(customImage)) - require.True(t, strings.HasPrefix(ctr.URL, "redis://")) - require.Nil(t, ctr.TLSConfig) - require.Empty(t, ctr.Addrs) - require.Empty(t, ctr.Host) - require.Zero(t, ctr.Port) - }) - - t.Run("with-image-from-env", func(t *testing.T) { - envImage := "docker.io/redis:7" - t.Setenv(ImageEnvVar, envImage) - - ctr := Start(t) + ctr := Start(t, customImage) require.True(t, strings.HasPrefix(ctr.URL, "redis://")) require.Nil(t, ctr.TLSConfig) require.Empty(t, ctr.Addrs) @@ -52,7 +49,7 @@ func TestStart(t *testing.T) { t.Run("mtls-enabled", func(t *testing.T) { t.Parallel() - ctr := Start(t, WithTLS(true, false)) + ctr := Start(t, testImage, WithTLS(true, false)) require.NotEmpty(t, ctr.URL) require.True(t, strings.HasPrefix(ctr.URL, "rediss://")) require.NotNil(t, ctr.TLSConfig) @@ -65,7 +62,7 @@ func TestStart(t *testing.T) { t.Run("mtls-disabled", func(t *testing.T) { t.Parallel() - ctr := Start(t, WithTLS(true, true)) + ctr := Start(t, testImage, WithTLS(true, true)) require.NotEmpty(t, ctr.URL) require.True(t, strings.HasPrefix(ctr.URL, "rediss://")) require.NotNil(t, ctr.TLSConfig) @@ -79,7 +76,7 @@ func TestStart(t *testing.T) { t.Run("mtls-disabled", func(t *testing.T) { t.Parallel() - ctr := Start(t, WithTLS(false, true)) + ctr := Start(t, testImage, WithTLS(false, true)) require.NotEmpty(t, ctr.URL) require.True(t, strings.HasPrefix(ctr.URL, "redis://")) require.NotNil(t, ctr.TLSConfig) @@ -91,7 +88,7 @@ func TestStart(t *testing.T) { t.Run("mtls-enabled", func(t *testing.T) { t.Parallel() - ctr := Start(t, WithTLS(false, false)) + ctr := Start(t, testImage, WithTLS(false, false)) require.NotEmpty(t, ctr.URL) require.True(t, strings.HasPrefix(ctr.URL, "redis://")) require.NotNil(t, ctr.TLSConfig) @@ -105,7 +102,7 @@ func TestStart(t *testing.T) { t.Run("with-host-and-port", func(t *testing.T) { t.Parallel() - ctr := Start(t, WithHostPort()) + ctr := Start(t, testImage, WithHostPort()) require.NotEmpty(t, ctr.Host) require.NotZero(t, ctr.Port) require.NotEmpty(t, ctr.URL) @@ -115,7 +112,7 @@ func TestStart(t *testing.T) { t.Run("with-address", func(t *testing.T) { t.Parallel() - ctr := Start(t, WithAddress()) + ctr := Start(t, testImage, WithAddress()) require.NotEmpty(t, ctr.Addrs) require.Len(t, ctr.Addrs, 1) require.NotEmpty(t, ctr.URL) @@ -126,7 +123,7 @@ func TestStart(t *testing.T) { t.Run("with-url", func(t *testing.T) { t.Parallel() - ctr := Start(t, WithURL(true)) + ctr := Start(t, testImage, WithURL(true)) require.NotEmpty(t, ctr.URL) require.True(t, strings.HasPrefix(ctr.URL, "redis://")) }) @@ -140,7 +137,7 @@ func TestStart(t *testing.T) { t.Run("no-tls", func(t *testing.T) { t.Parallel() - ctr := Start(t, + ctr := Start(t, testImage, WithAddress(), WithURL(true), ) @@ -155,7 +152,7 @@ func TestStart(t *testing.T) { t.Run("tls", func(t *testing.T) { t.Parallel() - ctr := Start(t, + ctr := Start(t, testImage, WithTLS(true, false), WithAddress(), WithURL(true), @@ -173,7 +170,7 @@ func TestStart(t *testing.T) { t.Run("can-connect", func(t *testing.T) { t.Parallel() - ctr := Start(t) + ctr := Start(t, testImage) options, err := redis.ParseURL(ctr.URL) require.NoError(t, err) @@ -231,13 +228,4 @@ func TestConfig(t *testing.T) { WithURL(true)(config) require.True(t, config.UseURL) }) - - t.Run("with-image", func(t *testing.T) { - t.Parallel() - - customImage := "docker.io/redis:6" - config := &Config{} - WithImage(customImage)(config) - require.Equal(t, customImage, config.Image) - }) } diff --git a/valkey/valkey_test.go b/valkey/valkey_test.go index 80dd3520..0a35fa44 100644 --- a/valkey/valkey_test.go +++ b/valkey/valkey_test.go @@ -28,10 +28,7 @@ func newConfigFromContainer(t testing.TB, opts ...testredis.Option) Config { img = imgFromEnv } - // Force Valkey image when running outside of GitHub Actions - opts = append(opts, testredis.WithImage(img)) - - redisCtr := testredis.Start(t, opts...) + redisCtr := testredis.Start(t, img, opts...) cfg := Config{ Reset: true, From 331a84b6c54942d529b036aac4f5a830481205bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Fri, 23 May 2025 11:56:55 +0200 Subject: [PATCH 163/168] fix: reuse valkey container in benchmarks --- testhelpers/redis/redis.go | 19 ++++++++++++++++++- valkey/valkey_test.go | 37 ++++++++++++++++++++++++++----------- 2 files changed, 44 insertions(+), 12 deletions(-) diff --git a/testhelpers/redis/redis.go b/testhelpers/redis/redis.go index 23b7b9fc..9e14df7d 100644 --- a/testhelpers/redis/redis.go +++ b/testhelpers/redis/redis.go @@ -24,6 +24,7 @@ type Config struct { UseAddress bool UseHostPort bool UseURL bool + name string } // Option is a function that configures a Config @@ -59,6 +60,15 @@ func WithURL(useContainerURI bool) Option { } } +// WithReuse sets the container to be reused, +// providing a name to identify the container. +// This container is not cleaned up when the test completes. +func WithReuse(name string) Option { + return func(c *Config) { + c.name = name + } +} + // Container represents a running Redis container type Container struct { URL string @@ -109,8 +119,15 @@ func Start(t testing.TB, img string, opts ...Option) *Container { tcOpts = append(tcOpts, testcontainers.WithCmd(cmds...)) } + if config.name != "" { + tcOpts = append(tcOpts, testcontainers.WithReuseByName(config.name)) + } + c, err := redis.Run(ctx, img, tcOpts...) - testcontainers.CleanupContainer(t, c) + if config.name == "" { + // only cleanup the container if it's not being reused + testcontainers.CleanupContainer(t, c) + } require.NoError(t, err) ctr := &Container{ diff --git a/valkey/valkey_test.go b/valkey/valkey_test.go index 0a35fa44..ab4bd95f 100644 --- a/valkey/valkey_test.go +++ b/valkey/valkey_test.go @@ -2,6 +2,7 @@ package valkey import ( "os" + "sync" "testing" "time" @@ -16,6 +17,23 @@ const ( valkeyImageEnvVar = "TEST_VALKEY_IMAGE" ) +var ( + // benchmarkStore is a singleton store used for all benchmarks + benchmarkStore *Storage + // benchmarkStoreOnce ensures the store is initialized only once + benchmarkStoreOnce sync.Once +) + +// initBenchmarkStore initializes the singleton store for benchmarks. +// There is no need to call Close() on the returned store, it will be reused +// for all benchmarks. Testcontainers will reuse the container if it already exists +// and will terminate it at the end of a test session. +func initBenchmarkStore(b *testing.B) { + benchmarkStoreOnce.Do(func() { + benchmarkStore = newTestStore(b, testredis.WithReuse("valkey-benchmark")) + }) +} + // newConfigFromContainer creates a Redis configuration using Testcontainers. // It configures the container based on the provided options and returns a Config // that can be used to connect to the container. @@ -321,48 +339,45 @@ func Test_Valkey_Cluster(t *testing.T) { } func Benchmark_Valkey_Set(b *testing.B) { - testStore := newTestStore(b) - defer testStore.Close() + initBenchmarkStore(b) b.ReportAllocs() b.ResetTimer() var err error for i := 0; i < b.N; i++ { - err = testStore.Set("john", []byte("doe"), 0) + err = benchmarkStore.Set("john", []byte("doe"), 0) } require.NoError(b, err) } func Benchmark_Valkey_Get(b *testing.B) { - testStore := newTestStore(b) - defer testStore.Close() + initBenchmarkStore(b) - err := testStore.Set("john", []byte("doe"), 0) + err := benchmarkStore.Set("john", []byte("doe"), 0) require.NoError(b, err) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - _, err = testStore.Get("john") + _, err = benchmarkStore.Get("john") } require.NoError(b, err) } func Benchmark_Valkey_SetAndDelete(b *testing.B) { - testStore := newTestStore(b) - defer testStore.Close() + initBenchmarkStore(b) b.ReportAllocs() b.ResetTimer() var err error for i := 0; i < b.N; i++ { - _ = testStore.Set("john", []byte("doe"), 0) - err = testStore.Delete("john") + _ = benchmarkStore.Set("john", []byte("doe"), 0) + err = benchmarkStore.Delete("john") } require.NoError(b, err) From 168125aba4e4263fdd6ebe1ce3417f4289e94e9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Fri, 23 May 2025 12:23:18 +0200 Subject: [PATCH 164/168] chore: refine message --- testhelpers/redis/redis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testhelpers/redis/redis.go b/testhelpers/redis/redis.go index 9e14df7d..ec89c8ee 100644 --- a/testhelpers/redis/redis.go +++ b/testhelpers/redis/redis.go @@ -91,7 +91,7 @@ func Start(t testing.TB, img string, opts ...Option) *Container { } if img == "" { - panic("Redis image is not set: callers must provide an image using WithImage()") + panic("Redis image is not set: callers must provide a non-empty image parameter") } ctx := context.Background() From ba248c9967ed07da01bb92e04e454663cfe047b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Fri, 23 May 2025 12:25:20 +0200 Subject: [PATCH 165/168] chore: align valkey expiration test with redis --- valkey/valkey_test.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/valkey/valkey_test.go b/valkey/valkey_test.go index ab4bd95f..997462e9 100644 --- a/valkey/valkey_test.go +++ b/valkey/valkey_test.go @@ -112,7 +112,7 @@ func Test_Valkey_Get(t *testing.T) { require.Equal(t, val, result) } -func Test_Valkey_Set_Expiration(t *testing.T) { +func Test_Valkey_Expiration(t *testing.T) { var ( key = "john" val = []byte("doe") @@ -126,13 +126,6 @@ func Test_Valkey_Set_Expiration(t *testing.T) { require.NoError(t, err) time.Sleep(1100 * time.Millisecond) -} - -func Test_Valkey_Get_Expired(t *testing.T) { - key := "john" - - testStore := newTestStore(t) - defer testStore.Close() result, err := testStore.Get(key) require.NoError(t, err) From 4c19cbad8975ec52f00aef4ddb0d73e7986426a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Fri, 23 May 2025 12:30:26 +0200 Subject: [PATCH 166/168] chore: skip cluster tests --- redis/redis_test.go | 3 ++- rueidis/rueidis_test.go | 3 ++- valkey/valkey_test.go | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/redis/redis_test.go b/redis/redis_test.go index b8be18dd..001130f8 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -397,7 +397,8 @@ func Test_Redis_Universal_With_HostPort_And_URL(t *testing.T) { } func Test_Redis_Cluster(t *testing.T) { - // TODO: Replace with containerized cluster when testcontainers-go Redis module supports clustering + t.Skip("TODO: Replace with containerized cluster when testcontainers-go Redis module supports clustering") + testStoreUniversal := New(Config{ Addrs: []string{ "localhost:7000", diff --git a/rueidis/rueidis_test.go b/rueidis/rueidis_test.go index cca815e6..2d51ec9d 100644 --- a/rueidis/rueidis_test.go +++ b/rueidis/rueidis_test.go @@ -278,7 +278,8 @@ func Test_Rueidis_With_TLS_URL(t *testing.T) { } func Test_Rueidis_Cluster(t *testing.T) { - // TODO: Replace with containerized cluster when testcontainers-go Rueidis module supports clustering + t.Skip("TODO: Replace with containerized cluster when testcontainers-go Redis module supports clustering") + store := New(Config{ InitAddress: []string{ "localhost:7000", diff --git a/valkey/valkey_test.go b/valkey/valkey_test.go index 997462e9..de9e9929 100644 --- a/valkey/valkey_test.go +++ b/valkey/valkey_test.go @@ -302,7 +302,7 @@ func Test_Valkey_With_TLS_URL(t *testing.T) { func Test_Valkey_Cluster(t *testing.T) { t.Skip("TODO: Replace with containerized cluster when testcontainers-go Valkey module supports clustering") - // TODO: Replace with containerized cluster when testcontainers-go Valkey module supports clustering + store := New(Config{ InitAddress: []string{ "localhost:7000", From 288cedb4a4b7c936877a685b88e79995ab31f35d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Fri, 23 May 2025 12:30:40 +0200 Subject: [PATCH 167/168] chore: align ruedis expiration test with redis --- rueidis/rueidis_test.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/rueidis/rueidis_test.go b/rueidis/rueidis_test.go index 2d51ec9d..74486ece 100644 --- a/rueidis/rueidis_test.go +++ b/rueidis/rueidis_test.go @@ -82,7 +82,7 @@ func Test_Rueidis_Get(t *testing.T) { require.Equal(t, val, result) } -func Test_Rueidis_Set_Expiration(t *testing.T) { +func Test_Rueidis_Expiration(t *testing.T) { var ( key = "john" val = []byte("doe") @@ -96,13 +96,6 @@ func Test_Rueidis_Set_Expiration(t *testing.T) { require.NoError(t, err) time.Sleep(1100 * time.Millisecond) -} - -func Test_Rueidis_Get_Expired(t *testing.T) { - key := "john" - - testStore := newTestStore(t) - defer testStore.Close() result, err := testStore.Get(key) require.NoError(t, err) From bf7c3091006b457bbd38a76bd039a9ff2535db2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Fri, 23 May 2025 12:31:03 +0200 Subject: [PATCH 168/168] chore: read redis image for ruedis --- rueidis/rueidis_test.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/rueidis/rueidis_test.go b/rueidis/rueidis_test.go index 74486ece..86111613 100644 --- a/rueidis/rueidis_test.go +++ b/rueidis/rueidis_test.go @@ -1,6 +1,7 @@ package rueidis import ( + "os" "testing" "time" @@ -9,6 +10,12 @@ import ( testredis "github.com/gofiber/storage/testhelpers/redis" ) +const ( + // redisImage is the default image used for running Redis in tests. + redisImage = "docker.io/redis:7" + redisImageEnvVar = "TEST_REDIS_IMAGE" +) + // newConfigFromContainer creates a Rueidis configuration using Testcontainers. // It configures the container based on the provided options and returns a Config // that can be used to connect to the container. @@ -16,7 +23,12 @@ import ( func newConfigFromContainer(t testing.TB, opts ...testredis.Option) Config { t.Helper() - redisCtr := testredis.Start(t, opts...) + img := redisImage + if imgFromEnv := os.Getenv(redisImageEnvVar); imgFromEnv != "" { + img = imgFromEnv + } + + redisCtr := testredis.Start(t, img, opts...) cfg := Config{ Reset: true,