Fix specs
This commit is contained in:
parent
120f9abaa1
commit
732a821d4f
4 changed files with 8 additions and 2 deletions
|
@ -34,7 +34,8 @@ class PagesWorker
|
||||||
# We manually extract the archive and limit the archive size with dd
|
# We manually extract the archive and limit the archive size with dd
|
||||||
results = Open3.pipeline(%W(gunzip -c #{artifacts}),
|
results = Open3.pipeline(%W(gunzip -c #{artifacts}),
|
||||||
%W(dd bs=#{BLOCK_SIZE} count=#{blocks}),
|
%W(dd bs=#{BLOCK_SIZE} count=#{blocks}),
|
||||||
%W(tar -x -C #{temp_path} public/))
|
%W(tar -x -C #{temp_path} public/),
|
||||||
|
err: '/dev/null')
|
||||||
return unless results.compact.all?(&:success?)
|
return unless results.compact.all?(&:success?)
|
||||||
|
|
||||||
# Check if we did extract public directory
|
# Check if we did extract public directory
|
||||||
|
|
|
@ -50,3 +50,4 @@
|
||||||
- [reactive_caching, 1]
|
- [reactive_caching, 1]
|
||||||
- [cronjob, 1]
|
- [cronjob, 1]
|
||||||
- [default, 1]
|
- [default, 1]
|
||||||
|
- [pages, 1]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
module Backup
|
module Backup
|
||||||
class Manager
|
class Manager
|
||||||
ARCHIVES_TO_BACKUP = %w[uploads builds artifacts lfs registry]
|
ARCHIVES_TO_BACKUP = %w[uploads builds artifacts pages lfs registry]
|
||||||
FOLDERS_TO_BACKUP = %w[repositories db]
|
FOLDERS_TO_BACKUP = %w[repositories db]
|
||||||
FILE_NAME_SUFFIX = '_gitlab_backup.tar'
|
FILE_NAME_SUFFIX = '_gitlab_backup.tar'
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,10 @@ describe UpdatePagesService, services: true do
|
||||||
let(:data) { Gitlab::BuildDataBuilder.build(build) }
|
let(:data) { Gitlab::BuildDataBuilder.build(build) }
|
||||||
let(:service) { UpdatePagesService.new(data) }
|
let(:service) { UpdatePagesService.new(data) }
|
||||||
|
|
||||||
|
before do
|
||||||
|
allow(Gitlab.config.pages).to receive(:enabled).and_return(true)
|
||||||
|
end
|
||||||
|
|
||||||
context 'execute asynchronously for pages job' do
|
context 'execute asynchronously for pages job' do
|
||||||
before { build.name = 'pages' }
|
before { build.name = 'pages' }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue