Перенести решение лабораторной 2 как основу для лабораторной 3

This commit is contained in:
2026-11-02 10:00:11 +03:00
parent 0ab3a341aa
commit 5b9f377783
76 changed files with 7008 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
package user_test
import (
"context"
"fmt"
"os"
"testing"
"messenger/internal/testenv"
)
var db *testenv.DB
func TestMain(m *testing.M) {
var err error
db, err = testenv.StartPostgres(context.Background())
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
code := m.Run()
db.Close()
os.Exit(code)
}