summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2018-03-13 14:37:46 +0100
committerJacob Vosmaer <jacob@gitlab.com>2018-03-13 14:37:46 +0100
commit749f595ae75f19f1cd972876ae1991fd58282721 (patch)
treea73fc36bdb33662a4a58841dfc0274ce26d4c935
parentadfcf0055f7c497619539ec9769f33aa2659766b (diff)
downloadgitlab-shell-fix-tests.tar.gz
Use a proper temp dir for the fake installationfix-tests
-rw-r--r--spec/gitlab_shell_authorized_keys_check_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/gitlab_shell_authorized_keys_check_spec.rb b/spec/gitlab_shell_authorized_keys_check_spec.rb
index 4947ce3..66527be 100644
--- a/spec/gitlab_shell_authorized_keys_check_spec.rb
+++ b/spec/gitlab_shell_authorized_keys_check_spec.rb
@@ -6,7 +6,7 @@ describe 'bin/gitlab-shell-authorized-keys-check' do
end
def tmp_root_path
- File.join(original_root_path, 'tmp')
+ @tmp_root_path ||= File.realpath(Dir.mktmpdir)
end
def config_path
@@ -49,7 +49,7 @@ describe 'bin/gitlab-shell-authorized-keys-check' do
after(:all) do
@server.shutdown if @server
@webrick_thread.join if @webrick_thread
- FileUtils.rm_f(config_path)
+ FileUtils.rm_f(tmp_root_path)
end
let(:gitlab_shell_path) { File.join(tmp_root_path, 'bin', 'gitlab-shell') }