insertParentWithActiveChild creates a parent chat and an active child chat linked to it. Both are returned in their initial (active) state.
( t *testing.T, db database.Store, user database.User, org database.Organization, model database.ChatModelConfig, )
| 1653 | // child chat linked to it. Both are returned in their initial |
| 1654 | // (active) state. |
| 1655 | func insertParentWithActiveChild( |
| 1656 | t *testing.T, |
| 1657 | db database.Store, |
| 1658 | user database.User, |
| 1659 | org database.Organization, |
| 1660 | model database.ChatModelConfig, |
| 1661 | ) (parent database.Chat, child database.Chat) { |
| 1662 | t.Helper() |
| 1663 | parent = dbgen.Chat(t, db, database.Chat{ |
| 1664 | OrganizationID: org.ID, |
| 1665 | OwnerID: user.ID, |
| 1666 | LastModelConfigID: model.ID, |
| 1667 | Title: "parent", |
| 1668 | }) |
| 1669 | child = dbgen.Chat(t, db, database.Chat{ |
| 1670 | OrganizationID: org.ID, |
| 1671 | OwnerID: user.ID, |
| 1672 | LastModelConfigID: model.ID, |
| 1673 | Title: "child", |
| 1674 | ParentChatID: uuid.NullUUID{UUID: parent.ID, Valid: true}, |
| 1675 | RootChatID: uuid.NullUUID{UUID: parent.ID, Valid: true}, |
| 1676 | }) |
| 1677 | return parent, child |
| 1678 | } |
| 1679 | |
| 1680 | // insertParentWithArchivedChild creates an active parent and an |
| 1681 | // individually-archived child. The returned child reflects its |
no test coverage detected