Skip to content

Commit

Permalink
fix testContainers (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ujstor authored Jan 17, 2025
1 parent 1d95d78 commit 9f2a097
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cmd/template/dbdriver/files/tests/mongo.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"log"
"testing"

"github.com/testcontainers/testcontainers-go"
"github.com/testcontainers/testcontainers-go/modules/mongodb"
)

func mustStartMongoContainer() (func(context.Context) error, error) {
func mustStartMongoContainer() (func(context.Context, ...testcontainers.TerminateOption) error, error) {
dbContainer, err := mongodb.Run(context.Background(), "mongo:latest")
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion cmd/template/dbdriver/files/tests/mysql.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/testcontainers/testcontainers-go/wait"
)

func mustStartMySQLContainer() (func(context.Context) error, error) {
func mustStartMySQLContainer() (func(context.Context, ...testcontainers.TerminateOption) error, error) {
var (
dbName = "database"
dbPwd = "password"
Expand Down
3 changes: 2 additions & 1 deletion cmd/template/dbdriver/files/tests/redis.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"log"
"testing"

"github.com/testcontainers/testcontainers-go"
"github.com/testcontainers/testcontainers-go/modules/redis"
)

func mustStartRedisContainer() (func(context.Context) error, error) {
func mustStartRedisContainer() (func(context.Context, ...testcontainers.TerminateOption) error, error) {
dbContainer, err := redis.Run(
context.Background(),
"docker.io/redis:7.2.4",
Expand Down

0 comments on commit 9f2a097

Please sign in to comment.