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/config/config_test.go')
-rw-r--r--internal/config/config_test.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/internal/config/config_test.go b/internal/config/config_test.go
index f02221f4e..6a8bcb5d0 100644
--- a/internal/config/config_test.go
+++ b/internal/config/config_test.go
@@ -416,6 +416,7 @@ func TestConfigureRuby(t *testing.T) {
{dir: "", desc: "empty"},
{dir: "/does/not/exist", desc: "does not exist"},
{dir: tmpFile, desc: "exists but is not a directory"},
+ {dir: ".", ok: true, desc: "relative path"},
{dir: tmpDir, ok: true, desc: "ok"},
}
@@ -424,11 +425,15 @@ func TestConfigureRuby(t *testing.T) {
Config.Ruby = Ruby{Dir: tc.dir}
err := ConfigureRuby()
- if tc.ok {
- require.NoError(t, err)
- } else {
+ if !tc.ok {
require.Error(t, err)
+ return
}
+
+ require.NoError(t, err)
+
+ dir := Config.Ruby.Dir
+ require.True(t, filepath.IsAbs(dir), "expected %q to be absolute path", dir)
})
}
}