Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorBalasankar "Balu" C <balasankar@gitlab.com>2018-03-05 11:25:02 +0300
committerBalasankar "Balu" C <balasankar@gitlab.com>2018-03-30 09:08:36 +0300
commit8785f237959a1e59fee8f628b76e476040848e24 (patch)
tree6becf45dd48e0ccc7fa45611af9376556637b2da /spec/lib
parent9b76d8512a5491202e5a953950cc815be9536648 (diff)
Move existing dirs to a temp location while restore
Instead of renaming existing storage directories to a timestamped format, create a timestamped directory in a temporary location and move the individual files and folders inside storage directories to it. This helps us with nested storage directories.
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/backup/repository_spec.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/lib/backup/repository_spec.rb b/spec/lib/backup/repository_spec.rb
index 03573c304aa..7d774c5f63e 100644
--- a/spec/lib/backup/repository_spec.rb
+++ b/spec/lib/backup/repository_spec.rb
@@ -7,6 +7,8 @@ describe Backup::Repository do
before do
allow(progress).to receive(:puts)
allow(progress).to receive(:print)
+ allow(FileUtils).to receive(:mkdir_p).and_return(true)
+ allow(FileUtils).to receive(:mv).and_return(true)
allow_any_instance_of(String).to receive(:color) do |string, _color|
string