makeAcquiredRowWithBranch returns an AcquireStaleChatDiffStatusesRow with the given branch and a non-empty origin so the Refresher goes through the branch-resolution path.
(chatID, ownerID uuid.UUID, branch string)
| 95 | // the given branch and a non-empty origin so the Refresher goes through the |
| 96 | // branch-resolution path. |
| 97 | func makeAcquiredRowWithBranch(chatID, ownerID uuid.UUID, branch string) database.AcquireStaleChatDiffStatusesRow { |
| 98 | return database.AcquireStaleChatDiffStatusesRow{ |
| 99 | ChatID: chatID, |
| 100 | GitBranch: branch, |
| 101 | GitRemoteOrigin: "https://github.com/owner/repo", |
| 102 | StaleAt: time.Now().Add(-time.Minute), |
| 103 | OwnerID: ownerID, |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | // tickOnce traps the worker's NewTicker call, starts the worker, |
| 108 | // fires one tick, waits for it to finish by observing the given |
no test coverage detected