aboutsummaryrefslogtreecommitdiffstats
path: root/integrations
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-03-18 03:25:52 +0000
committerGitHub <noreply@github.com>2021-03-18 04:25:52 +0100
commit71aca93decc10253133dcd77b64dae5d311d7163 (patch)
treed9c342e932d2fa925bd076a19880c37734254a35 /integrations
parent119d2cb6e4abb4da90f0da6c908d52e4c26a49a4 (diff)
downloadgitea-71aca93decc10253133dcd77b64dae5d311d7163.tar.gz
gitea-71aca93decc10253133dcd77b64dae5d311d7163.zip
Remove extraneous logging (#15020)
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'integrations')
-rw-r--r--integrations/git_test.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/integrations/git_test.go b/integrations/git_test.go
index f22b1cd9f2..d8e7c4fe51 100644
--- a/integrations/git_test.go
+++ b/integrations/git_test.go
@@ -518,7 +518,16 @@ func doEnsureDiffNoChange(ctx APITestContext, pr api.PullRequest, diffStr string
return func(t *testing.T) {
req := NewRequest(t, "GET", fmt.Sprintf("/%s/%s/pulls/%d.diff", url.PathEscape(ctx.Username), url.PathEscape(ctx.Reponame), pr.Index))
resp := ctx.Session.MakeRequest(t, req, http.StatusOK)
- assert.Equal(t, diffStr, resp.Body.String())
+ expectedMaxLen := len(diffStr)
+ if expectedMaxLen > 800 {
+ expectedMaxLen = 800
+ }
+ actual := resp.Body.String()
+ actualMaxLen := len(actual)
+ if actualMaxLen > 800 {
+ actualMaxLen = 800
+ }
+ assert.Equal(t, diffStr, actual, "Unexpected change in the diff string: expected: %s but was actually: %s", diffStr[:expectedMaxLen], actual[:actualMaxLen])
}
}