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: 4f50b43b6e5d07100125a8f001760902ef92c868 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

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