test: require review fix assertions

- test: require review fix assertions
- test: cover zone repair and imported dns records
- test: wait for dns and tighten assertions
- fix(api): drop the record id of a rolled back record creation
- test(audit): run every api route through the real handlers in an audit matrix
- test(api): run the authorization matrix through the real zone handlers
- test: repair duplicate apex soa through ui
This commit is contained in:
bryanpedini committed 2026-11-19 15:46:12 +01:00
1 parent a884219512
commit 9251c85fd8
14 files changed
+1631 -123

No files matched your search

+17
View File
@@ -39,6 +39,9 @@ type fdbState struct {
commits int
rollbacks int
closeErr error
onBegin func()
onCommit func() error
onEnd func()
}
func (s *fdbState) record(query string, args []driver.NamedValue) fdbResponse {
@@ -94,6 +97,9 @@ func (c *fdbConn) BeginTx(context.Context, driver.TxOptions) (driver.Tx, error)
if c.s.beginErr != nil {
return nil, c.s.beginErr
}
if c.s.onBegin != nil {
c.s.onBegin()
}
return &fdbTx{s: c.s}, nil
}
@@ -118,16 +124,27 @@ func (c *fdbConn) QueryContext(_ context.Context, query string, args []driver.Na
type fdbTx struct{ s *fdbState }
func (t *fdbTx) Commit() error {
if t.s.onEnd != nil {
defer t.s.onEnd()
}
t.s.mu.Lock()
defer t.s.mu.Unlock()
if t.s.commitErr != nil {
return t.s.commitErr
}
if t.s.onCommit != nil {
if err := t.s.onCommit(); err != nil {
return err
}
}
t.s.commits++
return nil
}
func (t *fdbTx) Rollback() error {
if t.s.onEnd != nil {
defer t.s.onEnd()
}
t.s.mu.Lock()
defer t.s.mu.Unlock()
t.s.rollbacks++