(t *testing.T)
| 664 | } |
| 665 | |
| 666 | func TestWorker_MarkStale_NoMatchingChats(t *testing.T) { |
| 667 | t.Parallel() |
| 668 | ctx := testutil.Context(t, testutil.WaitShort) |
| 669 | |
| 670 | workspaceID := uuid.New() |
| 671 | |
| 672 | ctrl := gomock.NewController(t) |
| 673 | store := dbmock.NewMockStore(ctrl) |
| 674 | |
| 675 | store.EXPECT().GetChatsByWorkspaceIDs(gomock.Any(), gomock.Any()). |
| 676 | Return(nil, nil) |
| 677 | |
| 678 | mClock := quartz.NewMock(t) |
| 679 | logger := slogtest.Make(t, &slogtest.Options{IgnoreErrors: true}) |
| 680 | refresher := newTestRefresher(t, mClock) |
| 681 | worker := gitsync.NewWorker(store, refresher, nil, mClock, logger) |
| 682 | |
| 683 | worker.MarkStale(ctx, gitsync.MarkStaleParams{ |
| 684 | WorkspaceID: workspaceID, |
| 685 | Branch: "main", |
| 686 | Origin: "https://github.com/x/y", |
| 687 | }) |
| 688 | } |
| 689 | |
| 690 | func TestWorker_MarkStale_UpsertFails_ContinuesNext(t *testing.T) { |
| 691 | t.Parallel() |
nothing calls this directly
no test coverage detected