fix: issues

This commit is contained in:
Rogee
2025-01-10 11:42:12 +08:00
parent 1c7b603769
commit 0d35aa15de
46 changed files with 1822 additions and 113 deletions

View File

@@ -4,18 +4,27 @@ import (
"os"
"testing"
"backend/providers/otel"
"backend/providers/postgres"
"git.ipao.vip/rogeecn/atom"
"git.ipao.vip/rogeecn/atom/container"
"github.com/rogeecn/fabfile"
log "github.com/sirupsen/logrus"
. "github.com/smartystreets/goconvey/convey"
)
func Default(providers ...container.ProviderContainer) container.Providers {
return append(container.Providers{}, providers...)
return append(container.Providers{
otel.DefaultProvider(),
postgres.DefaultProvider(),
}, providers...)
}
func Serve(providers container.Providers, t *testing.T, invoke any) {
Convey("tests boot up", t, func() {
log.SetLevel(log.DebugLevel)
file := fabfile.MustFind("config.toml")
localEnv := os.Getenv("ENV_LOCAL")