This commit is contained in:
Martino Ferrari
2026-04-26 11:01:55 +02:00
parent 91b42027c9
commit e83e183673
17 changed files with 1009 additions and 182 deletions
+3 -3
View File
@@ -10,14 +10,14 @@ import (
"github.com/uopi/uopi/internal/datasource/stub"
)
func newBroker(t *testing.T) (*broker.Broker, context.CancelFunc) {
t.Helper()
func newBroker(tb testing.TB) (*broker.Broker, context.CancelFunc) {
tb.Helper()
ctx, cancel := context.WithCancel(context.Background())
log := slog.Default()
b := broker.New(ctx, log)
ds := stub.New()
if err := ds.Connect(ctx); err != nil {
t.Fatal(err)
tb.Fatal(err)
}
b.Register(ds)
return b, cancel