Add task capture, work reports, daily digests and private contacts
Build and publish container images / images (push) Successful in 16m37s

This commit is contained in:
Anya Tokugawa committed 2026-11-01 22:28:16 +09:00
1 parent 50b8b0323f
commit b4792bb175
50 files changed
+2678 -17

No files matched your search

+22
View File
@@ -15,9 +15,31 @@ func newSchemaTestStore(t *testing.T) *Store {
t.Fatal(err)
}
t.Cleanup(func() { database.Close() })
// task-productivity follows the legacy task schema at application startup.
// Provide its source projection, not the component under test itself.
if _, err = database.Exec(`CREATE TABLE organizer_items(domain_uuid TEXT,owner_uuid TEXT,uuid TEXT,kind TEXT,data TEXT)`); err != nil {
t.Fatal(err)
}
return &Store{DB: database}
}
func TestTaskProductivityMigrationBackfillsOnce(t *testing.T) {
st := newSchemaTestStore(t)
if _, e := st.DB.Exec(`INSERT INTO organizer_items VALUES('d','u','t','task','{"completed_at_ms":123,"estimate_minutes":60}')`); e != nil {
t.Fatal(e)
}
for range 2 {
if e := st.ensureSchemaComponent("task-productivity"); e != nil {
t.Fatal(e)
}
}
var count, complexity int
var completed int64
if e := st.DB.QueryRow(`SELECT count(*),completed_ms,complexity FROM organizer_task_metrics`).Scan(&count, &completed, &complexity); e != nil || count != 1 || completed != 123 || complexity != 1 {
t.Fatal(count, completed, complexity, e)
}
}
func TestManagedSchemasFreshRepeatAndReadOnly(t *testing.T) {
for component := range managedStoreSchemas {
t.Run(component, func(t *testing.T) {