1
0
mirror of https://github.com/ManyakRus/crud_generator.git synced 2025-07-04 02:00:30 +02:00

сделал database.go

This commit is contained in:
Nikitin Aleksandr
2024-10-14 16:13:02 +03:00
parent 73faedefb0
commit 0bcfb9f962
5 changed files with 175 additions and 105 deletions

View File

@ -0,0 +1,24 @@
package postgres
import (
"github.com/ManyakRus/crud_generator/internal/config"
"github.com/ManyakRus/crud_generator/internal/database"
"github.com/ManyakRus/starter/postgres_gorm"
"testing"
)
func TestFillMassTable(t *testing.T) {
//ConfigMain.LoadEnv()
config.LoadSettingsTxt()
postgres_gorm.Connect()
defer postgres_gorm.CloseConnection()
Otvet, err := database.FillMapTable()
if err != nil {
t.Error("TestFillMassTable() error: ", err)
}
if len(Otvet) == 0 {
t.Error("TestFillMassTable() error: len =0")
}
}