feat: modelos y CRUD para unit_tests y e2e_tests

UnitTest en registry con Insert, GetByFunction, Search FTS5, Purge. E2ETest en fn_operations con Insert, Get, List, UpdateResult, Delete. Ambos con scan helpers y serialización JSON.
This commit is contained in:
2026-04-05 18:19:10 +02:00
parent 256e038cbe
commit 9660a1c432
4 changed files with 243 additions and 0 deletions
+27
View File
@@ -167,6 +167,33 @@ type Log struct {
CreatedAt time.Time `json:"created_at"`
}
// E2ETestStatus represents the result of an e2e test run.
type E2ETestStatus string
const (
E2EPass E2ETestStatus = "pass"
E2EFail E2ETestStatus = "fail"
E2ESkip E2ETestStatus = "skip"
E2EPending E2ETestStatus = ""
)
// E2ETest is an integration test that verifies function composition within an app.
type E2ETest struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
RelationID string `json:"relation_id"`
Steps []string `json:"steps"`
InputFixture map[string]any `json:"input_fixture"`
Expected map[string]any `json:"expected"`
LastStatus E2ETestStatus `json:"last_status"`
LastRunAt string `json:"last_run_at"`
ExecutionID string `json:"execution_id"`
DurationMs int64 `json:"duration_ms"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
// TypeSnapshot is an immutable copy of a registry type at point of use.
type TypeSnapshot struct {
ID string `json:"id"`