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-10-06 10:58:59 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-10-07 08:37:22 +0300
commit27de9ce6c8a34f387ea2f3a00ca08fdbb4f74099 (patch)
tree1d44c45a484421c6266d3c3530cfa5197ed4fd4d
parenta3c694b5ef1ed80ef7de178f5f4abd9fa6eee50f (diff)
testhelper: Return errors when configuring Ruby sidecar fails
When configuration of the Ruby sidecar fails, then we call `log.Fatalf()` and thus directly execute the complete test suite. Given that we call this function on-demand in tests nowadays though, we should instead return the error and validate at the test site that it did set up the server correctly such that other tests continue to run as expected. Fix this issue by returning the error instead of aborting.
-rw-r--r--internal/testhelper/configure.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/testhelper/configure.go b/internal/testhelper/configure.go
index ea993b678..c18e77faf 100644
--- a/internal/testhelper/configure.go
+++ b/internal/testhelper/configure.go
@@ -108,7 +108,7 @@ func ConfigureRuby(cfg *config.Cfg) error {
}
if err := cfg.ConfigureRuby(); err != nil {
- log.Fatalf("validate ruby config: %v", err)
+ return fmt.Errorf("validate ruby config: %w", err)
}
return nil