2019-07-25 05:27:42 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-10-27 15:10:19 +00:00
|
|
|
module ImportExport
|
|
|
|
module CommonUtil
|
|
|
|
def setup_symlink(tmpdir, symlink_name)
|
|
|
|
allow_any_instance_of(Gitlab::ImportExport).to receive(:storage_path).and_return(tmpdir)
|
|
|
|
|
|
|
|
File.open("#{tmpdir}/test", 'w') { |file| file.write("test") }
|
|
|
|
FileUtils.ln_s("#{tmpdir}/test", "#{tmpdir}/#{symlink_name}")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|