mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-09-08 17:03:44 +00:00
[GITEA] Fix printed integration test location
- When running integration testing, the location of the function is logged, this is determined from the stack trace, to skip helper function, it must be given how many function to skip. - `PrepareTestEnv` calls `PrintCurrentTest` which does the determination of the location. `PrepareTestEnv` gave an skip number of `2` to account for itself and - Since https://github.com/go-gitea/gitea/pull/25330 `PrintCurrentTest` adds 1 to the skip number to account for itself. However `PrepareTestEnv` wasn't modified to account for that and thus the location of functions was printing the location of the testing.go in the Go standard library. - Regresion of https://github.com/go-gitea/gitea/pull/25330
This commit is contained in:
parent
c805aa23b5
commit
47a268ada8
1 changed files with 1 additions and 1 deletions
|
@ -182,7 +182,7 @@ func InitTest(requireGitea bool) {
|
|||
|
||||
func PrepareTestEnv(t testing.TB, skip ...int) func() {
|
||||
t.Helper()
|
||||
ourSkip := 2
|
||||
ourSkip := 1
|
||||
if len(skip) > 0 {
|
||||
ourSkip += skip[0]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue