Welcome to mirror list, hosted at ThFree Co, Russian Federation.

content_spec.rb « gitlab « spec - gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e83280e50c8875c0aa9d99512e28bf3ff8764cf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'spec_helper'

# See: https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/4726#note_459473659
describe 'Content directory size' do
  subject { Dir.glob('content/**/*').sum { |f| File.size(f) } }

  let(:megabyte) { 1024**2 }

  # This limit can be increased after checking that Omnibus package build does not fail
  let(:maximum_size) { 2 * megabyte }

  # `content` directory is included to the Omnibus package
  # We want to make sure that the size of the directory is small enough
  # to prevent accidental Omnibus pipeline failures.
  it 'is not too big' do
    is_expected.to be < maximum_size
  end
end