chore: fix tests#37760
Conversation
There was a problem hiding this comment.
Pull request overview
Cleans up integration test helpers by removing the unused NilResponseRecorder/NilResponseHashSumRecorder types (and their MakeRequest... variants), drops the gojsonschema dependency along with the unused VerifyJSONSchema helper, and switches a couple of require calls inside request helpers to assert so a failing assertion doesn't deadlock parallel sub-tests via t.FailNow. Call sites in git_general_test.go and api_repo_file_get_test.go are migrated to the standard MakeRequest recorder using resp.Body.Len() / resp.Body.String().
Changes:
- Remove
NilResponseRecorder/NilResponseHashSumRecorderhelpers and migrate callers to plainMakeRequestwithBody.Len()/Body.String()comparisons. - Replace
require.NoError/require.Equalinside shared request helpers withassertequivalents to avoid hanging wait-groups, and hardengetTokenForLoggedInUseragainst a nil flash message. - Drop the now-unused
github.com/xeipuuv/gojsonschemadependency (andVerifyJSONSchemahelper) fromgo.mod/go.sum.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/integration/integration_test.go | Remove unused recorder types, JSON schema helper, and switch require to assert in shared helpers. |
| tests/integration/git_general_test.go | Replace MakeRequestNilResponse*Recorder usage with MakeRequest and compare body length/content; switch diff comparison from hash to full content. |
| tests/integration/api_repo_file_get_test.go | Migrate LFS media request to MakeRequest and assert Body.Len(). |
| go.mod | Drop gojsonschema and its transitive gojsonpointer/gojsonreference dependencies. |
| go.sum | Remove checksums for the dropped modules. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
* origin/main: (104 commits) fix(deps): update module github.com/go-git/go-git/v5 to v5.19.1 [security] (go-gitea#37786) fix(pull): handle empty pull request files view to allow reviews (go-gitea#37783) fix(markup): make RenderString never fail (go-gitea#37779) fix(markup): wrap indented code blocks for the code-copy button (go-gitea#37748) fix(permissions): Fix reading permission (go-gitea#37769) fix: add natural sort to sortTreeViewNodes (go-gitea#37772) fix: package creation unique conflict (go-gitea#37774) fix(deps): update npm dependencies (go-gitea#37768) fix(deps): update module gitlab.com/gitlab-org/api/client-go/v2 to v2.26.0 (go-gitea#37771) ci: split giteabot workflow (go-gitea#37770) [skip ci] Updated translations via Crowdin fix: Unify public-only token filtering in API queries and repo access checks (go-gitea#37118) fix(deps): update module google.golang.org/grpc to v1.81.1 (go-gitea#37762) chore: make DefaultTitleSource default to auto to match GitHub (go-gitea#37767) ci: fix cache-related issues (go-gitea#37761) chore: fix tests (go-gitea#37760) refactor(waitgroup): replace Add/Done goroutines with WaitGroup.Go (go-gitea#37764) fix(deps): update go dependencies (go-gitea#37752) chore(deps): update action dependencies (go-gitea#37751) fix(deps): update module github.com/google/go-github/v85 to v86 (go-gitea#37754) ... # Conflicts: # .github/workflows/pull-db-tests.yml # modules/storage/s3_test.go
No description provided.