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>2022-02-16 14:55:52 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2022-02-16 14:58:30 +0300
commitf65d12524b2e0cb10ec52971e49104142fc07315 (patch)
treeca5282ffdfa8485ba039265edb01c1925ee3c990 /_support
parent5d557a52c40e2641d6ea1b44b60a897d0e9401e7 (diff)
test-boot: Write gitlab-shell secret into temporary directory
The test-boot script verifies that Gitaly comes up correctly and is used as a very basic smoke test in our CI. As part of the bringup it writes the gitlab-shell secret into the `ruby/git-hooks` directory such that Gitaly is able to find the secret, or otherwise it would fail to boot. This directory is going away, so we need to find a better location. And we do in fact already have one: we can just write it into a subdirectory of the temporary directory which already contains all the other runtime data required for a successful boot. Convert the script to do so.
Diffstat (limited to '_support')
-rwxr-xr-x_support/test-boot7
1 files changed, 5 insertions, 2 deletions
diff --git a/_support/test-boot b/_support/test-boot
index cf9b40ed5..4a9be6709 100755
--- a/_support/test-boot
+++ b/_support/test-boot
@@ -21,7 +21,10 @@ def main(gitaly_dir)
Dir.mktmpdir do |dir|
Dir.chdir(dir)
- File.write(File.join("#{gitaly_dir}/ruby/git-hooks", '.gitlab_shell_secret'), 'test_gitlab_shell_token')
+
+ gitlab_shell_dir = File.join(dir, 'gitlab-shell')
+ Dir.mkdir(gitlab_shell_dir)
+ File.write(File.join(gitlab_shell_dir, '.gitlab_shell_secret'), 'test_gitlab_shell_token')
File.write('config.toml', <<~CONFIG
socket_path = "#{ADDR}"
@@ -38,7 +41,7 @@ def main(gitaly_dir)
dir = "#{gitaly_dir}/ruby"
[gitlab-shell]
- dir = "#{gitaly_dir}/ruby/git-hooks"
+ dir = "#{gitlab_shell_dir}"
[gitlab]
url = 'http://gitlab_url'