BigW Consortium Gitlab

Commit 567baf0e by Rémy Coutable Committed by Winnie Hellmann

Stub ENV in the backup task spec file

Signed-off-by: 's avatarRémy Coutable <remy@rymai.me>
parent be2c6657
...@@ -101,8 +101,7 @@ module Backup ...@@ -101,8 +101,7 @@ module Backup
end end
def unpack def unpack
Dir.chdir(backup_path) Dir.chdir(backup_path) do
# check for existing backups in the backup dir # check for existing backups in the backup dir
if backup_file_list.empty? if backup_file_list.empty?
$progress.puts "No backups found in #{backup_path}" $progress.puts "No backups found in #{backup_path}"
...@@ -147,6 +146,7 @@ module Backup ...@@ -147,6 +146,7 @@ module Backup
exit 1 exit 1
end end
end end
end
def tar_version def tar_version
tar_version, _ = Gitlab::Popen.popen(%w(tar --version)) tar_version, _ = Gitlab::Popen.popen(%w(tar --version))
......
...@@ -172,10 +172,6 @@ describe Backup::Manager do ...@@ -172,10 +172,6 @@ describe Backup::Manager do
end end
describe '#unpack' do describe '#unpack' do
before do
allow(Dir).to receive(:chdir)
end
context 'when there are no backup files in the directory' do context 'when there are no backup files in the directory' do
before do before do
allow(Dir).to receive(:glob).and_return([]) allow(Dir).to receive(:glob).and_return([])
......
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