From 0841dd094356f363839b188f50780c7a9484c54b Mon Sep 17 00:00:00 2001 From: dorothyyzh Date: Wed, 13 May 2026 14:19:06 +0800 Subject: [PATCH 1/3] chore(deps): migrate tests off testenv to gormx, drop docker/docker (Aikido) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Retire `github.com/docker/docker` from this module by: 1. Bumping the three upstreams that previously pulled docker/docker: - `qor5/x/v3` v3.2.1-0.20251126082016-f61128fc8187 -> pseudo from qor5/x#582 - `qor5/go-bus` -> pseudo from qor5/go-bus#20 - `theplant/relay` v0.8.0 -> pseudo from theplant/relay#35 All three already dropped docker/docker themselves. 2. Replacing `theplant/testenv` usage in 15 `_test.go` files with `qor5/x/v3/gormx.OpenContainer` + plain `gorm.Open`. testenv was the only remaining transitive path bringing docker/docker into admin's go.mod. Why `gormx.OpenContainer` rather than `gormx.SetupDatabase`: SetupDatabase installs `OmitAssociationsPlugin` globally on the returned *gorm.DB, which omits GORM associations on every Create/Update/Delete. Admin tests (especially activity, pagebuilder, seo) exercise associations, so this side effect would silently break them. The lighter OpenContainer + plain gorm.Open mirrors the prior testenv behavior 1:1. Migrated files (all DB-only, no Redis): activity/builder_test.go activity/tests/gorm_test.go autocomplete/integration/autocomplete_test.go cmd/qor5/website-template/admin/integration_test.go docs/docsrc/examples/examples_admin/db_test.go docs/docsrc/examples/examples_admin/publish_test/env_test.go docs/docsrc/examples/examples_presets/presets_test.go example/integration/pagebuilder_test.go media/integration/integration_test.go pagebuilder/publish_test.go presets/integration/example_test.go publish/publish_test.go redirection/redirection_test.go seo/helper_test.go worker/integration_test/setup_test.go Verification: - `go vet ./...` clean (except a pre-existing unreachable-code warning in pagebuilder/model_events.go:101 that also exists on main) - `go test -run=NoRealTests` typechecks all migrated packages cleanly - Real test runs verified on activity, seo, redirection (containers come up, GORM operations succeed) - `go mod why github.com/docker/docker` -> not needed - `docker/docker` no longer in `go.mod` - `theplant/testenv` no longer in `go.mod` `go build ./...` cannot complete on my local environment because `media/vips` is cgo-dependent (libvips/pkg-config) and the dev box doesn't have libvips installed. This affects only media/vips and is a pre-existing environment issue (same error on main). All other packages build cleanly. DRAFT — depends on upstream merges: - qor5/go-bus#20 - theplant/ratelimiter#14 - qor5/x#582 (depends on the above two) - theplant/relay#35 (depends on qor5/x#582) Pseudo-versions will be re-pointed to release tags before this PR is marked ready for review. Aikido group 25543337 (CVE-2026-33997 / CVE-2026-34040). Co-Authored-By: Claude Opus 4.7 (1M context) --- activity/builder_test.go | 14 +- activity/tests/gorm_test.go | 15 +- autocomplete/integration/autocomplete_test.go | 14 +- .../admin/integration_test.go | 14 +- .../docsrc/examples/examples_admin/db_test.go | 14 +- .../examples_admin/publish_test/env_test.go | 15 +- .../examples/examples_presets/presets_test.go | 14 +- example/integration/pagebuilder_test.go | 14 +- go.mod | 57 ++++--- go.sum | 154 +++++++++--------- media/integration/integration_test.go | 14 +- pagebuilder/publish_test.go | 13 +- presets/integration/example_test.go | 14 +- publish/publish_test.go | 13 +- redirection/redirection_test.go | 14 +- seo/helper_test.go | 14 +- worker/integration_test/setup_test.go | 13 +- 17 files changed, 248 insertions(+), 172 deletions(-) diff --git a/activity/builder_test.go b/activity/builder_test.go index b201cf4b3..61247e6ce 100644 --- a/activity/builder_test.go +++ b/activity/builder_test.go @@ -11,9 +11,10 @@ import ( "github.com/qor5/admin/v3/presets/gorm2op" "github.com/qor5/web/v3" "github.com/stretchr/testify/require" - "github.com/theplant/testenv" "gorm.io/gorm" "gorm.io/gorm/logger" + "github.com/qor5/x/v3/gormx" + "gorm.io/driver/postgres" ) var db *gorm.DB @@ -41,13 +42,16 @@ type ( ) func TestMain(m *testing.M) { - env, err := testenv.New().DBEnable(true).SetUp() + ctx := context.Background() + pgContainer, err := gormx.OpenContainer(ctx, nil) + if err != nil { + panic(err) + } + defer func() { _ = pgContainer.Terminate(ctx) }() + db, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) if err != nil { panic(err) } - defer env.TearDown() - - db = env.DB db.Logger = db.Logger.LogMode(logger.Info) if err = AutoMigrate(db, ""); err != nil { diff --git a/activity/tests/gorm_test.go b/activity/tests/gorm_test.go index 473894ff0..4b78c00aa 100644 --- a/activity/tests/gorm_test.go +++ b/activity/tests/gorm_test.go @@ -5,10 +5,12 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/theplant/testenv" "gorm.io/gorm" "gorm.io/gorm/logger" "gorm.io/gorm/schema" + "github.com/qor5/x/v3/gormx" + "gorm.io/driver/postgres" + "context" ) type Foo struct { @@ -24,13 +26,16 @@ type Bar struct { var db *gorm.DB func TestMain(m *testing.M) { - env, err := testenv.New().DBEnable(true).SetUp() + ctx := context.Background() + pgContainer, err := gormx.OpenContainer(ctx, nil) + if err != nil { + panic(err) + } + defer func() { _ = pgContainer.Terminate(ctx) }() + db, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) if err != nil { panic(err) } - defer env.TearDown() - - db = env.DB db.Logger = db.Logger.LogMode(logger.Info) m.Run() diff --git a/autocomplete/integration/autocomplete_test.go b/autocomplete/integration/autocomplete_test.go index 722833341..360af25f9 100644 --- a/autocomplete/integration/autocomplete_test.go +++ b/autocomplete/integration/autocomplete_test.go @@ -11,20 +11,26 @@ import ( "github.com/qor5/admin/v3/autocomplete" "github.com/theplant/gofixtures" - "github.com/theplant/testenv" "gorm.io/gorm" "gorm.io/gorm/logger" + "github.com/qor5/x/v3/gormx" + "gorm.io/driver/postgres" + "context" ) var TestDB *gorm.DB func TestMain(m *testing.M) { - env, err := testenv.New().DBEnable(true).SetUp() + ctx := context.Background() + pgContainer, err := gormx.OpenContainer(ctx, nil) + if err != nil { + panic(err) + } + defer func() { _ = pgContainer.Terminate(ctx) }() + TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) if err != nil { panic(err) } - defer env.TearDown() - TestDB = env.DB TestDB.Logger = TestDB.Logger.LogMode(logger.Info) m.Run() } diff --git a/cmd/qor5/website-template/admin/integration_test.go b/cmd/qor5/website-template/admin/integration_test.go index cbbb298df..54b4d3ea5 100644 --- a/cmd/qor5/website-template/admin/integration_test.go +++ b/cmd/qor5/website-template/admin/integration_test.go @@ -10,12 +10,14 @@ import ( "github.com/qor5/web/v3/multipartestutils" "github.com/theplant/gofixtures" - "github.com/theplant/testenv" "github.com/theplant/testingutils" "gorm.io/gorm" "gorm.io/gorm/logger" "github.com/qor5/admin/v3/cmd/qor5/website-template/admin" + "github.com/qor5/x/v3/gormx" + "gorm.io/driver/postgres" + "context" ) var ( @@ -24,12 +26,16 @@ var ( ) func TestMain(m *testing.M) { - env, err := testenv.New().DBEnable(true).SetUp() + ctx := context.Background() + pgContainer, err := gormx.OpenContainer(ctx, nil) + if err != nil { + panic(err) + } + defer func() { _ = pgContainer.Terminate(ctx) }() + TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) if err != nil { panic(err) } - defer env.TearDown() - TestDB = env.DB TestDB.Logger = TestDB.Logger.LogMode(logger.Info) SqlDB, _ = TestDB.DB() m.Run() diff --git a/docs/docsrc/examples/examples_admin/db_test.go b/docs/docsrc/examples/examples_admin/db_test.go index c2513861a..9cdfd9dcf 100644 --- a/docs/docsrc/examples/examples_admin/db_test.go +++ b/docs/docsrc/examples/examples_admin/db_test.go @@ -4,9 +4,11 @@ import ( "database/sql" "testing" - "github.com/theplant/testenv" "gorm.io/gorm" "gorm.io/gorm/logger" + "github.com/qor5/x/v3/gormx" + "gorm.io/driver/postgres" + "context" ) var ( @@ -15,12 +17,16 @@ var ( ) func TestMain(m *testing.M) { - env, err := testenv.New().DBEnable(true).SetUp() + ctx := context.Background() + pgContainer, err := gormx.OpenContainer(ctx, nil) + if err != nil { + panic(err) + } + defer func() { _ = pgContainer.Terminate(ctx) }() + TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) if err != nil { panic(err) } - defer env.TearDown() - TestDB = env.DB TestDB.Logger = TestDB.Logger.LogMode(logger.Info) SqlDB, _ = TestDB.DB() m.Run() diff --git a/docs/docsrc/examples/examples_admin/publish_test/env_test.go b/docs/docsrc/examples/examples_admin/publish_test/env_test.go index 762855f19..8667342b1 100644 --- a/docs/docsrc/examples/examples_admin/publish_test/env_test.go +++ b/docs/docsrc/examples/examples_admin/publish_test/env_test.go @@ -8,8 +8,10 @@ import ( "github.com/qor5/admin/v3/docs/docsrc/examples/examples_admin" "github.com/qor5/admin/v3/presets" "github.com/qor5/admin/v3/presets/gorm2op" - "github.com/theplant/testenv" "gorm.io/gorm" + "github.com/qor5/x/v3/gormx" + "gorm.io/driver/postgres" + "context" ) var ( @@ -19,13 +21,16 @@ var ( ) func TestMain(m *testing.M) { - env, err := testenv.New().DBEnable(true).SetUp() + ctx := context.Background() + pgContainer, err := gormx.OpenContainer(ctx, nil) + if err != nil { + panic(err) + } + defer func() { _ = pgContainer.Terminate(ctx) }() + DB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) if err != nil { panic(err) } - defer env.TearDown() - - DB = env.DB SQLDB, err = DB.DB() if err != nil { panic(err) diff --git a/docs/docsrc/examples/examples_presets/presets_test.go b/docs/docsrc/examples/examples_presets/presets_test.go index fe7e0bc1d..9ef8bbe86 100644 --- a/docs/docsrc/examples/examples_presets/presets_test.go +++ b/docs/docsrc/examples/examples_presets/presets_test.go @@ -9,9 +9,11 @@ import ( "github.com/qor5/admin/v3/presets" "github.com/qor5/admin/v3/presets/gorm2op" "github.com/qor5/web/v3/multipartestutils" - "github.com/theplant/testenv" "gorm.io/gorm" "gorm.io/gorm/logger" + "github.com/qor5/x/v3/gormx" + "gorm.io/driver/postgres" + "context" ) var ( @@ -20,12 +22,16 @@ var ( ) func TestMain(m *testing.M) { - env, err := testenv.New().DBEnable(true).SetUp() + ctx := context.Background() + pgContainer, err := gormx.OpenContainer(ctx, nil) + if err != nil { + panic(err) + } + defer func() { _ = pgContainer.Terminate(ctx) }() + TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) if err != nil { panic(err) } - defer env.TearDown() - TestDB = env.DB TestDB.Logger = TestDB.Logger.LogMode(logger.Info) SqlDB, _ = TestDB.DB() m.Run() diff --git a/example/integration/pagebuilder_test.go b/example/integration/pagebuilder_test.go index d3fcb50cb..148469341 100644 --- a/example/integration/pagebuilder_test.go +++ b/example/integration/pagebuilder_test.go @@ -11,7 +11,6 @@ import ( . "github.com/qor5/web/v3/multipartestutils" "github.com/qor5/x/v3/perm" "github.com/theplant/gofixtures" - "github.com/theplant/testenv" "gorm.io/gorm" "gorm.io/gorm/logger" @@ -23,17 +22,24 @@ import ( "github.com/qor5/admin/v3/presets/actions" "github.com/qor5/admin/v3/publish" "github.com/qor5/admin/v3/utils" + "github.com/qor5/x/v3/gormx" + "gorm.io/driver/postgres" + "context" ) var TestDB *gorm.DB func TestMain(m *testing.M) { - env, err := testenv.New().DBEnable(true).SetUp() + ctx := context.Background() + pgContainer, err := gormx.OpenContainer(ctx, nil) + if err != nil { + panic(err) + } + defer func() { _ = pgContainer.Terminate(ctx) }() + TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) if err != nil { panic(err) } - defer env.TearDown() - TestDB = env.DB TestDB.Logger = TestDB.Logger.LogMode(logger.Info) m.Run() } diff --git a/go.mod b/go.mod index 4e2f135d8..8fe19faa0 100644 --- a/go.mod +++ b/go.mod @@ -33,8 +33,8 @@ require ( github.com/qor5/imaging v1.6.4 github.com/qor5/web v1.3.2 github.com/qor5/web/v3 v3.0.12-0.20250618085230-3764d0e521a8 - github.com/qor5/x/v3 v3.2.1-0.20251126082016-f61128fc8187 - github.com/samber/lo v1.50.0 + github.com/qor5/x/v3 v3.2.1-0.20260513053223-8d1b87070f73 + github.com/samber/lo v1.52.0 github.com/shurcooL/sanitized_anchor_name v1.0.0 github.com/spf13/cast v1.7.1 github.com/stretchr/testify v1.11.1 @@ -44,11 +44,10 @@ require ( github.com/theplant/docgo v0.0.16 github.com/theplant/gofixtures v1.1.3 github.com/theplant/htmlgo v1.0.3 - github.com/theplant/inject v1.1.0 + github.com/theplant/inject v1.2.2 github.com/theplant/osenv v0.0.2 - github.com/theplant/relay v0.8.0 + github.com/theplant/relay v0.9.1-0.20260513061314-56c1fe07cc94 github.com/theplant/sliceutils v0.0.0-20200406042209-89153d988eb1 - github.com/theplant/testenv v0.2.1 github.com/theplant/testingutils v0.0.2 github.com/tnclong/go-que v0.0.0-20240226030728-4e1f3c8ec781 github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 @@ -58,13 +57,13 @@ require ( go.uber.org/zap v1.27.0 golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 golang.org/x/text v0.36.0 - google.golang.org/genproto/googleapis/rpc v0.0.0-20260319201613-d00831a3d3e7 - google.golang.org/grpc v1.79.3 + google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9 + google.golang.org/grpc v1.80.0 google.golang.org/protobuf v1.36.11 gorm.io/datatypes v1.2.7 gorm.io/driver/postgres v1.6.0 - gorm.io/driver/sqlite v1.5.6 - gorm.io/gorm v1.30.1 + gorm.io/driver/sqlite v1.6.0 + gorm.io/gorm v1.31.1 ) require ( @@ -77,6 +76,7 @@ require ( github.com/Microsoft/go-winio v0.6.2 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/STARRY-S/zip v0.1.0 // indirect + github.com/allegro/bigcache/v3 v3.1.0 // indirect github.com/andybalholm/brotli v1.1.1 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.9 // indirect github.com/aws/aws-sdk-go-v2/config v1.29.6 // indirect @@ -109,14 +109,14 @@ require ( github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/dgraph-io/ristretto/v2 v2.3.0 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/distribution/reference v0.6.0 // indirect github.com/dlclark/regexp2 v1.11.2 // indirect - github.com/docker/docker v28.5.2+incompatible // indirect - github.com/docker/go-connections v0.5.0 // indirect + github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 // indirect - github.com/ebitengine/purego v0.8.4 // indirect + github.com/ebitengine/purego v0.10.0 // indirect github.com/evanphx/json-patch/v5 v5.9.11 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.8.0 // indirect @@ -143,7 +143,6 @@ require ( github.com/gosimple/unidecode v1.0.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.2 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect @@ -156,7 +155,7 @@ require ( github.com/jinzhu/now v1.1.5 // indirect github.com/jjeffery/errors v1.0.3 // indirect github.com/jjeffery/kv v0.8.1 // indirect - github.com/klauspost/compress v1.18.0 // indirect + github.com/klauspost/compress v1.18.5 // indirect github.com/klauspost/pgzip v1.2.6 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 // indirect @@ -165,18 +164,18 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect - github.com/mdelapenya/tlscert v0.2.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // 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/go-archive v0.2.0 // indirect + github.com/moby/moby/api v1.54.1 // indirect + github.com/moby/moby/client v0.4.0 // indirect + github.com/moby/patternmatcher v0.6.1 // 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.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/morikuni/aec v1.0.0 // indirect github.com/nwaples/rardecode/v2 v2.2.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect @@ -186,18 +185,18 @@ require ( github.com/pierrec/lz4/v4 v4.1.22 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect - github.com/redis/go-redis/v9 v9.11.0 // indirect + github.com/redis/go-redis/v9 v9.16.0 // indirect github.com/rs/cors v1.11.1 // indirect github.com/russross/blackfriday v1.6.0 // indirect github.com/sagikazarmark/locafero v0.6.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sergi/go-diff v1.3.1 // indirect - github.com/shirou/gopsutil/v4 v4.25.6 // indirect + github.com/shirou/gopsutil/v4 v4.26.3 // indirect github.com/shurcooL/github_flavored_markdown v0.0.0-20210228213109-c3a9aa474629 // indirect github.com/shurcooL/highlight_diff v0.0.0-20230708024848-22f825814995 // indirect github.com/shurcooL/highlight_go v0.0.0-20230708025100-33e05792540a // indirect github.com/shurcooL/octicon v0.0.0-20230705024016-66bff059edb8 // indirect - github.com/sirupsen/logrus v1.9.3 // indirect + github.com/sirupsen/logrus v1.9.4 // indirect github.com/sorairolake/lzip-go v0.3.5 // indirect github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d // indirect github.com/sourcegraph/conc v0.3.0 // indirect @@ -207,30 +206,30 @@ require ( github.com/spf13/pflag v1.0.6 // indirect github.com/spf13/viper v1.19.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect - github.com/testcontainers/testcontainers-go v0.38.0 // indirect - github.com/testcontainers/testcontainers-go/modules/redis v0.38.0 // indirect + github.com/testcontainers/testcontainers-go v0.42.0 // indirect github.com/theplant/appkit v0.0.0-20250528023215-3d0d299dc4c6 // indirect + github.com/theplant/cachex v0.0.0-20251210183652-8e675368cbc5 // indirect github.com/theplant/validator v0.0.0-20210202101755-357a9daa8f5f // indirect github.com/therootcompany/xz v1.0.1 // indirect github.com/tidwall/gjson v1.17.3 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/tidwall/sjson v1.2.5 // indirect - github.com/tklauser/go-sysconf v0.3.15 // indirect - github.com/tklauser/numcpus v0.10.0 // indirect + github.com/tklauser/go-sysconf v0.3.16 // indirect + github.com/tklauser/numcpus v0.11.0 // indirect github.com/ulikunitz/xz v0.5.15 // indirect github.com/wI2L/jsondiff v0.6.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 // indirect - go.opentelemetry.io/otel v1.41.0 // indirect - go.opentelemetry.io/otel/metric v1.41.0 // indirect - go.opentelemetry.io/otel/trace v1.41.0 // indirect + go.opentelemetry.io/otel v1.43.0 // indirect + go.opentelemetry.io/otel/metric v1.43.0 // indirect + go.opentelemetry.io/otel/trace v1.43.0 // indirect go4.org v0.0.0-20230225012048-214862532bf5 // indirect golang.org/x/crypto v0.49.0 // indirect golang.org/x/image v0.39.0 // indirect golang.org/x/net v0.52.0 // indirect - golang.org/x/oauth2 v0.34.0 // indirect + golang.org/x/oauth2 v0.35.0 // indirect golang.org/x/sync v0.20.0 // indirect golang.org/x/sys v0.42.0 // indirect golang.org/x/time v0.12.0 // indirect diff --git a/go.sum b/go.sum index c8505eef4..e94375f9c 100644 --- a/go.sum +++ b/go.sum @@ -41,6 +41,10 @@ github.com/STARRY-S/zip v0.1.0 h1:eUER3jKmHKXjv+iy3BekLa+QnNSo1Lqz4eTzYBcGDqo= github.com/STARRY-S/zip v0.1.0/go.mod h1:qj/mTZkvb3AvfGQ2e775/3AODRvB4peSw8KNMvrM8/I= github.com/ahmetb/go-linq/v3 v3.2.0 h1:BEuMfp+b59io8g5wYzNoFe9pWPalRklhlhbiU3hYZDE= github.com/ahmetb/go-linq/v3 v3.2.0/go.mod h1:haQ3JfOeWK8HpVxMtHHEMPVgBKiYyQ+f1/kLZh/cj9U= +github.com/alicebob/miniredis/v2 v2.35.0 h1:QwLphYqCEAo1eu1TqPRN2jgVMPBweeQcR21jeqDCONI= +github.com/alicebob/miniredis/v2 v2.35.0/go.mod h1:TcL7YfarKPGDAthEtl5NBeHZfeUQj6OXMm/+iu5cLMM= +github.com/allegro/bigcache/v3 v3.1.0 h1:H2Vp8VOvxcrB91o86fUSVJFqeuz8kpyyB02eH3bSzwk= +github.com/allegro/bigcache/v3 v3.1.0/go.mod h1:aPyh7jEvrog9zAwx5N7+JUQX5dZTSGpxF1LAR4dr35I= github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA= github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA= github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss= @@ -125,22 +129,24 @@ 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.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= -github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= +github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgraph-io/ristretto/v2 v2.3.0 h1:qTQ38m7oIyd4GAed/QkUZyPFNMnvVWyazGXRwvOt5zk= +github.com/dgraph-io/ristretto/v2 v2.3.0/go.mod h1:gpoRV3VzrEY1a9dWAYV6T1U7YzfgttXdd/ZzL1s9OZM= +github.com/dgryski/go-farm v0.0.0-20240924180020-3414d57e47da h1:aIftn67I1fkbMa512G+w+Pxci9hJPB8oMnkcP3iZF38= +github.com/dgryski/go-farm v0.0.0-20240924180020-3414d57e47da/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= 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/dlclark/regexp2 v1.11.2 h1:/u628IuisSTwri5/UKloiIsH8+qF2Pu7xEQX+yIKg68= github.com/dlclark/regexp2 v1.11.2/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/docker/docker v28.5.2+incompatible h1:DBX0Y0zAjZbSrm1uzOkdr1onVghKaftjlSWt4AFexzM= -github.com/docker/docker v28.5.2+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-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= +github.com/docker/go-connections v0.6.0/go.mod h1:AahvXYshr6JgfUJGdDCs2b5EZG/vmaMAntpSFH5BFKE= 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/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 h1:2tV76y6Q9BB+NEBasnqvs7e49aEBFI8ejC89PSnWH+4= @@ -148,8 +154,8 @@ github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707/go.mod h1:qssHWj6 github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/ebitengine/purego v0.8.4 h1:CF7LEKg5FFOsASUj0+QwaXf8Ht6TlFxg09+S9wz0omw= -github.com/ebitengine/purego v0.8.4/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= +github.com/ebitengine/purego v0.10.0 h1:QIw4xfpWT6GWTzaW5XEKy3HXoqrJGx1ijYHzTF0/ISU= +github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -274,8 +280,6 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDa github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.2 h1:sGm2vDRFUrQJO/Veii4h4zG2vvqG6uWNkBHSTqXOZk0= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.2/go.mod h1:wd1YpapPLivG6nQgbf7ZkG1hhSOXDhhn4MLTknx2aAc= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0 h1:CWyXh/jylQWp2dtiV33mY4iSSp6yf4lmn+c7/tN+ObI= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0/go.mod h1:nCLIt0w3Ept2NwF8ThLmrppXsfT07oC8k0XNDxd8sVU= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -325,8 +329,8 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X 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.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -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/klauspost/compress v1.18.5 h1:/h1gH5Ce+VWNLSWqPzOVn6XBO+vJbCNGvjoaGBFW2IE= +github.com/klauspost/compress v1.18.5/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU= github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= @@ -360,8 +364,6 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U= github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -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/mholt/archiver/v4 v4.0.0-alpha.9 h1:EZgAsW6DsuawxDgTtIdjCUBa2TQ6AOe9pnCidofSRtE= github.com/mholt/archiver/v4 v4.0.0-alpha.9/go.mod h1:5D3uct315OMkMRXKwEuMB+wQi/2m5NQngKDmApqwVlo= github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk= @@ -372,12 +374,14 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= 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/go-archive v0.2.0 h1:zg5QDUM2mi0JIM9fdQZWC7U8+2ZfixfTYoHL7rWUcP8= +github.com/moby/go-archive v0.2.0/go.mod h1:mNeivT14o8xU+5q1YnNrkQVpK+dnNe/K6fHqnTg4qPU= +github.com/moby/moby/api v1.54.1 h1:TqVzuJkOLsgLDDwNLmYqACUuTehOHRGKiPhvH8V3Nn4= +github.com/moby/moby/api v1.54.1/go.mod h1:+RQ6wluLwtYaTd1WnPLykIDPekkuyD/ROWQClE83pzs= +github.com/moby/moby/client v0.4.0 h1:S+2XegzHQrrvTCvF6s5HFzcrywWQmuVnhOXe2kiWjIw= +github.com/moby/moby/client v0.4.0/go.mod h1:QWPbvWchQbxBNdaLSpoKpCdf5E+WxFAgNHogCWDoa7g= +github.com/moby/patternmatcher v0.6.1 h1:qlhtafmr6kgMIJjKJMDmMWq7WLkKIo23hsrpR3x084U= +github.com/moby/patternmatcher v0.6.1/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= 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= @@ -391,8 +395,6 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/nwaples/rardecode/v2 v2.2.0 h1:4ufPGHiNe1rYJxYfehALLjup4Ls3ck42CWwjKiOqu0A= github.com/nwaples/rardecode/v2 v2.2.0/go.mod h1:7uz379lSxPe6j9nvzxUZ+n7mnJNgjsRNb6IbvGVHRmw= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -438,10 +440,10 @@ github.com/qor5/web v1.3.2 h1:zw796YJeDLe8vRwGR1cM+uS1ZuSkPutchBEXv2GgOhI= github.com/qor5/web v1.3.2/go.mod h1:LszskQJbFQDJwOeZC6j6afOiHxxyjrzz8B3zuBwfgKQ= github.com/qor5/web/v3 v3.0.12-0.20250618085230-3764d0e521a8 h1:s3jBS5bq6VX56GicRPCeXvb0TRLSz5w1xJHymPnhTuo= github.com/qor5/web/v3 v3.0.12-0.20250618085230-3764d0e521a8/go.mod h1:hrhZ4nc1U+AOBrGmnUoRUPpA9fymxlAbNfGvn9TJLns= -github.com/qor5/x/v3 v3.2.1-0.20251126082016-f61128fc8187 h1:UgNQaB050ke+uSaA0YtOzdoef8VmBd6CDXXQDW3Brcs= -github.com/qor5/x/v3 v3.2.1-0.20251126082016-f61128fc8187/go.mod h1:63Xf2S/u3kCH/ByS8Q+XCJOAAv8CvFO2GtMOO7kHITk= -github.com/redis/go-redis/v9 v9.11.0 h1:E3S08Gl/nJNn5vkxd2i78wZxWAPNZgUNTp8WIJUAiIs= -github.com/redis/go-redis/v9 v9.11.0/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw= +github.com/qor5/x/v3 v3.2.1-0.20260513053223-8d1b87070f73 h1:su/k3bOiuCxT2oXQXNz/+MgqauINgrFAfV8G5ydhZDw= +github.com/qor5/x/v3 v3.2.1-0.20260513053223-8d1b87070f73/go.mod h1:e1efYlhlz+dQi2sbcL2LsUHBPkaFDbcBEIzEZ2pypTY= +github.com/redis/go-redis/v9 v9.16.0 h1:OotgqgLSRCmzfqChbQyG1PHC3tLNR89DG4jdOERSEP4= +github.com/redis/go-redis/v9 v9.16.0/go.mod h1:u410H11HMLoB+TP67dz8rL9s6QW2j76l0//kSOd3370= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= @@ -456,13 +458,13 @@ github.com/sagikazarmark/locafero v0.6.0 h1:ON7AQg37yzcRPU69mt7gwhFEBwxI6P9T4Qu3 github.com/sagikazarmark/locafero v0.6.0/go.mod h1:77OmuIc6VTraTXKXIs/uvUxKGUXjE1GbemJYHqdNjX0= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= -github.com/samber/lo v1.50.0 h1:XrG0xOeHs+4FQ8gJR97zDz5uOFMW7OwFWiFVzqopKgY= -github.com/samber/lo v1.50.0/go.mod h1:RjZyNk6WSnUFRKK6EyOhsRJMqft3G+pg7dCWHQCWvsc= +github.com/samber/lo v1.52.0 h1:Rvi+3BFHES3A8meP33VPAxiBZX/Aws5RxrschYGjomw= +github.com/samber/lo v1.52.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0= github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= -github.com/shirou/gopsutil/v4 v4.25.6 h1:kLysI2JsKorfaFPcYmcJqbzROzsBWEOAtw6A7dIfqXs= -github.com/shirou/gopsutil/v4 v4.25.6/go.mod h1:PfybzyydfZcN+JMMjkF6Zb8Mq1A/VcogFFg7hj50W9c= +github.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc= +github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ= github.com/shurcooL/github_flavored_markdown v0.0.0-20210228213109-c3a9aa474629 h1:86e54L0i3pH3dAIA8OxBbfLrVyhoGpnNk1iJCigAWYs= github.com/shurcooL/github_flavored_markdown v0.0.0-20210228213109-c3a9aa474629/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636 h1:aSISeOcal5irEhJd1M+IrApc0PdcN7e7Aj4yuEnOrfQ= @@ -478,8 +480,8 @@ github.com/shurcooL/octicon v0.0.0-20230705024016-66bff059edb8/go.mod h1:hWBWTvI github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= +github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/sorairolake/lzip-go v0.3.5 h1:ms5Xri9o1JBIWvOFAorYtUNik6HI3HgBTkISiqu0Cwg= github.com/sorairolake/lzip-go v0.3.5/go.mod h1:N0KYq5iWrMXI0ZEXKXaS9hCyOjZUQdBDEIbXfoUwbdk= github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d h1:yKm7XZV6j9Ev6lojP2XaIshpT4ymkqhMeSghO5Ps00E= @@ -502,8 +504,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -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/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= +github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -519,14 +521,14 @@ github.com/sunfmin/reflectutils v1.0.6 h1:tX1ecTgYLsv2F8iBO2JL3BY2AdMtyFz/ir3ip+ github.com/sunfmin/reflectutils v1.0.6/go.mod h1:ao2bbF4RZrTe2PboJKdZoC3BA71gdU6rFkCuUjoeqMw= github.com/sunfmin/snippetgo v0.0.3 h1:pMCpFCyW2fYHhfLp4tb5ccvTCpIuSNFomtDCr9duUaE= github.com/sunfmin/snippetgo v0.0.3/go.mod h1:Ue+VuRdcJfuRkdxawPJOYYqKw1MgeJNwAz1qCc1pazQ= -github.com/testcontainers/testcontainers-go v0.38.0 h1:d7uEapLcv2P8AvH8ahLqDMMxda2W9gQN1nRbHS28HBw= -github.com/testcontainers/testcontainers-go v0.38.0/go.mod h1:C52c9MoHpWO+C4aqmgSU+hxlR5jlEayWtgYrb8Pzz1w= -github.com/testcontainers/testcontainers-go/modules/redis v0.38.0 h1:289pn0BFmGqDrd6BrImZAprFef9aaPZacx07YOQaPV4= -github.com/testcontainers/testcontainers-go/modules/redis v0.38.0/go.mod h1:EcKPWRzOglnQfYe+ekA8RPEIWSNJTGwaC5oE5bQV+D0= +github.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY= +github.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30= github.com/theplant/appkit v0.0.0-20250528023215-3d0d299dc4c6 h1:LQEFJ4e9i7Yyv0Drk2/rZOakxzFWATFwpcjwW8E2wuU= github.com/theplant/appkit v0.0.0-20250528023215-3d0d299dc4c6/go.mod h1:Eg9VHkTQzjBVksZIMq9SkmbOcrCiOm4objkq0LhH+Io= github.com/theplant/bimg v1.1.1 h1:97KW0oDbGt8d3K7vu2rgM88gT/+beWzTu0ZwtlqcxwE= github.com/theplant/bimg v1.1.1/go.mod h1:H0qlp9lKZoOO4akI0VxEtxO8lgLBLNuhF/+2U00LSPg= +github.com/theplant/cachex v0.0.0-20251210183652-8e675368cbc5 h1:roeBaBACCiwz+AQXhacgxiXp/ox9dHFYxn74O9FZFAU= +github.com/theplant/cachex v0.0.0-20251210183652-8e675368cbc5/go.mod h1:k5GJHmyK7DpbyiY3u5LaWoVMyT+W0F/Nbw6113alJqc= github.com/theplant/docgo v0.0.16 h1:6K6IHfeQ0sx9k7b1h9L6RV2pD0SiN8TAQm1RNLYezgU= github.com/theplant/docgo v0.0.16/go.mod h1:VDDR3mbqaLRTxa6SfZdFfDAf1QNtY9nr0TQLURWtFLg= github.com/theplant/gofixtures v1.1.3 h1:7mkHqixDIYhuEu/4/HMq49lESVuL+lZvObCILfHAanw= @@ -535,16 +537,14 @@ github.com/theplant/htmlgo v1.0.3 h1:G7/YSf8OrOIRHVQ13avd78T/GV1kDl/jMwpQURrXB0o github.com/theplant/htmlgo v1.0.3/go.mod h1:pCKSFJsoVNkyW+yN2i1Mst+8130NSQzIU7L2IbnuyKg= github.com/theplant/htmltestingutils v0.0.0-20190423050759-0e06de7b6967 h1:yPrgtU8bj7Q/XbXgjjmngZtOhsUufBAraruNwxv/eXM= github.com/theplant/htmltestingutils v0.0.0-20190423050759-0e06de7b6967/go.mod h1:86iN4EAYaQbx1VTW5uPslTIviRkYH8CzslMC//g+BgY= -github.com/theplant/inject v1.1.0 h1:Bxiu4rXQN0BJSwNHAMPszkiySmozPTYZvbhaOKJr+lg= -github.com/theplant/inject v1.1.0/go.mod h1:vuuYp7lKifex8HfI4izobKSqulfhpWIvGvW2/pP4Rqo= +github.com/theplant/inject v1.2.2 h1:TVJVOKBQpMWPPHrjuivr6/oXIPMEr90OzxpOSz2kP74= +github.com/theplant/inject v1.2.2/go.mod h1:VFF27CAA2RdajLKbwsXLtZfr927sdmntRWcGVrkDfmU= github.com/theplant/osenv v0.0.2 h1:SI2I/gLQQj5pQgpBQ8YKx/u4i7KE7yG2Gmr/ZORuxn8= github.com/theplant/osenv v0.0.2/go.mod h1:gUdlLzvmJb/dyBmXk+qEWiIhAN1tmVhYktzK1HHEz3c= -github.com/theplant/relay v0.8.0 h1:pch57yct/dnM3Mf0zmQEppC4No4Hv2Qu0R36iHDvHZw= -github.com/theplant/relay v0.8.0/go.mod h1:foaZGFIC3gXypZEhCD3Aan8Y5F/s9Whhz+AmYXEMaUs= +github.com/theplant/relay v0.9.1-0.20260513061314-56c1fe07cc94 h1:NvNtXX06ArdfHBTTe9A/RVtrRyXa/yNgEd4oxQlzJPg= +github.com/theplant/relay v0.9.1-0.20260513061314-56c1fe07cc94/go.mod h1:j/C6bUJj+I77h2v5V/7wbshAzc/qCAr8hb9A6VoGxvA= github.com/theplant/sliceutils v0.0.0-20200406042209-89153d988eb1 h1:EP+XW/tiUH8Cr1MSu7wKhpUnt4QzbVv5J5CoB6R32S4= github.com/theplant/sliceutils v0.0.0-20200406042209-89153d988eb1/go.mod h1:+y978w//UsVK85wVF9XJey9qTGDv+4kQc8v3Mf/ZjmE= -github.com/theplant/testenv v0.2.1 h1:GL80bSN7GHs4tl98W1ufdd2YcQ0BkHncWSgsOZsNY6U= -github.com/theplant/testenv v0.2.1/go.mod h1:/Eq/353mtHC7t1VzGpZ/dzGI/YQ5QN1kZMB0+5GqCn4= github.com/theplant/testingutils v0.0.2 h1:ryFb7J8NPnyMA4mdgBEf5ha3QUqWA9WVulWGyUbH2u4= github.com/theplant/testingutils v0.0.2/go.mod h1:nh7wj3YTJehg0PBHnPXtvqIqdnBUn0Gqb79JHnblFuc= github.com/theplant/validator v0.0.0-20210202101755-357a9daa8f5f h1:VQbZHMv9xuUihaRESflntL8VIi/cI6nVaP6a+F78BkU= @@ -561,10 +561,10 @@ github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= -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/tklauser/go-sysconf v0.3.16 h1:frioLaCQSsF5Cy1jgRBrzr6t502KIIwQ0MArYICU0nA= +github.com/tklauser/go-sysconf v0.3.16/go.mod h1:/qNL9xxDhc7tx3HSRsLWNnuzbVfh3e7gh/BmM179nYI= +github.com/tklauser/numcpus v0.11.0 h1:nSTwhKH5e1dMNsCdVBukSZrURJRoHbSEQjdEbY+9RXw= +github.com/tklauser/numcpus v0.11.0/go.mod h1:z+LwcLq54uWZTX0u/bGobaV34u6V7KNlTZejzM6/3MQ= github.com/tnclong/go-que v0.0.0-20240226030728-4e1f3c8ec781 h1:Ac5cfBvNehOu4koOGOqNer4uMDCjWcfmLWZxUvmqyr4= github.com/tnclong/go-que v0.0.0-20240226030728-4e1f3c8ec781/go.mod h1:j+L/Ih47BU2nmiEW1m5zS2gjxB6xqGyxzHfdXLg/3Ho= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 h1:SIKIoA4e/5Y9ZOl0DCe3eVMLPOQzJxgZpfdHHeauNTM= @@ -583,6 +583,8 @@ github.com/yosssi/gohtml v0.0.0-20201013000340-ee4748c638f4/go.mod h1:+ccdNT0xMY github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M= +github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -593,22 +595,16 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 h1:Hf9xI/XLML9ElpiHVDNwvqI0hIFlzV8dgIr35kV1kRU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0/go.mod h1:NfchwuyNoMcZ5MLHwPrODwUF1HWCXWrL31s8gSAdIKY= -go.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c= -go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= -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.28.0 h1:j9+03ymgYhPKmeXGk5Zu+cIZOlVzd9Zv7QIiyItjFBU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= -go.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ= -go.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps= -go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18= -go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE= -go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8= -go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew= -go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0= -go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= -go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= -go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= +go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I= +go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0= +go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM= +go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY= +go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg= +go.opentelemetry.io/otel/sdk v1.43.0/go.mod h1:P+IkVU3iWukmiit/Yf9AWvpyRDlUeBaRg6Y+C58QHzg= +go.opentelemetry.io/otel/sdk/metric v1.43.0 h1:S88dyqXjJkuBNLeMcVPRFXpRw2fuwdvfCGLEo89fDkw= +go.opentelemetry.io/otel/sdk/metric v1.43.0/go.mod h1:C/RJtwSEJ5hzTiUz5pXF1kILHStzb9zFlIEe85bhj6A= +go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A= +go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -701,8 +697,8 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw= -golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/oauth2 v0.35.0 h1:Mv2mzuHuZuY2+bkyWXIHMfhNdJAdwW3FuWeCPYN5GVQ= +golang.org/x/oauth2 v0.35.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= 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= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -742,7 +738,6 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -818,8 +813,8 @@ 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= -gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= -gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= +gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -847,11 +842,8 @@ google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= -google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 h1:fCvbg86sFXwdrl5LgVcTEvNC+2txB5mgROGmRL5mrls= -google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:+rXWjjaukWZun3mLfjmVnQi18E1AsFbDN9QdJ5YXLto= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260319201613-d00831a3d3e7 h1:ndE4FoJqsIceKP2oYSnUZqhTdYufCYYkqwtFzfrhI7w= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260319201613-d00831a3d3e7/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9 h1:m8qni9SQFH0tJc1X0vmnpw/0t+AImlSvp30sEupozUg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -861,8 +853,8 @@ google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.79.3 h1:sybAEdRIEtvcD68Gx7dmnwjZKlyfuc61Dyo9pGXXkKE= -google.golang.org/grpc v1.79.3/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= +google.golang.org/grpc v1.80.0 h1:Xr6m2WmWZLETvUNvIUmeD5OAagMw3FiKmMlTdViWsHM= +google.golang.org/grpc v1.80.0/go.mod h1:ho/dLnxwi3EDJA4Zghp7k2Ec1+c2jqup0bFkw07bwF4= google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -893,13 +885,13 @@ gorm.io/driver/mysql v1.5.6 h1:Ld4mkIickM+EliaQZQx3uOJDJHtrd70MxAUqWqlx3Y8= gorm.io/driver/mysql v1.5.6/go.mod h1:sEtPWMiqiN1N1cMXoXmBbd8C6/l+TESwriotuRRpkDM= gorm.io/driver/postgres v1.6.0 h1:2dxzU8xJ+ivvqTRph34QX+WrRaJlmfyPqXmoGVjMBa4= gorm.io/driver/postgres v1.6.0/go.mod h1:vUw0mrGgrTK+uPHEhAdV4sfFELrByKVGnaVRkXDhtWo= -gorm.io/driver/sqlite v1.5.6 h1:fO/X46qn5NUEEOZtnjJRWRzZMe8nqJiQ9E+0hi+hKQE= -gorm.io/driver/sqlite v1.5.6/go.mod h1:U+J8craQU6Fzkcvu8oLeAQmi50TkwPEhHDEjQZXDah4= +gorm.io/driver/sqlite v1.6.0 h1:WHRRrIiulaPiPFmDcod6prc4l2VGVWHz80KspNsxSfQ= +gorm.io/driver/sqlite v1.6.0/go.mod h1:AO9V1qIQddBESngQUKWL9yoH93HIeA1X6V633rBwyT8= gorm.io/driver/sqlserver v1.6.0 h1:VZOBQVsVhkHU/NzNhRJKoANt5pZGQAS1Bwc6m6dgfnc= gorm.io/driver/sqlserver v1.6.0/go.mod h1:WQzt4IJo/WHKnckU9jXBLMJIVNMVeTu25dnOzehntWw= gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= -gorm.io/gorm v1.30.1 h1:lSHg33jJTBxs2mgJRfRZeLDG+WZaHYCk3Wtfl6Ngzo4= -gorm.io/gorm v1.30.1/go.mod h1:8Z33v652h4//uMA76KjeDH8mJXPm1QNCYrMeatR0DOE= +gorm.io/gorm v1.31.1 h1:7CA8FTFz/gRfgqgpeKIBcervUn3xSyPUmr6B2WXJ7kg= +gorm.io/gorm v1.31.1/go.mod h1:XyQVbO2k6YkOis7C2437jSit3SsDK72s7n7rsSHd+Gs= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -907,6 +899,8 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= +pgregory.net/rapid v1.2.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/media/integration/integration_test.go b/media/integration/integration_test.go index e3c3c298b..e065074e7 100644 --- a/media/integration/integration_test.go +++ b/media/integration/integration_test.go @@ -10,12 +10,14 @@ import ( "github.com/qor5/web/v3/multipartestutils" "github.com/qor5/x/v3/oss/filesystem" "github.com/stretchr/testify/require" - "github.com/theplant/testenv" "gorm.io/gorm" "github.com/qor5/admin/v3/media/base" "github.com/qor5/admin/v3/media/media_library" "github.com/qor5/admin/v3/media/oss" + "github.com/qor5/x/v3/gormx" + "gorm.io/driver/postgres" + "context" ) //go:embed *.png @@ -24,12 +26,16 @@ var box embed.FS var TestDB *gorm.DB func TestMain(m *testing.M) { - env, err := testenv.New().DBEnable(true).SetUp() + ctx := context.Background() + pgContainer, err := gormx.OpenContainer(ctx, nil) + if err != nil { + panic(err) + } + defer func() { _ = pgContainer.Terminate(ctx) }() + TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) if err != nil { panic(err) } - defer env.TearDown() - TestDB = env.DB m.Run() } diff --git a/pagebuilder/publish_test.go b/pagebuilder/publish_test.go index adf1bf6b6..daa900932 100644 --- a/pagebuilder/publish_test.go +++ b/pagebuilder/publish_test.go @@ -5,22 +5,27 @@ import ( "testing" "github.com/theplant/gofixtures" - "github.com/theplant/testenv" "gorm.io/gorm" "gorm.io/gorm/logger" "github.com/qor5/admin/v3/presets" + "github.com/qor5/x/v3/gormx" + "gorm.io/driver/postgres" ) var TestDB *gorm.DB func TestMain(m *testing.M) { - env, err := testenv.New().DBEnable(true).SetUp() + ctx := context.Background() + pgContainer, err := gormx.OpenContainer(ctx, nil) + if err != nil { + panic(err) + } + defer func() { _ = pgContainer.Terminate(ctx) }() + TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) if err != nil { panic(err) } - defer env.TearDown() - TestDB = env.DB TestDB.Logger = TestDB.Logger.LogMode(logger.Info) m.Run() } diff --git a/presets/integration/example_test.go b/presets/integration/example_test.go index 378c732e9..e57368ad8 100644 --- a/presets/integration/example_test.go +++ b/presets/integration/example_test.go @@ -8,23 +8,29 @@ import ( . "github.com/qor5/web/v3/multipartestutils" "github.com/theplant/gofixtures" - "github.com/theplant/testenv" "gorm.io/gorm" "github.com/qor5/admin/v3/presets" "github.com/qor5/admin/v3/presets/actions" "github.com/qor5/admin/v3/presets/examples" + "github.com/qor5/x/v3/gormx" + "gorm.io/driver/postgres" + "context" ) var TestDB *gorm.DB func TestMain(m *testing.M) { - env, err := testenv.New().DBEnable(true).SetUp() + ctx := context.Background() + pgContainer, err := gormx.OpenContainer(ctx, nil) + if err != nil { + panic(err) + } + defer func() { _ = pgContainer.Terminate(ctx) }() + TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) if err != nil { panic(err) } - defer env.TearDown() - TestDB = env.DB m.Run() } diff --git a/publish/publish_test.go b/publish/publish_test.go index 9de50ee78..65e114cea 100644 --- a/publish/publish_test.go +++ b/publish/publish_test.go @@ -13,11 +13,12 @@ import ( "github.com/qor5/x/v3/oss" "github.com/stretchr/testify/require" "github.com/theplant/sliceutils" - "github.com/theplant/testenv" "github.com/theplant/testingutils" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/logger" + "github.com/qor5/x/v3/gormx" + "gorm.io/driver/postgres" ) type Product struct { @@ -211,12 +212,16 @@ func (m *MockStorage) Delete(ctx context.Context, path string) error { var TestDB *gorm.DB func TestMain(m *testing.M) { - env, err := testenv.New().DBEnable(true).SetUp() + ctx := context.Background() + pgContainer, err := gormx.OpenContainer(ctx, nil) + if err != nil { + panic(err) + } + defer func() { _ = pgContainer.Terminate(ctx) }() + TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) if err != nil { panic(err) } - defer env.TearDown() - TestDB = env.DB TestDB.Logger = TestDB.Logger.LogMode(logger.Info) m.Run() diff --git a/redirection/redirection_test.go b/redirection/redirection_test.go index 5007195e1..d136daf31 100644 --- a/redirection/redirection_test.go +++ b/redirection/redirection_test.go @@ -7,9 +7,11 @@ import ( "github.com/qor5/web/v3" "github.com/theplant/gofixtures" - "github.com/theplant/testenv" "gorm.io/gorm" "gorm.io/gorm/logger" + "github.com/qor5/x/v3/gormx" + "gorm.io/driver/postgres" + "context" ) var ( @@ -31,12 +33,16 @@ func TestMain(m *testing.M) { successUrl = mockServer.URL + "/success" failedUrl = mockServer.URL + "/failure" defer mockServer.Close() - env, err := testenv.New().DBEnable(true).SetUp() + ctx := context.Background() + pgContainer, err := gormx.OpenContainer(ctx, nil) + if err != nil { + panic(err) + } + defer func() { _ = pgContainer.Terminate(ctx) }() + TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) if err != nil { panic(err) } - defer env.TearDown() - TestDB = env.DB TestDB.Logger = TestDB.Logger.LogMode(logger.Info) b = &Builder{db: TestDB} b.AutoMigrate() diff --git a/seo/helper_test.go b/seo/helper_test.go index 39cd24336..86d6e8502 100644 --- a/seo/helper_test.go +++ b/seo/helper_test.go @@ -7,19 +7,25 @@ import ( _ "github.com/lib/pq" "github.com/qor5/admin/v3/l10n" - "github.com/theplant/testenv" "gorm.io/gorm" + "github.com/qor5/x/v3/gormx" + "gorm.io/driver/postgres" + "context" ) var dbForTest *gorm.DB func TestMain(m *testing.M) { - env, err := testenv.New().DBEnable(true).SetUp() + ctx := context.Background() + pgContainer, err := gormx.OpenContainer(ctx, nil) + if err != nil { + panic(err) + } + defer func() { _ = pgContainer.Terminate(ctx) }() + dbForTest, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) if err != nil { panic(err) } - defer env.TearDown() - dbForTest = env.DB err = dbForTest.AutoMigrate(&QorSEOSetting{}) if err != nil { panic("failed to migrate db") diff --git a/worker/integration_test/setup_test.go b/worker/integration_test/setup_test.go index 1fea22f08..d08fafdc3 100644 --- a/worker/integration_test/setup_test.go +++ b/worker/integration_test/setup_test.go @@ -20,8 +20,9 @@ import ( "github.com/qor5/web/v3" . "github.com/qor5/x/v3/ui/vuetify" h "github.com/theplant/htmlgo" - "github.com/theplant/testenv" "gorm.io/gorm" + "github.com/qor5/x/v3/gormx" + "gorm.io/driver/postgres" ) var ( @@ -30,12 +31,16 @@ var ( ) func TestMain(m *testing.M) { - env, err := testenv.New().DBEnable(true).SetUp() + ctx := context.Background() + pgContainer, err := gormx.OpenContainer(ctx, nil) + if err != nil { + panic(err) + } + defer func() { _ = pgContainer.Terminate(ctx) }() + db, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) if err != nil { panic(err) } - defer env.TearDown() - db = env.DB pb = presets.New(). DataOperator(gorm2op.DataOperator(db)) From 36bb93eb7545956ddf0326202f4e0b196f3e2518 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Wed, 13 May 2026 06:20:03 +0000 Subject: [PATCH 2/3] style: format code with Gofumpt This commit fixes the style issues introduced in 0841dd0 according to the output from Gofumpt. Details: https://github.com/qor5/admin/pull/1075 --- activity/builder_test.go | 4 ++-- activity/tests/gorm_test.go | 6 +++--- autocomplete/integration/autocomplete_test.go | 6 +++--- cmd/qor5/website-template/admin/integration_test.go | 2 +- docs/docsrc/examples/examples_admin/db_test.go | 6 +++--- .../docsrc/examples/examples_admin/publish_test/env_test.go | 4 ++-- docs/docsrc/examples/examples_presets/presets_test.go | 6 +++--- example/integration/pagebuilder_test.go | 2 +- media/integration/integration_test.go | 2 +- presets/integration/example_test.go | 2 +- publish/publish_test.go | 4 ++-- redirection/redirection_test.go | 6 +++--- seo/helper_test.go | 4 ++-- worker/integration_test/setup_test.go | 4 ++-- 14 files changed, 29 insertions(+), 29 deletions(-) diff --git a/activity/builder_test.go b/activity/builder_test.go index 61247e6ce..e9eb8b5e3 100644 --- a/activity/builder_test.go +++ b/activity/builder_test.go @@ -10,11 +10,11 @@ import ( "github.com/qor5/admin/v3/presets" "github.com/qor5/admin/v3/presets/gorm2op" "github.com/qor5/web/v3" + "github.com/qor5/x/v3/gormx" "github.com/stretchr/testify/require" + "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/logger" - "github.com/qor5/x/v3/gormx" - "gorm.io/driver/postgres" ) var db *gorm.DB diff --git a/activity/tests/gorm_test.go b/activity/tests/gorm_test.go index 4b78c00aa..de5ea3df0 100644 --- a/activity/tests/gorm_test.go +++ b/activity/tests/gorm_test.go @@ -2,15 +2,15 @@ package activity import ( "cmp" + "context" "testing" + "github.com/qor5/x/v3/gormx" "github.com/stretchr/testify/require" + "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/logger" "gorm.io/gorm/schema" - "github.com/qor5/x/v3/gormx" - "gorm.io/driver/postgres" - "context" ) type Foo struct { diff --git a/autocomplete/integration/autocomplete_test.go b/autocomplete/integration/autocomplete_test.go index 360af25f9..5c7215722 100644 --- a/autocomplete/integration/autocomplete_test.go +++ b/autocomplete/integration/autocomplete_test.go @@ -2,6 +2,7 @@ package integration_test import ( "bytes" + "context" "encoding/json" "net/http" "net/http/httptest" @@ -10,12 +11,11 @@ import ( "github.com/qor5/admin/v3/autocomplete" + "github.com/qor5/x/v3/gormx" "github.com/theplant/gofixtures" + "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/logger" - "github.com/qor5/x/v3/gormx" - "gorm.io/driver/postgres" - "context" ) var TestDB *gorm.DB diff --git a/cmd/qor5/website-template/admin/integration_test.go b/cmd/qor5/website-template/admin/integration_test.go index 54b4d3ea5..a9eddba11 100644 --- a/cmd/qor5/website-template/admin/integration_test.go +++ b/cmd/qor5/website-template/admin/integration_test.go @@ -1,6 +1,7 @@ package admin_test import ( + "context" "database/sql" "net/http" "net/http/httptest" @@ -17,7 +18,6 @@ import ( "github.com/qor5/admin/v3/cmd/qor5/website-template/admin" "github.com/qor5/x/v3/gormx" "gorm.io/driver/postgres" - "context" ) var ( diff --git a/docs/docsrc/examples/examples_admin/db_test.go b/docs/docsrc/examples/examples_admin/db_test.go index 9cdfd9dcf..211144a69 100644 --- a/docs/docsrc/examples/examples_admin/db_test.go +++ b/docs/docsrc/examples/examples_admin/db_test.go @@ -1,14 +1,14 @@ package examples_admin import ( + "context" "database/sql" "testing" - "gorm.io/gorm" - "gorm.io/gorm/logger" "github.com/qor5/x/v3/gormx" "gorm.io/driver/postgres" - "context" + "gorm.io/gorm" + "gorm.io/gorm/logger" ) var ( diff --git a/docs/docsrc/examples/examples_admin/publish_test/env_test.go b/docs/docsrc/examples/examples_admin/publish_test/env_test.go index 8667342b1..e01c7f5be 100644 --- a/docs/docsrc/examples/examples_admin/publish_test/env_test.go +++ b/docs/docsrc/examples/examples_admin/publish_test/env_test.go @@ -1,6 +1,7 @@ package publish_test import ( + "context" "database/sql" "net/http" "testing" @@ -8,10 +9,9 @@ import ( "github.com/qor5/admin/v3/docs/docsrc/examples/examples_admin" "github.com/qor5/admin/v3/presets" "github.com/qor5/admin/v3/presets/gorm2op" - "gorm.io/gorm" "github.com/qor5/x/v3/gormx" "gorm.io/driver/postgres" - "context" + "gorm.io/gorm" ) var ( diff --git a/docs/docsrc/examples/examples_presets/presets_test.go b/docs/docsrc/examples/examples_presets/presets_test.go index 9ef8bbe86..ef98232f0 100644 --- a/docs/docsrc/examples/examples_presets/presets_test.go +++ b/docs/docsrc/examples/examples_presets/presets_test.go @@ -1,6 +1,7 @@ package examples_presets import ( + "context" "database/sql" "net/http" "net/http/httptest" @@ -9,11 +10,10 @@ import ( "github.com/qor5/admin/v3/presets" "github.com/qor5/admin/v3/presets/gorm2op" "github.com/qor5/web/v3/multipartestutils" - "gorm.io/gorm" - "gorm.io/gorm/logger" "github.com/qor5/x/v3/gormx" "gorm.io/driver/postgres" - "context" + "gorm.io/gorm" + "gorm.io/gorm/logger" ) var ( diff --git a/example/integration/pagebuilder_test.go b/example/integration/pagebuilder_test.go index 148469341..02591e9cf 100644 --- a/example/integration/pagebuilder_test.go +++ b/example/integration/pagebuilder_test.go @@ -1,6 +1,7 @@ package integration_test import ( + "context" "fmt" "net/http" "net/http/httptest" @@ -24,7 +25,6 @@ import ( "github.com/qor5/admin/v3/utils" "github.com/qor5/x/v3/gormx" "gorm.io/driver/postgres" - "context" ) var TestDB *gorm.DB diff --git a/media/integration/integration_test.go b/media/integration/integration_test.go index e065074e7..ace172c34 100644 --- a/media/integration/integration_test.go +++ b/media/integration/integration_test.go @@ -1,6 +1,7 @@ package integration_test import ( + "context" "embed" "os" "strings" @@ -17,7 +18,6 @@ import ( "github.com/qor5/admin/v3/media/oss" "github.com/qor5/x/v3/gormx" "gorm.io/driver/postgres" - "context" ) //go:embed *.png diff --git a/presets/integration/example_test.go b/presets/integration/example_test.go index e57368ad8..b33d00ac1 100644 --- a/presets/integration/example_test.go +++ b/presets/integration/example_test.go @@ -1,6 +1,7 @@ package integration_test import ( + "context" "fmt" "net/http" "strings" @@ -15,7 +16,6 @@ import ( "github.com/qor5/admin/v3/presets/examples" "github.com/qor5/x/v3/gormx" "gorm.io/driver/postgres" - "context" ) var TestDB *gorm.DB diff --git a/publish/publish_test.go b/publish/publish_test.go index 65e114cea..ca0c12e9e 100644 --- a/publish/publish_test.go +++ b/publish/publish_test.go @@ -10,15 +10,15 @@ import ( "time" "github.com/qor5/admin/v3/publish" + "github.com/qor5/x/v3/gormx" "github.com/qor5/x/v3/oss" "github.com/stretchr/testify/require" "github.com/theplant/sliceutils" "github.com/theplant/testingutils" + "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/logger" - "github.com/qor5/x/v3/gormx" - "gorm.io/driver/postgres" ) type Product struct { diff --git a/redirection/redirection_test.go b/redirection/redirection_test.go index d136daf31..8b9636ab4 100644 --- a/redirection/redirection_test.go +++ b/redirection/redirection_test.go @@ -1,17 +1,17 @@ package redirection import ( + "context" "net/http" "net/http/httptest" "testing" "github.com/qor5/web/v3" + "github.com/qor5/x/v3/gormx" "github.com/theplant/gofixtures" + "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/logger" - "github.com/qor5/x/v3/gormx" - "gorm.io/driver/postgres" - "context" ) var ( diff --git a/seo/helper_test.go b/seo/helper_test.go index 86d6e8502..e0fd8edaf 100644 --- a/seo/helper_test.go +++ b/seo/helper_test.go @@ -1,16 +1,16 @@ package seo import ( + "context" "os" "strings" "testing" _ "github.com/lib/pq" "github.com/qor5/admin/v3/l10n" - "gorm.io/gorm" "github.com/qor5/x/v3/gormx" "gorm.io/driver/postgres" - "context" + "gorm.io/gorm" ) var dbForTest *gorm.DB diff --git a/worker/integration_test/setup_test.go b/worker/integration_test/setup_test.go index d08fafdc3..fa8394015 100644 --- a/worker/integration_test/setup_test.go +++ b/worker/integration_test/setup_test.go @@ -18,11 +18,11 @@ import ( "github.com/qor5/admin/v3/worker" integration "github.com/qor5/admin/v3/worker/integration_test" "github.com/qor5/web/v3" + "github.com/qor5/x/v3/gormx" . "github.com/qor5/x/v3/ui/vuetify" h "github.com/theplant/htmlgo" - "gorm.io/gorm" - "github.com/qor5/x/v3/gormx" "gorm.io/driver/postgres" + "gorm.io/gorm" ) var ( From fb934dd69ff722fc33eb8edf5cca2dff41cd75a0 Mon Sep 17 00:00:00 2001 From: dorothyyzh Date: Wed, 13 May 2026 15:27:34 +0800 Subject: [PATCH 3/3] chore: switch tests to gormx.MustStartRawTestSuite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace OpenContainer + gorm.Open hand-wiring in all 15 admin _test.go files with the new MustStartRawTestSuite helper (qor5/x f23cd74e). Equivalent behavior in fewer lines, with lifecycle-managed container teardown. Plain MustStartTestSuite was not an option here: SetupDatabase installs OmitAssociationsPlugin / TracingPlugin, which silently change GORM semantics (some admin tests exercise associations) and pollute test output with JSON log lines. Verification: - `go vet ./...` clean except a pre-existing pagebuilder/model_events.go:101 unreachable-code warning (also present on main) - `go test ./activity/... ./seo/... ./redirection/...` pass (containers come up, GORM operations succeed) - `docker/docker` still absent from go.mod `go build ./...` can't complete locally — media/vips needs libvips/pkg-config (pre-existing env issue, same on main); CI should verify that package. Co-Authored-By: Claude Opus 4.7 (1M context) --- activity/builder_test.go | 17 +++++------------ activity/tests/gorm_test.go | 13 +++---------- autocomplete/integration/autocomplete_test.go | 13 +++---------- .../website-template/admin/integration_test.go | 13 +++---------- docs/docsrc/examples/examples_admin/db_test.go | 13 +++---------- .../examples_admin/publish_test/env_test.go | 14 ++++---------- .../examples/examples_presets/presets_test.go | 13 +++---------- example/integration/pagebuilder_test.go | 13 +++---------- go.mod | 2 +- go.sum | 4 ++-- media/integration/integration_test.go | 13 +++---------- pagebuilder/publish_test.go | 13 +++---------- presets/integration/example_test.go | 13 +++---------- publish/publish_test.go | 13 +++---------- redirection/redirection_test.go | 13 +++---------- seo/helper_test.go | 16 ++++------------ worker/integration_test/setup_test.go | 13 +++---------- 17 files changed, 52 insertions(+), 157 deletions(-) diff --git a/activity/builder_test.go b/activity/builder_test.go index e9eb8b5e3..b775c98b6 100644 --- a/activity/builder_test.go +++ b/activity/builder_test.go @@ -12,7 +12,6 @@ import ( "github.com/qor5/web/v3" "github.com/qor5/x/v3/gormx" "github.com/stretchr/testify/require" - "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/logger" ) @@ -43,21 +42,15 @@ type ( func TestMain(m *testing.M) { ctx := context.Background() - pgContainer, err := gormx.OpenContainer(ctx, nil) - if err != nil { - panic(err) - } - defer func() { _ = pgContainer.Terminate(ctx) }() - db, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) - if err != nil { - panic(err) - } + suite := gormx.MustStartRawTestSuite(ctx) + defer func() { _ = suite.Stop(ctx) }() + db = suite.DB() db.Logger = db.Logger.LogMode(logger.Info) - if err = AutoMigrate(db, ""); err != nil { + if err := AutoMigrate(db, ""); err != nil { panic(err) } - if err = db.AutoMigrate(&TestActivityModel{}); err != nil { + if err := db.AutoMigrate(&TestActivityModel{}); err != nil { panic(err) } diff --git a/activity/tests/gorm_test.go b/activity/tests/gorm_test.go index de5ea3df0..a74751157 100644 --- a/activity/tests/gorm_test.go +++ b/activity/tests/gorm_test.go @@ -7,7 +7,6 @@ import ( "github.com/qor5/x/v3/gormx" "github.com/stretchr/testify/require" - "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/logger" "gorm.io/gorm/schema" @@ -27,15 +26,9 @@ var db *gorm.DB func TestMain(m *testing.M) { ctx := context.Background() - pgContainer, err := gormx.OpenContainer(ctx, nil) - if err != nil { - panic(err) - } - defer func() { _ = pgContainer.Terminate(ctx) }() - db, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) - if err != nil { - panic(err) - } + suite := gormx.MustStartRawTestSuite(ctx) + defer func() { _ = suite.Stop(ctx) }() + db = suite.DB() db.Logger = db.Logger.LogMode(logger.Info) m.Run() diff --git a/autocomplete/integration/autocomplete_test.go b/autocomplete/integration/autocomplete_test.go index 5c7215722..55dd8dcda 100644 --- a/autocomplete/integration/autocomplete_test.go +++ b/autocomplete/integration/autocomplete_test.go @@ -13,7 +13,6 @@ import ( "github.com/qor5/x/v3/gormx" "github.com/theplant/gofixtures" - "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/logger" ) @@ -22,15 +21,9 @@ var TestDB *gorm.DB func TestMain(m *testing.M) { ctx := context.Background() - pgContainer, err := gormx.OpenContainer(ctx, nil) - if err != nil { - panic(err) - } - defer func() { _ = pgContainer.Terminate(ctx) }() - TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) - if err != nil { - panic(err) - } + suite := gormx.MustStartRawTestSuite(ctx) + defer func() { _ = suite.Stop(ctx) }() + TestDB = suite.DB() TestDB.Logger = TestDB.Logger.LogMode(logger.Info) m.Run() } diff --git a/cmd/qor5/website-template/admin/integration_test.go b/cmd/qor5/website-template/admin/integration_test.go index a9eddba11..218855d4e 100644 --- a/cmd/qor5/website-template/admin/integration_test.go +++ b/cmd/qor5/website-template/admin/integration_test.go @@ -17,7 +17,6 @@ import ( "github.com/qor5/admin/v3/cmd/qor5/website-template/admin" "github.com/qor5/x/v3/gormx" - "gorm.io/driver/postgres" ) var ( @@ -27,15 +26,9 @@ var ( func TestMain(m *testing.M) { ctx := context.Background() - pgContainer, err := gormx.OpenContainer(ctx, nil) - if err != nil { - panic(err) - } - defer func() { _ = pgContainer.Terminate(ctx) }() - TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) - if err != nil { - panic(err) - } + suite := gormx.MustStartRawTestSuite(ctx) + defer func() { _ = suite.Stop(ctx) }() + TestDB = suite.DB() TestDB.Logger = TestDB.Logger.LogMode(logger.Info) SqlDB, _ = TestDB.DB() m.Run() diff --git a/docs/docsrc/examples/examples_admin/db_test.go b/docs/docsrc/examples/examples_admin/db_test.go index 211144a69..bec2dee7e 100644 --- a/docs/docsrc/examples/examples_admin/db_test.go +++ b/docs/docsrc/examples/examples_admin/db_test.go @@ -6,7 +6,6 @@ import ( "testing" "github.com/qor5/x/v3/gormx" - "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/logger" ) @@ -18,15 +17,9 @@ var ( func TestMain(m *testing.M) { ctx := context.Background() - pgContainer, err := gormx.OpenContainer(ctx, nil) - if err != nil { - panic(err) - } - defer func() { _ = pgContainer.Terminate(ctx) }() - TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) - if err != nil { - panic(err) - } + suite := gormx.MustStartRawTestSuite(ctx) + defer func() { _ = suite.Stop(ctx) }() + TestDB = suite.DB() TestDB.Logger = TestDB.Logger.LogMode(logger.Info) SqlDB, _ = TestDB.DB() m.Run() diff --git a/docs/docsrc/examples/examples_admin/publish_test/env_test.go b/docs/docsrc/examples/examples_admin/publish_test/env_test.go index e01c7f5be..683c13b1a 100644 --- a/docs/docsrc/examples/examples_admin/publish_test/env_test.go +++ b/docs/docsrc/examples/examples_admin/publish_test/env_test.go @@ -10,7 +10,6 @@ import ( "github.com/qor5/admin/v3/presets" "github.com/qor5/admin/v3/presets/gorm2op" "github.com/qor5/x/v3/gormx" - "gorm.io/driver/postgres" "gorm.io/gorm" ) @@ -22,15 +21,10 @@ var ( func TestMain(m *testing.M) { ctx := context.Background() - pgContainer, err := gormx.OpenContainer(ctx, nil) - if err != nil { - panic(err) - } - defer func() { _ = pgContainer.Terminate(ctx) }() - DB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) - if err != nil { - panic(err) - } + suite := gormx.MustStartRawTestSuite(ctx) + defer func() { _ = suite.Stop(ctx) }() + DB = suite.DB() + var err error SQLDB, err = DB.DB() if err != nil { panic(err) diff --git a/docs/docsrc/examples/examples_presets/presets_test.go b/docs/docsrc/examples/examples_presets/presets_test.go index ef98232f0..7241c4a99 100644 --- a/docs/docsrc/examples/examples_presets/presets_test.go +++ b/docs/docsrc/examples/examples_presets/presets_test.go @@ -11,7 +11,6 @@ import ( "github.com/qor5/admin/v3/presets/gorm2op" "github.com/qor5/web/v3/multipartestutils" "github.com/qor5/x/v3/gormx" - "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/logger" ) @@ -23,15 +22,9 @@ var ( func TestMain(m *testing.M) { ctx := context.Background() - pgContainer, err := gormx.OpenContainer(ctx, nil) - if err != nil { - panic(err) - } - defer func() { _ = pgContainer.Terminate(ctx) }() - TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) - if err != nil { - panic(err) - } + suite := gormx.MustStartRawTestSuite(ctx) + defer func() { _ = suite.Stop(ctx) }() + TestDB = suite.DB() TestDB.Logger = TestDB.Logger.LogMode(logger.Info) SqlDB, _ = TestDB.DB() m.Run() diff --git a/example/integration/pagebuilder_test.go b/example/integration/pagebuilder_test.go index 02591e9cf..abac4ca0f 100644 --- a/example/integration/pagebuilder_test.go +++ b/example/integration/pagebuilder_test.go @@ -24,22 +24,15 @@ import ( "github.com/qor5/admin/v3/publish" "github.com/qor5/admin/v3/utils" "github.com/qor5/x/v3/gormx" - "gorm.io/driver/postgres" ) var TestDB *gorm.DB func TestMain(m *testing.M) { ctx := context.Background() - pgContainer, err := gormx.OpenContainer(ctx, nil) - if err != nil { - panic(err) - } - defer func() { _ = pgContainer.Terminate(ctx) }() - TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) - if err != nil { - panic(err) - } + suite := gormx.MustStartRawTestSuite(ctx) + defer func() { _ = suite.Stop(ctx) }() + TestDB = suite.DB() TestDB.Logger = TestDB.Logger.LogMode(logger.Info) m.Run() } diff --git a/go.mod b/go.mod index 8fe19faa0..d88a6beb9 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( github.com/qor5/imaging v1.6.4 github.com/qor5/web v1.3.2 github.com/qor5/web/v3 v3.0.12-0.20250618085230-3764d0e521a8 - github.com/qor5/x/v3 v3.2.1-0.20260513053223-8d1b87070f73 + github.com/qor5/x/v3 v3.2.1-0.20260513070857-f23cd74e1440 github.com/samber/lo v1.52.0 github.com/shurcooL/sanitized_anchor_name v1.0.0 github.com/spf13/cast v1.7.1 diff --git a/go.sum b/go.sum index e94375f9c..fb82ce8b3 100644 --- a/go.sum +++ b/go.sum @@ -440,8 +440,8 @@ github.com/qor5/web v1.3.2 h1:zw796YJeDLe8vRwGR1cM+uS1ZuSkPutchBEXv2GgOhI= github.com/qor5/web v1.3.2/go.mod h1:LszskQJbFQDJwOeZC6j6afOiHxxyjrzz8B3zuBwfgKQ= github.com/qor5/web/v3 v3.0.12-0.20250618085230-3764d0e521a8 h1:s3jBS5bq6VX56GicRPCeXvb0TRLSz5w1xJHymPnhTuo= github.com/qor5/web/v3 v3.0.12-0.20250618085230-3764d0e521a8/go.mod h1:hrhZ4nc1U+AOBrGmnUoRUPpA9fymxlAbNfGvn9TJLns= -github.com/qor5/x/v3 v3.2.1-0.20260513053223-8d1b87070f73 h1:su/k3bOiuCxT2oXQXNz/+MgqauINgrFAfV8G5ydhZDw= -github.com/qor5/x/v3 v3.2.1-0.20260513053223-8d1b87070f73/go.mod h1:e1efYlhlz+dQi2sbcL2LsUHBPkaFDbcBEIzEZ2pypTY= +github.com/qor5/x/v3 v3.2.1-0.20260513070857-f23cd74e1440 h1:k1bknaulteyZyQrynrh1YubSwB57sELigZ9Gjqg+sek= +github.com/qor5/x/v3 v3.2.1-0.20260513070857-f23cd74e1440/go.mod h1:TtIAOHz8avdFyWzUnxF9jYGadTg2awOp1ayGURe6Myc= github.com/redis/go-redis/v9 v9.16.0 h1:OotgqgLSRCmzfqChbQyG1PHC3tLNR89DG4jdOERSEP4= github.com/redis/go-redis/v9 v9.16.0/go.mod h1:u410H11HMLoB+TP67dz8rL9s6QW2j76l0//kSOd3370= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= diff --git a/media/integration/integration_test.go b/media/integration/integration_test.go index ace172c34..05358a96c 100644 --- a/media/integration/integration_test.go +++ b/media/integration/integration_test.go @@ -17,7 +17,6 @@ import ( "github.com/qor5/admin/v3/media/media_library" "github.com/qor5/admin/v3/media/oss" "github.com/qor5/x/v3/gormx" - "gorm.io/driver/postgres" ) //go:embed *.png @@ -27,15 +26,9 @@ var TestDB *gorm.DB func TestMain(m *testing.M) { ctx := context.Background() - pgContainer, err := gormx.OpenContainer(ctx, nil) - if err != nil { - panic(err) - } - defer func() { _ = pgContainer.Terminate(ctx) }() - TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) - if err != nil { - panic(err) - } + suite := gormx.MustStartRawTestSuite(ctx) + defer func() { _ = suite.Stop(ctx) }() + TestDB = suite.DB() m.Run() } diff --git a/pagebuilder/publish_test.go b/pagebuilder/publish_test.go index daa900932..618df83b1 100644 --- a/pagebuilder/publish_test.go +++ b/pagebuilder/publish_test.go @@ -10,22 +10,15 @@ import ( "github.com/qor5/admin/v3/presets" "github.com/qor5/x/v3/gormx" - "gorm.io/driver/postgres" ) var TestDB *gorm.DB func TestMain(m *testing.M) { ctx := context.Background() - pgContainer, err := gormx.OpenContainer(ctx, nil) - if err != nil { - panic(err) - } - defer func() { _ = pgContainer.Terminate(ctx) }() - TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) - if err != nil { - panic(err) - } + suite := gormx.MustStartRawTestSuite(ctx) + defer func() { _ = suite.Stop(ctx) }() + TestDB = suite.DB() TestDB.Logger = TestDB.Logger.LogMode(logger.Info) m.Run() } diff --git a/presets/integration/example_test.go b/presets/integration/example_test.go index b33d00ac1..4d813832c 100644 --- a/presets/integration/example_test.go +++ b/presets/integration/example_test.go @@ -15,22 +15,15 @@ import ( "github.com/qor5/admin/v3/presets/actions" "github.com/qor5/admin/v3/presets/examples" "github.com/qor5/x/v3/gormx" - "gorm.io/driver/postgres" ) var TestDB *gorm.DB func TestMain(m *testing.M) { ctx := context.Background() - pgContainer, err := gormx.OpenContainer(ctx, nil) - if err != nil { - panic(err) - } - defer func() { _ = pgContainer.Terminate(ctx) }() - TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) - if err != nil { - panic(err) - } + suite := gormx.MustStartRawTestSuite(ctx) + defer func() { _ = suite.Stop(ctx) }() + TestDB = suite.DB() m.Run() } diff --git a/publish/publish_test.go b/publish/publish_test.go index ca0c12e9e..360744035 100644 --- a/publish/publish_test.go +++ b/publish/publish_test.go @@ -15,7 +15,6 @@ import ( "github.com/stretchr/testify/require" "github.com/theplant/sliceutils" "github.com/theplant/testingutils" - "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/logger" @@ -213,15 +212,9 @@ var TestDB *gorm.DB func TestMain(m *testing.M) { ctx := context.Background() - pgContainer, err := gormx.OpenContainer(ctx, nil) - if err != nil { - panic(err) - } - defer func() { _ = pgContainer.Terminate(ctx) }() - TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) - if err != nil { - panic(err) - } + suite := gormx.MustStartRawTestSuite(ctx) + defer func() { _ = suite.Stop(ctx) }() + TestDB = suite.DB() TestDB.Logger = TestDB.Logger.LogMode(logger.Info) m.Run() diff --git a/redirection/redirection_test.go b/redirection/redirection_test.go index 8b9636ab4..44d452ec1 100644 --- a/redirection/redirection_test.go +++ b/redirection/redirection_test.go @@ -9,7 +9,6 @@ import ( "github.com/qor5/web/v3" "github.com/qor5/x/v3/gormx" "github.com/theplant/gofixtures" - "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/logger" ) @@ -34,15 +33,9 @@ func TestMain(m *testing.M) { failedUrl = mockServer.URL + "/failure" defer mockServer.Close() ctx := context.Background() - pgContainer, err := gormx.OpenContainer(ctx, nil) - if err != nil { - panic(err) - } - defer func() { _ = pgContainer.Terminate(ctx) }() - TestDB, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) - if err != nil { - panic(err) - } + suite := gormx.MustStartRawTestSuite(ctx) + defer func() { _ = suite.Stop(ctx) }() + TestDB = suite.DB() TestDB.Logger = TestDB.Logger.LogMode(logger.Info) b = &Builder{db: TestDB} b.AutoMigrate() diff --git a/seo/helper_test.go b/seo/helper_test.go index e0fd8edaf..dffbcf8e6 100644 --- a/seo/helper_test.go +++ b/seo/helper_test.go @@ -9,7 +9,6 @@ import ( _ "github.com/lib/pq" "github.com/qor5/admin/v3/l10n" "github.com/qor5/x/v3/gormx" - "gorm.io/driver/postgres" "gorm.io/gorm" ) @@ -17,17 +16,10 @@ var dbForTest *gorm.DB func TestMain(m *testing.M) { ctx := context.Background() - pgContainer, err := gormx.OpenContainer(ctx, nil) - if err != nil { - panic(err) - } - defer func() { _ = pgContainer.Terminate(ctx) }() - dbForTest, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) - if err != nil { - panic(err) - } - err = dbForTest.AutoMigrate(&QorSEOSetting{}) - if err != nil { + suite := gormx.MustStartRawTestSuite(ctx) + defer func() { _ = suite.Stop(ctx) }() + dbForTest = suite.DB() + if err := dbForTest.AutoMigrate(&QorSEOSetting{}); err != nil { panic("failed to migrate db") } diff --git a/worker/integration_test/setup_test.go b/worker/integration_test/setup_test.go index fa8394015..40c46f59a 100644 --- a/worker/integration_test/setup_test.go +++ b/worker/integration_test/setup_test.go @@ -21,7 +21,6 @@ import ( "github.com/qor5/x/v3/gormx" . "github.com/qor5/x/v3/ui/vuetify" h "github.com/theplant/htmlgo" - "gorm.io/driver/postgres" "gorm.io/gorm" ) @@ -32,15 +31,9 @@ var ( func TestMain(m *testing.M) { ctx := context.Background() - pgContainer, err := gormx.OpenContainer(ctx, nil) - if err != nil { - panic(err) - } - defer func() { _ = pgContainer.Terminate(ctx) }() - db, err = gorm.Open(postgres.Open(pgContainer.DSN), &gorm.Config{}) - if err != nil { - panic(err) - } + suite := gormx.MustStartRawTestSuite(ctx) + defer func() { _ = suite.Stop(ctx) }() + db = suite.DB() pb = presets.New(). DataOperator(gorm2op.DataOperator(db))