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

+5 -1
View File
@@ -1445,7 +1445,7 @@ func zoneAPIRecordResponse(row recordRow, warnings []zoneProblem, now time.Time,
func (h zoneHandlers) createRecord(ctx context.Context, c *apiContext) (apiResponse, error) {
var in zoneAPIRecordInput
decodeErr := c.decodeJSON(&in)
return h.writeZone(ctx, c, false, func(w zoneAPIWrite) (apiResponse, error) {
response, err := h.writeZone(ctx, c, false, func(w zoneAPIWrite) (apiResponse, error) {
if decodeErr != nil {
return apiResponse{}, decodeErr
}
@@ -1466,6 +1466,10 @@ func (h zoneHandlers) createRecord(ctx context.Context, c *apiContext) (apiRespo
c.Entry.RecordID = sql.NullInt64{Int64: row.ID, Valid: true}
return zoneAPIRecordResponse(row, warnings, c.Now, http.StatusCreated), nil
})
if err != nil {
c.Entry.RecordID = sql.NullInt64{}
}
return response, err
}
func zoneAPIRequestedID(c *apiContext) (int64, error) {