diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-23 15:12:28 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-23 15:12:28 +0000 |
commit | 98014c0c43c1b1114d17c5851cd6313a9011d3ab (patch) | |
tree | 405bb6fb3e3e1bbdad0be2e4de43e353db8aeebd /spec/lib/backup | |
parent | 3f274363e9dc9a1be75edfcd3dd5adb64b1e8c29 (diff) | |
download | gitlab-ce-98014c0c43c1b1114d17c5851cd6313a9011d3ab.tar.gz |
Add latest changes from gitlab-org/gitlab@14-8-stable-ee
Diffstat (limited to 'spec/lib/backup')
-rw-r--r-- | spec/lib/backup/artifacts_spec.rb | 14 | ||||
-rw-r--r-- | spec/lib/backup/lfs_spec.rb | 1 | ||||
-rw-r--r-- | spec/lib/backup/manager_spec.rb | 5 | ||||
-rw-r--r-- | spec/lib/backup/object_backup_spec.rb | 1 | ||||
-rw-r--r-- | spec/lib/backup/pages_spec.rb | 6 | ||||
-rw-r--r-- | spec/lib/backup/uploads_spec.rb | 16 |
6 files changed, 0 insertions, 43 deletions
diff --git a/spec/lib/backup/artifacts_spec.rb b/spec/lib/backup/artifacts_spec.rb index 102d787a5e1..e65dc79b65b 100644 --- a/spec/lib/backup/artifacts_spec.rb +++ b/spec/lib/backup/artifacts_spec.rb @@ -7,16 +7,6 @@ RSpec.describe Backup::Artifacts do subject(:backup) { described_class.new(progress) } - describe '#initialize' do - it 'uses the correct upload dir' do - Dir.mktmpdir do |tmpdir| - allow(JobArtifactUploader).to receive(:root) { "#{tmpdir}" } - - expect(backup.app_files_dir).to eq("#{File.realpath(tmpdir)}") - end - end - end - describe '#dump' do before do allow(File).to receive(:realpath).with('/var/gitlab-artifacts').and_return('/var/gitlab-artifacts') @@ -24,10 +14,6 @@ RSpec.describe Backup::Artifacts do allow(JobArtifactUploader).to receive(:root) { '/var/gitlab-artifacts' } end - it 'uses the correct artifact dir' do - expect(backup.app_files_dir).to eq('/var/gitlab-artifacts') - end - it 'excludes tmp from backup tar' do expect(backup).to receive(:tar).and_return('blabla-tar') expect(backup).to receive(:run_pipeline!).with([%w(blabla-tar --exclude=lost+found --exclude=./tmp -C /var/gitlab-artifacts -cf - .), 'gzip -c -1'], any_args).and_return([[true, true], '']) diff --git a/spec/lib/backup/lfs_spec.rb b/spec/lib/backup/lfs_spec.rb index fdc1c0c885d..6525019d9ac 100644 --- a/spec/lib/backup/lfs_spec.rb +++ b/spec/lib/backup/lfs_spec.rb @@ -16,7 +16,6 @@ RSpec.describe Backup::Lfs do end it 'uses the correct lfs dir in tar command', :aggregate_failures do - expect(backup.app_files_dir).to eq('/var/lfs-objects') expect(backup).to receive(:tar).and_return('blabla-tar') expect(backup).to receive(:run_pipeline!).with([%w(blabla-tar --exclude=lost+found -C /var/lfs-objects -cf - .), 'gzip -c -1'], any_args).and_return([[true, true], '']) expect(backup).to receive(:pipeline_succeeded?).and_return(true) diff --git a/spec/lib/backup/manager_spec.rb b/spec/lib/backup/manager_spec.rb index ac693ad8b98..9c186205067 100644 --- a/spec/lib/backup/manager_spec.rb +++ b/spec/lib/backup/manager_spec.rb @@ -12,11 +12,6 @@ RSpec.describe Backup::Manager do before do allow(progress).to receive(:puts) allow(progress).to receive(:print) - FileUtils.mkdir_p('tmp/tests/public/uploads') - end - - after do - FileUtils.rm_rf('tmp/tests/public/uploads', secure: true) end describe '#pack' do diff --git a/spec/lib/backup/object_backup_spec.rb b/spec/lib/backup/object_backup_spec.rb index 6192b5c3482..4d34dc0ade7 100644 --- a/spec/lib/backup/object_backup_spec.rb +++ b/spec/lib/backup/object_backup_spec.rb @@ -17,7 +17,6 @@ RSpec.shared_examples 'backup object' do |setting| end it 'uses the correct storage dir in tar command and excludes tmp', :aggregate_failures do - expect(backup.app_files_dir).to eq(backup_path) expect(backup).to receive(:tar).and_return('blabla-tar') expect(backup).to receive(:run_pipeline!).with([%W(blabla-tar --exclude=lost+found --exclude=./tmp -C #{backup_path} -cf - .), 'gzip -c -1'], any_args).and_return([[true, true], '']) expect(backup).to receive(:pipeline_succeeded?).and_return(true) diff --git a/spec/lib/backup/pages_spec.rb b/spec/lib/backup/pages_spec.rb index 551d2df8f30..f9ee4bbdc41 100644 --- a/spec/lib/backup/pages_spec.rb +++ b/spec/lib/backup/pages_spec.rb @@ -13,12 +13,6 @@ RSpec.describe Backup::Pages do end describe '#dump' do - it 'uses the correct pages dir' do - allow(Gitlab.config.pages).to receive(:path) { '/var/gitlab-pages' } - - expect(subject.app_files_dir).to eq('/var/gitlab-pages') - end - it 'excludes tmp from backup tar' do allow(Gitlab.config.pages).to receive(:path) { '/var/gitlab-pages' } diff --git a/spec/lib/backup/uploads_spec.rb b/spec/lib/backup/uploads_spec.rb index c173916fe91..25ad0c0d3f7 100644 --- a/spec/lib/backup/uploads_spec.rb +++ b/spec/lib/backup/uploads_spec.rb @@ -7,18 +7,6 @@ RSpec.describe Backup::Uploads do subject(:backup) { described_class.new(progress) } - describe '#initialize' do - it 'uses the correct upload dir' do - Dir.mktmpdir do |tmpdir| - FileUtils.mkdir_p("#{tmpdir}/uploads") - - allow(Gitlab.config.uploads).to receive(:storage_path) { tmpdir } - - expect(backup.app_files_dir).to eq("#{File.realpath(tmpdir)}/uploads") - end - end - end - describe '#dump' do before do allow(File).to receive(:realpath).and_call_original @@ -27,10 +15,6 @@ RSpec.describe Backup::Uploads do allow(Gitlab.config.uploads).to receive(:storage_path) { '/var' } end - it 'uses the correct upload dir' do - expect(backup.app_files_dir).to eq('/var/uploads') - end - it 'excludes tmp from backup tar' do expect(backup).to receive(:tar).and_return('blabla-tar') expect(backup).to receive(:run_pipeline!).with([%w(blabla-tar --exclude=lost+found --exclude=./tmp -C /var/uploads -cf - .), 'gzip -c -1'], any_args).and_return([[true, true], '']) |