Commit 567baf0e authored by Rémy Coutable's avatar Rémy Coutable Committed by Winnie Hellmann

Stub ENV in the backup task spec file

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent be2c6657
......@@ -101,8 +101,7 @@ module Backup
end
def unpack
Dir.chdir(backup_path)
Dir.chdir(backup_path) do
# check for existing backups in the backup dir
if backup_file_list.empty?
$progress.puts "No backups found in #{backup_path}"
......@@ -147,6 +146,7 @@ module Backup
exit 1
end
end
end
def tar_version
tar_version, _ = Gitlab::Popen.popen(%w(tar --version))
......
......@@ -172,10 +172,6 @@ describe Backup::Manager do
end
describe '#unpack' do
before do
allow(Dir).to receive(:chdir)
end
context 'when there are no backup files in the directory' do
before do
allow(Dir).to receive(:glob).and_return([])
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment