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

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/gitlab/content_spec.rb')
-rw-r--r--spec/gitlab/content_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/gitlab/content_spec.rb b/spec/gitlab/content_spec.rb
new file mode 100644
index 00000000..bfa35ab8
--- /dev/null
+++ b/spec/gitlab/content_spec.rb
@@ -0,0 +1,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