Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/testhelper/configure.go')
-rw-r--r--internal/testhelper/configure.go50
1 files changed, 2 insertions, 48 deletions
diff --git a/internal/testhelper/configure.go b/internal/testhelper/configure.go
index 8a92e54d7..7b011a76c 100644
--- a/internal/testhelper/configure.go
+++ b/internal/testhelper/configure.go
@@ -36,39 +36,8 @@ func Configure() func() {
log.Fatal(err)
}
- config.Config.Logging.Dir = filepath.Join(testDirectory, "log")
- if err := os.Mkdir(config.Config.Logging.Dir, 0755); err != nil {
- os.RemoveAll(testDirectory)
- log.Fatal(err)
- }
-
- config.Config.Storages = []config.Storage{
- {Name: "default", Path: GitlabTestStoragePath()},
- }
- if err := os.Mkdir(config.Config.Storages[0].Path, 0755); err != nil {
- os.RemoveAll(testDirectory)
- log.Fatal(err)
- }
-
- config.Config.SocketPath = "/bogus"
- config.Config.GitlabShell.Dir = "/"
-
- config.Config.InternalSocketDir = filepath.Join(testDirectory, "internal-socket")
- if err := os.Mkdir(config.Config.InternalSocketDir, 0755); err != nil {
- os.RemoveAll(testDirectory)
- log.Fatal(err)
- }
-
- config.Config.BinDir = filepath.Join(testDirectory, "bin")
- if err := os.Mkdir(config.Config.BinDir, 0755); err != nil {
- os.RemoveAll(testDirectory)
- log.Fatal(err)
- }
-
for _, f := range []func() error{
- func() error { return ConfigureRuby(&config.Config) },
ConfigureGit,
- func() error { return config.Config.Validate() },
} {
if err := f(); err != nil {
os.RemoveAll(testDirectory)
@@ -132,29 +101,14 @@ func ConfigureRuby(cfg *config.Cfg) error {
return nil
}
-// ConfigureGitalyGit2Go configures the gitaly-git2go command for tests
-func ConfigureGitalyGit2Go(outputDir string) {
- buildCommand(nil, outputDir, "gitaly-git2go")
-}
-
// ConfigureGitalyGit2GoBin configures the gitaly-git2go command for tests
func ConfigureGitalyGit2GoBin(t testing.TB, cfg config.Cfg) {
buildBinary(t, cfg.BinDir, "gitaly-git2go")
}
// ConfigureGitalyLfsSmudge configures the gitaly-lfs-smudge command for tests
-func ConfigureGitalyLfsSmudge(outputDir string) {
- buildCommand(nil, outputDir, "gitaly-lfs-smudge")
-}
-
-// ConfigureGitalySSH configures the gitaly-ssh command for tests
-func ConfigureGitalySSH(outputDir string) {
- buildCommand(nil, outputDir, "gitaly-ssh")
-}
-
-// ConfigureGitalyHooksBinary builds gitaly-hooks command for tests
-func ConfigureGitalyHooksBinary(outputDir string) {
- buildCommand(nil, outputDir, "gitaly-hooks")
+func ConfigureGitalyLfsSmudge(t *testing.T, outputDir string) {
+ buildCommand(t, outputDir, "gitaly-lfs-smudge")
}
// ConfigureGitalyHooksBin builds gitaly-hooks command for tests for the cfg.