diff options
author | Balasankar "Balu" C <balasankar@gitlab.com> | 2018-03-05 11:25:02 +0300 |
---|---|---|
committer | Balasankar "Balu" C <balasankar@gitlab.com> | 2018-03-30 09:08:36 +0300 |
commit | 8785f237959a1e59fee8f628b76e476040848e24 (patch) | |
tree | 6becf45dd48e0ccc7fa45611af9376556637b2da /spec/lib/backup | |
parent | 9b76d8512a5491202e5a953950cc815be9536648 (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/backup')
-rw-r--r-- | spec/lib/backup/repository_spec.rb | 2 |
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 |