Rename the main module to gotea.dev and the binary to gotea, and update the application name and English locale. Keep the external gitea.dev/sdk and gitea.dev/actionslib module imports unchanged. Assisted-by: OpenCode:DeepSeek-V4.1-Flash
26 lines
544 B
Go
26 lines
544 B
Go
// Copyright 2025 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package git
|
|
|
|
import (
|
|
"path/filepath"
|
|
"testing"
|
|
|
|
"gotea.dev/modules/git/gitrepo"
|
|
)
|
|
|
|
const testReposDir = "tests/repos/"
|
|
|
|
func mockRepository(repoPath string) RepositoryFacade {
|
|
if !filepath.IsAbs(repoPath) {
|
|
// resolve repository path relative to the unit test fixture directory
|
|
repoPath, _ = filepath.Abs(filepath.Join(testReposDir, repoPath))
|
|
}
|
|
return gitrepo.RepositoryUnmanaged(repoPath)
|
|
}
|
|
|
|
func TestMain(m *testing.M) {
|
|
RunGitTests(m)
|
|
}
|