Skip to content

Commit 02a0786

Browse files
cstocktonChris Stockton
and
Chris Stockton
authored
chore: improve test coverage with refactor of hooks (#1994)
- Moved http hooks to v0http with added test coverage - Move pgfunc hooks to v0pgfunc with added test coverage - Added tests to cover all paths in v0hooks --------- Co-authored-by: Chris Stockton <chris.stockton@supabase.io>
1 parent f2af4b2 commit 02a0786

File tree

10 files changed

+1574
-315
lines changed

10 files changed

+1574
-315
lines changed

internal/hooks/hooks.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import (
55

66
"github.com/supabase/auth/internal/conf"
77
"github.com/supabase/auth/internal/hooks/v0hooks"
8+
"github.com/supabase/auth/internal/hooks/v0hooks/v0http"
9+
"github.com/supabase/auth/internal/hooks/v0hooks/v0pgfunc"
810
"github.com/supabase/auth/internal/storage"
911
)
1012

@@ -16,8 +18,10 @@ func NewManager(
1618
db *storage.Connection,
1719
config *conf.GlobalConfiguration,
1820
) *Manager {
21+
httpDr := v0http.New()
22+
pgfuncDr := v0pgfunc.New(db)
1923
return &Manager{
20-
v0mgr: v0hooks.NewManager(db, config),
24+
v0mgr: v0hooks.NewManager(config, httpDr, pgfuncDr),
2125
}
2226
}
2327

0 commit comments

Comments
 (0)