giteabot backport / giteabot (push) Canceled after 0s
giteabot / giteabot (push) Canceled after 0s
release-nightly / nightly-binary (push) Canceled after 0s
release-nightly / nightly-container (push) Canceled after 0s
cache-seeder / gobuild (push) Canceled after 0s
cache-seeder / lint (bindata, lint-backend) (push) Canceled after 0s
release-nightly-snapcraft / build-and-publish (push) Canceled after 0s
Includes direct password setup links in registration emails. Assisted-by: Codex:GPT-5
26 lines
623 B
Go
26 lines
623 B
Go
// Copyright 2025 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package gitrepo
|
|
|
|
import (
|
|
"path/filepath"
|
|
"testing"
|
|
|
|
"gitea.dev/modules/git"
|
|
"gitea.dev/modules/setting"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
// resolve repository path relative to the test directory
|
|
setting.SetupGiteaTestEnv()
|
|
giteaRoot := setting.GetGiteaTestSourceRoot()
|
|
repoPath = func(repo Repository) string {
|
|
if filepath.IsAbs(repo.RelativePath()) {
|
|
return repo.RelativePath() // for testing purpose only
|
|
}
|
|
return filepath.Join(giteaRoot, "modules/git/tests/repos", repo.RelativePath())
|
|
}
|
|
git.RunGitTests(m)
|
|
}
|