Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eae9444

Browse files
fix: add missing ClientType to InsertChat test params (#24436)
Two `InsertChatParams` blocks in `startworkspace_test.go` were missing the `ClientType` field. Since the `chat_client_type` enum column is `NOT NULL`, Postgres rejects the Go zero value (`""`), causing `TestStartWorkspace` subtests `StoppedWorkspaceReportsAutoUpdate` and `ManualUpdateRequired` to fail with: ``` pq: invalid input value for enum chat_client_type: "" ``` Closes coder/internal#1471
1 parent 91b35a2 commit eae9444

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

coderd/x/chatd/chattool/startworkspace_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ func TestStartWorkspace(t *testing.T) {
431431
chat, err := db.InsertChat(ctx, database.InsertChatParams{
432432
OrganizationID: org.ID,
433433
Status: database.ChatStatusWaiting,
434+
ClientType: database.ChatClientTypeUi,
434435
OwnerID: user.ID,
435436
WorkspaceID: uuid.NullUUID{UUID: ws.ID, Valid: true},
436437
LastModelConfigID: modelCfg.ID,
@@ -495,6 +496,7 @@ func TestStartWorkspace(t *testing.T) {
495496
chat, err := db.InsertChat(ctx, database.InsertChatParams{
496497
OrganizationID: org.ID,
497498
Status: database.ChatStatusWaiting,
499+
ClientType: database.ChatClientTypeUi,
498500
OwnerID: user.ID,
499501
WorkspaceID: uuid.NullUUID{UUID: ws.ID, Valid: true},
500502
LastModelConfigID: modelCfg.ID,

0 commit comments

Comments
 (0)