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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions gen/bobgen-mysql/driver/mysql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"github.com/stephenafamo/bob/gen"
helpers "github.com/stephenafamo/bob/gen/bobgen-helpers"
"github.com/stephenafamo/bob/gen/drivers"
ctest "github.com/stephenafamo/bob/test/containers"
testfiles "github.com/stephenafamo/bob/test/files"
testgen "github.com/stephenafamo/bob/test/gen"
"github.com/testcontainers/testcontainers-go"
mysqltest "github.com/testcontainers/testcontainers-go/modules/mysql"
)

Expand All @@ -31,11 +31,7 @@ func TestDriver(t *testing.T) {
mysqltest.WithUsername("root"),
mysqltest.WithPassword("password"),
)
t.Cleanup(func() {
if err := testcontainers.TerminateContainer(mysqlContainer); err != nil {
fmt.Printf("failed to terminate MySQL container: %v\n", err)
}
})
ctest.Cleanup(t, mysqlContainer)
if err != nil {
t.Fatalf("failed to start container: %v", err)
}
Expand Down
10 changes: 3 additions & 7 deletions gen/bobgen-psql/driver/psql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/stephenafamo/bob/gen"
helpers "github.com/stephenafamo/bob/gen/bobgen-helpers"
"github.com/stephenafamo/bob/gen/drivers"
ctest "github.com/stephenafamo/bob/test/containers"
testfiles "github.com/stephenafamo/bob/test/files"
testgen "github.com/stephenafamo/bob/test/gen"
"github.com/testcontainers/testcontainers-go"
Expand All @@ -37,15 +38,10 @@ func TestDriver(t *testing.T) {
postgres.BasicWaitStrategies(),
testcontainers.WithLogger(log.New(io.Discard, "", log.LstdFlags)),
)
ctest.Cleanup(t, postgresContainer)
if err != nil {
fmt.Printf("could not start postgres container: %v\n", err)
return
t.Fatalf("could not start postgres container: %v", err)
}
defer func() {
if err := testcontainers.TerminateContainer(postgresContainer); err != nil {
log.Printf("failed to terminate container: %s", err)
}
}()

dsn, err := postgresContainer.ConnectionString(t.Context(), "sslmode=disable")
if err != nil {
Expand Down
7 changes: 2 additions & 5 deletions gen/bobgen-sqlite/driver/sqlite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/stephenafamo/bob/gen"
helpers "github.com/stephenafamo/bob/gen/bobgen-helpers"
"github.com/stephenafamo/bob/gen/drivers"
ctest "github.com/stephenafamo/bob/test/containers"
testfiles "github.com/stephenafamo/bob/test/files"
testgen "github.com/stephenafamo/bob/test/gen"
"github.com/testcontainers/testcontainers-go"
Expand Down Expand Up @@ -50,11 +51,7 @@ func TestLibSQL(t *testing.T) {
testcontainers.WithExposedPorts("7070:8080", "9000:8000"),
testcontainers.WithWaitStrategy(wait.ForListeningPort("8080/tcp").WithStartupTimeout(time.Second*5)),
)
t.Cleanup(func() {
if err := testcontainers.TerminateContainer(libsqlServer); err != nil {
fmt.Printf("failed to terminate libsql container: %v\n", err)
}
})
ctest.Cleanup(t, libsqlServer)
if err != nil {
t.Fatalf("failed to start libsql container: %v", err)
}
Expand Down
74 changes: 35 additions & 39 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/stephenafamo/bob

go 1.24.0
go 1.25.0

require (
github.com/Masterminds/sprig/v3 v3.3.0
Expand All @@ -9,7 +9,7 @@ require (
github.com/go-sql-driver/mysql v1.7.2-0.20231213112541-0004702b931d
github.com/gofrs/uuid/v5 v5.4.0
github.com/google/go-cmp v0.7.0
github.com/jackc/pgx/v5 v5.7.5
github.com/jackc/pgx/v5 v5.9.2
github.com/knadh/koanf/parsers/yaml v0.1.0
github.com/knadh/koanf/providers/confmap v0.1.0
github.com/knadh/koanf/providers/env v0.1.0
Expand All @@ -21,28 +21,29 @@ require (
github.com/qdm12/reprint v0.0.0-20200326205758-722754a53494
github.com/stephenafamo/scan v0.9.0
github.com/stephenafamo/sqlparser v0.0.0-20260122161205-e324475bd1fc
github.com/testcontainers/testcontainers-go v0.38.0
github.com/testcontainers/testcontainers-go/modules/mysql v0.37.0
github.com/testcontainers/testcontainers-go/modules/postgres v0.38.0
github.com/testcontainers/testcontainers-go v0.43.0
github.com/testcontainers/testcontainers-go/modules/mysql v0.43.0
github.com/testcontainers/testcontainers-go/modules/postgres v0.43.0
github.com/tursodatabase/libsql-client-go v0.0.0-20240902231107-85af5b9d094d
github.com/urfave/cli/v2 v2.23.7
github.com/volatiletech/strmangle v0.0.6
github.com/wasilibs/go-pgquery v0.0.0-20250409022910-10ac41983c07
golang.org/x/mod v0.24.0
golang.org/x/text v0.24.0
golang.org/x/tools v0.31.0
golang.org/x/mod v0.35.0
golang.org/x/text v0.37.0
golang.org/x/tools v0.44.0
modernc.org/sqlite v1.20.3
mvdan.cc/gofumpt v0.7.0
)

require (
dario.cat/mergo v1.0.1 // indirect
dario.cat/mergo v1.0.2 // indirect
filippo.io/edwards25519 v1.1.0 // 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/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.3.0 // 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/cespare/xxhash/v2 v2.3.0 // indirect
github.com/coder/websocket v1.8.12 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/errdefs/pkg v0.3.0 // indirect
Expand All @@ -52,26 +53,23 @@ require (
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/docker v28.2.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/dustin/go-humanize v1.0.1 // indirect
github.com/ebitengine/purego v0.8.4 // indirect
github.com/ebitengine/purego v0.10.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // 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/huandu/xstrings v1.5.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jackc/puddle/v2 v2.2.2 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/klauspost/compress v1.18.5 // indirect
github.com/knadh/koanf/maps v0.1.1 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/magiconair/properties v1.8.10 // indirect
Expand All @@ -80,45 +78,43 @@ require (
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // 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.2 // 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.0 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/moby/term v0.5.2 // indirect
github.com/ncruces/go-strftime v0.1.9 // 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/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil/v4 v4.25.5 // indirect
github.com/shirou/gopsutil/v4 v4.26.5 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sirupsen/logrus v1.9.4 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/stretchr/testify v1.10.0 // indirect
github.com/stretchr/testify v1.11.1 // indirect
github.com/tetratelabs/wazero v1.9.0 // 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.16 // indirect
github.com/tklauser/numcpus v0.11.0 // indirect
github.com/volatiletech/inflect v0.0.1 // indirect
github.com/wasilibs/wazero-helpers v0.0.0-20240620070341-3dff1577cd52 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // 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
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.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
golang.org/x/crypto v0.51.0 // indirect
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect
golang.org/x/sync v0.13.0 // indirect
golang.org/x/sys v0.32.0 // indirect
golang.org/x/sync v0.20.0 // indirect
golang.org/x/sys v0.45.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // 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
lukechampine.com/uint128 v1.2.0 // indirect
Expand Down
Loading