Improve trace logging for pulls and processes (#22633)
Our trace logging is far from perfect and is difficult to follow. This PR: * Add trace logging for process manager add and remove. * Fixes an errant read file for git refs in getMergeCommit * Brings in the pullrequest `String` and `ColorFormat` methods introduced in #22568 * Adds a lot more logging in to testPR etc. Ref #22578 --------- Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
01f082287d
commit
3c5655ce18
9 changed files with 233 additions and 149 deletions
|
@ -82,7 +82,7 @@ func TestManager_Remove(t *testing.T) {
|
|||
|
||||
assert.NotEqual(t, GetContext(p1Ctx).GetPID(), GetContext(p2Ctx).GetPID(), "expected to get different pids got %s == %s", GetContext(p2Ctx).GetPID(), GetContext(p1Ctx).GetPID())
|
||||
|
||||
pm.Remove(GetPID(p2Ctx))
|
||||
finished()
|
||||
|
||||
_, exists := pm.processMap[GetPID(p2Ctx)]
|
||||
assert.False(t, exists, "PID %d is in the list but shouldn't", GetPID(p2Ctx))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue