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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-10-23 13:58:41 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2018-11-05 17:51:57 +0300
commit40397f35771a37a772f86e00d7dc708ddc6d3544 (patch)
tree0aea3cca4b405fc6fc6624474f5593d7f90b5e57 /spec/models/application_setting_spec.rb
parent90473e064eac21be283e751005e0c7abbdbf9089 (diff)
Allow to make builds soft-archived.
The soft-archived builds cannot be run after some deadline time. The intent is to aggressively recycle old builds after sometime.
Diffstat (limited to 'spec/models/application_setting_spec.rb')
-rw-r--r--spec/models/application_setting_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb
index 87b91286168..95ae7bd21ab 100644
--- a/spec/models/application_setting_spec.rb
+++ b/spec/models/application_setting_spec.rb
@@ -594,4 +594,24 @@ describe ApplicationSetting do
end
end
end
+
+ describe '#archive_builds_older_than' do
+ subject { setting.archive_builds_older_than }
+
+ context 'when the archive_builds_in_seconds is set' do
+ before do
+ setting.archive_builds_in_seconds = 3600
+ end
+
+ it { is_expected.to be_within(1.minute).of(1.hour.ago) }
+ end
+
+ context 'when the archive_builds_in_seconds is set' do
+ before do
+ setting.archive_builds_in_seconds = nil
+ end
+
+ it { is_expected.to be_nil }
+ end
+ end
end