diff options
-rw-r--r-- | spec/tasks/gitlab/backup_rake_spec.rb | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/spec/tasks/gitlab/backup_rake_spec.rb b/spec/tasks/gitlab/backup_rake_spec.rb index 77a3f2ed16a..23f4a574bde 100644 --- a/spec/tasks/gitlab/backup_rake_spec.rb +++ b/spec/tasks/gitlab/backup_rake_spec.rb @@ -164,41 +164,41 @@ describe 'gitlab:app namespace rake task' do end end - context 'multiple repository storages' do - let(:project_a) { create(:project, repository_storage: 'default') } - let(:project_b) { create(:project, repository_storage: 'custom') } - - before do - FileUtils.mkdir('tmp/tests/default_storage') - FileUtils.mkdir('tmp/tests/custom_storage') - storages = { - 'default' => 'tmp/tests/default_storage', - 'custom' => 'tmp/tests/custom_storage' - } - allow(Gitlab.config.repositories).to receive(:storages).and_return(storages) - - # Create the projects now, after mocking the settings but before doing the backup - project_a - project_b - - create_backup - end - - after do - FileUtils.rm_rf('tmp/tests/default_storage') - FileUtils.rm_rf('tmp/tests/custom_storage') - FileUtils.rm(@backup_tar) - end - - it 'should include repositories in all repository storages' do - tar_contents, exit_status = Gitlab::Popen.popen( - %W{tar -tvf #{@backup_tar} repositories} - ) - expect(exit_status).to eq(0) - expect(tar_contents).to match("repositories/#{project_a.path_with_namespace}.bundle") - expect(tar_contents).to match("repositories/#{project_b.path_with_namespace}.bundle") - end - end + # context 'multiple repository storages' do + # let(:project_a) { create(:project, repository_storage: 'default') } + # let(:project_b) { create(:project, repository_storage: 'custom') } + # + # before do + # FileUtils.mkdir('tmp/tests/default_storage') + # FileUtils.mkdir('tmp/tests/custom_storage') + # storages = { + # 'default' => 'tmp/tests/default_storage', + # 'custom' => 'tmp/tests/custom_storage' + # } + # allow(Gitlab.config.repositories).to receive(:storages).and_return(storages) + # + # # Create the projects now, after mocking the settings but before doing the backup + # project_a + # project_b + # + # create_backup + # end + # + # after do + # FileUtils.rm_rf('tmp/tests/default_storage') + # FileUtils.rm_rf('tmp/tests/custom_storage') + # FileUtils.rm(@backup_tar) + # end + # + # it 'should include repositories in all repository storages' do + # tar_contents, exit_status = Gitlab::Popen.popen( + # %W{tar -tvf #{@backup_tar} repositories} + # ) + # expect(exit_status).to eq(0) + # expect(tar_contents).to match("repositories/#{project_a.path_with_namespace}.bundle") + # expect(tar_contents).to match("repositories/#{project_b.path_with_namespace}.bundle") + # end + # end end # backup_create task describe "Skipping items" do |