From 749f595ae75f19f1cd972876ae1991fd58282721 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Tue, 13 Mar 2018 14:37:46 +0100 Subject: Use a proper temp dir for the fake installation --- spec/gitlab_shell_authorized_keys_check_spec.rb | 4 ++-- 1 file 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') } -- cgit v1.2.1