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:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2021-04-21 14:11:42 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-04-23 10:57:11 +0300
commitb7e6dd3a79fd4819a4daa35aa983168fd0b4e1d2 (patch)
treec9b8a1c17aeab466ea7881e31fc7c3aea01531c3
parentd2edf9bac4e59ebed0529916eb6230689f7d3f69 (diff)
testcfg: Inline `GitalyCfgBuilder.tempDir()`
The `tempDir()` receiver function of `GitalyCfgBuilder` is only a mere wrapper around `testhelper.TempDir()` now that it automatically cleans up the temporary directory after the test. Inline it.
-rw-r--r--internal/testhelper/testcfg/gitaly_builder.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/internal/testhelper/testcfg/gitaly_builder.go b/internal/testhelper/testcfg/gitaly_builder.go
index 85f56212f..ed2553730 100644
--- a/internal/testhelper/testcfg/gitaly_builder.go
+++ b/internal/testhelper/testcfg/gitaly_builder.go
@@ -60,10 +60,6 @@ type GitalyCfgBuilder struct {
realLinguist bool
}
-func (gc *GitalyCfgBuilder) tempDir(t testing.TB) string {
- return testhelper.TempDir(t)
-}
-
// Build setups required filesystem structure, creates and returns configuration of the gitaly service.
func (gc *GitalyCfgBuilder) Build(t testing.TB) config.Cfg {
t.Helper()
@@ -73,7 +69,7 @@ func (gc *GitalyCfgBuilder) Build(t testing.TB) config.Cfg {
cfg.SocketPath = "it is a stub to bypass Validate method"
}
- root := gc.tempDir(t)
+ root := testhelper.TempDir(t)
if cfg.BinDir == "" {
cfg.BinDir = filepath.Join(root, "bin.d")