Skip to content

Commit 71aca93

Browse files
authored
Remove extraneous logging (#15020)
Signed-off-by: Andrew Thornton <[email protected]>
1 parent 119d2cb commit 71aca93

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

integrations/git_test.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,16 @@ func doEnsureDiffNoChange(ctx APITestContext, pr api.PullRequest, diffStr string
518518
return func(t *testing.T) {
519519
req := NewRequest(t, "GET", fmt.Sprintf("/%s/%s/pulls/%d.diff", url.PathEscape(ctx.Username), url.PathEscape(ctx.Reponame), pr.Index))
520520
resp := ctx.Session.MakeRequest(t, req, http.StatusOK)
521-
assert.Equal(t, diffStr, resp.Body.String())
521+
expectedMaxLen := len(diffStr)
522+
if expectedMaxLen > 800 {
523+
expectedMaxLen = 800
524+
}
525+
actual := resp.Body.String()
526+
actualMaxLen := len(actual)
527+
if actualMaxLen > 800 {
528+
actualMaxLen = 800
529+
}
530+
assert.Equal(t, diffStr, actual, "Unexpected change in the diff string: expected: %s but was actually: %s", diffStr[:expectedMaxLen], actual[:actualMaxLen])
522531
}
523532
}
524533

modules/markup/markdown/goldmark.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"regexp"
1111
"strings"
1212

13-
"code.gitea.io/gitea/modules/log"
1413
"code.gitea.io/gitea/modules/markup"
1514
"code.gitea.io/gitea/modules/markup/common"
1615
"code.gitea.io/gitea/modules/setting"
@@ -139,10 +138,6 @@ func (g *ASTTransformer) Transform(node *ast.Document, reader text.Reader, pc pa
139138

140139
// But most importantly ensure the next sibling is still on the old image too
141140
v.SetNextSibling(next)
142-
143-
} else {
144-
log.Debug("ast.Image: %s has parent: %v", link, parent)
145-
146141
}
147142
case *ast.Link:
148143
// Links need their href to munged to be a real value

0 commit comments

Comments
 (0)