diff options
Diffstat (limited to 'spec/lib/backup/files_spec.rb')
-rw-r--r-- | spec/lib/backup/files_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/lib/backup/files_spec.rb b/spec/lib/backup/files_spec.rb index 14d055cbcc1..99872211a4e 100644 --- a/spec/lib/backup/files_spec.rb +++ b/spec/lib/backup/files_spec.rb @@ -62,5 +62,19 @@ describe Backup::Files do subject.restore end end + + describe 'folders that are a mountpoint' do + before do + allow(FileUtils).to receive(:mv).and_raise(Errno::EBUSY) + allow(subject).to receive(:run_pipeline!).and_return(true) + end + + it 'shows error message' do + expect(subject).to receive(:resource_busy_error).with("/var/gitlab-registry") + .and_call_original + + expect { subject.restore }.to raise_error(/is a mountpoint/) + end + end end end |