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:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2018-09-18 16:13:25 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2018-09-18 16:13:25 +0300
commit1456ae62d359d34be72ba31e2b270bf7c55df715 (patch)
tree83aca448d90cd42fade80fed61a104b5d3207c81
parent889333e29c31ef19c421ca93e8655c950de30cf6 (diff)
Explicitly set Linguist languages during testszj-test-ruby-linguist
Locally, tests failed when these required a Gitaly server to start, 3 tests failed as the server was unable to find the Linguist colors. This is fixed by skipping autodetection, and overriding the default value. Observed tests that failed: ``` rspec ./spec/gitaly/ref_service_spec.rb:11 rspec ./spec/gitaly/repository_service_spec.rb:10 rspec ./spec/gitaly/repository_service_spec.rb:16 ``` Of these, now only the ref_service_spec.rb is still failing, but with a deadline exceeded error. This seems like the server is slow to start, somehow. Given my gut feeling says its unrelated, it will be fixed in a later commit.
-rw-r--r--config.toml.example3
-rw-r--r--ruby/spec/integration_helper.rb11
2 files changed, 11 insertions, 3 deletions
diff --git a/config.toml.example b/config.toml.example
index 0822e8ca1..b3cd6057e 100644
--- a/config.toml.example
+++ b/config.toml.example
@@ -63,6 +63,9 @@ dir = "/home/git/gitaly/ruby"
#
# # Number of gitaly-ruby worker processes
# num_workers = 2
+#
+# # Override Linguist languages path
+# linguist_languages_path = ""
[gitlab-shell]
# The directory where gitlab-shell is installed
diff --git a/ruby/spec/integration_helper.rb b/ruby/spec/integration_helper.rb
index 0186d0514..b4e118ff9 100644
--- a/ruby/spec/integration_helper.rb
+++ b/ruby/spec/integration_helper.rb
@@ -18,19 +18,24 @@ end
def start_gitaly
build_dir = File.expand_path('../../../_build', __FILE__)
gitlab_shell_dir = File.join(TMP_DIR, 'gitlab-shell')
+ linguist_path = File.join(
+ Bundler.rubygems.find_name('github-linguist').first.full_gem_path,
+ "lib", "linguist", "languages.json"
+ )
FileUtils.mkdir_p([TMP_DIR, File.join(gitlab_shell_dir, 'hooks')])
config_toml = <<~CONFIG
socket_path = "#{SOCKET_PATH}"
bin_dir = "#{build_dir}/bin"
-
+
[gitlab-shell]
dir = "#{gitlab_shell_dir}"
-
+
[gitaly-ruby]
dir = "#{build_dir}/assembly/ruby"
-
+ linguist_languages_path = "#{linguist_path}"
+
[[storage]]
name = "#{DEFAULT_STORAGE_NAME}"
path = "#{DEFAULT_STORAGE_DIR}"