feat: 0.0.1

This commit is contained in:
FernandoJVideira committed 2026-01-08 01:15:07 +00:00
commit 961bdd81d4
146 files changed
+10444

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
package db
import (
"context"
"log"
"os"
"testing"
"github.com/FernandoJVideira/simple_bank/internal/config"
"github.com/jackc/pgx/v5/pgxpool"
_ "github.com/jackc/pgx/v5/stdlib"
)
var testStore Store
func TestMain(m *testing.M) {
config, err := config.LoadTestConfig("../../..")
if err != nil {
log.Fatal("cannot load config:", err)
}
connPool, err := pgxpool.New(context.Background(), config.DBAddr)
if err != nil {
log.Fatal("cannot connect to db:", err)
}
testStore = NewPostgresStore(connPool)
os.Exit(m.Run())
}