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:
authorJacob Vosmaer <jacob@gitlab.com>2017-12-12 19:51:01 +0300
committerJacob Vosmaer <jacob@gitlab.com>2017-12-15 15:09:25 +0300
commit80606c4a97b1619df10df8da9e7f30bce12039c5 (patch)
treeeaaed246c4ec2349347c77f95bbd4acb418cf0b4 /internal/testhelper
parentced5ca6eb8654662045f84cef17d66ff68006b8f (diff)
Fix broken Ruby test setup in CI
Diffstat (limited to 'internal/testhelper')
-rw-r--r--internal/testhelper/testhelper.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/internal/testhelper/testhelper.go b/internal/testhelper/testhelper.go
index 62dc44cd1..eed910f1e 100644
--- a/internal/testhelper/testhelper.go
+++ b/internal/testhelper/testhelper.go
@@ -245,14 +245,13 @@ func ConfigureRuby() {
if dir := os.Getenv("GITALY_TEST_RUBY_DIR"); len(dir) > 0 {
// Sometimes runtime.Caller is unreliable. This environment variable provides a bypass.
config.Config.Ruby.Dir = dir
- return
- }
-
- _, currentFile, _, ok := runtime.Caller(0)
- if !ok {
- log.Fatal("Could not get caller info")
+ } else {
+ _, currentFile, _, ok := runtime.Caller(0)
+ if !ok {
+ log.Fatal("Could not get caller info")
+ }
+ config.Config.Ruby.Dir = path.Join(path.Dir(currentFile), "../../ruby")
}
- config.Config.Ruby.Dir = path.Join(path.Dir(currentFile), "../../ruby")
if err := config.ConfigureRuby(); err != nil {
log.Fatal("validate ruby config: %v", err)