mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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 https://github.com/coder/internal/issues/1471
This commit is contained in:
@@ -431,6 +431,7 @@ func TestStartWorkspace(t *testing.T) {
|
||||
chat, err := db.InsertChat(ctx, database.InsertChatParams{
|
||||
OrganizationID: org.ID,
|
||||
Status: database.ChatStatusWaiting,
|
||||
ClientType: database.ChatClientTypeUi,
|
||||
OwnerID: user.ID,
|
||||
WorkspaceID: uuid.NullUUID{UUID: ws.ID, Valid: true},
|
||||
LastModelConfigID: modelCfg.ID,
|
||||
@@ -495,6 +496,7 @@ func TestStartWorkspace(t *testing.T) {
|
||||
chat, err := db.InsertChat(ctx, database.InsertChatParams{
|
||||
OrganizationID: org.ID,
|
||||
Status: database.ChatStatusWaiting,
|
||||
ClientType: database.ChatClientTypeUi,
|
||||
OwnerID: user.ID,
|
||||
WorkspaceID: uuid.NullUUID{UUID: ws.ID, Valid: true},
|
||||
LastModelConfigID: modelCfg.ID,
|
||||
|
||||
Reference in New Issue
Block a user