This commit is contained in:
parent
e282f124c7
commit
69927c76ff
3 changed files with 26 additions and 19 deletions
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
"git.mstar.dev/mstar/linstrom/config"
|
||||
"git.mstar.dev/mstar/linstrom/shared"
|
||||
"git.mstar.dev/mstar/linstrom/storage-new"
|
||||
storage "git.mstar.dev/mstar/linstrom/storage-new"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -18,6 +18,14 @@ import (
|
|||
"git.mstar.dev/mstar/linstrom/storage-new/models"
|
||||
)
|
||||
|
||||
// "git.mstar.dev/mstar/linstrom/config"
|
||||
|
||||
// "context"
|
||||
// "time"
|
||||
// postgresContainer "github.com/testcontainers/testcontainers-go/modules/postgres"
|
||||
// "github.com/testcontainers/testcontainers-go"
|
||||
// "github.com/testcontainers/testcontainers-go/wait"
|
||||
|
||||
const (
|
||||
dbName = "linstrom"
|
||||
dbUser = "linstrom"
|
||||
|
@ -28,6 +36,7 @@ func main() {
|
|||
other.SetupFlags()
|
||||
flag.Parse()
|
||||
other.ConfigureLogging(nil)
|
||||
// config.ReadAndWriteToGlobal(*shared.FlagConfigFile)
|
||||
|
||||
// Set up a temporary postgres container for gorm-gen to do its thing
|
||||
log.Info().Msg("Starting temporary postgres container")
|
||||
|
@ -55,6 +64,7 @@ func main() {
|
|||
log.Info().Msg("Temporary postgres container stopped")
|
||||
}()
|
||||
db, err := gorm.Open(
|
||||
// postgres.Open(config.GlobalConfig.Storage.BuildPostgresDSN()),
|
||||
postgres.Open(pgContainer.MustConnectionString(context.Background())),
|
||||
&gorm.Config{
|
||||
PrepareStmt: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue