summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorFabio Pitino <fpitino@gitlab.com>2019-05-02 13:29:51 +0100
committerFabio Pitino <fpitino@gitlab.com>2019-05-07 08:06:49 +0100
commit673ea5d2ac50e17a1839d0db83641e6851422f88 (patch)
treee98145643cb4269c81fcc86479c2c8ca1154d631 /spec
parent0edd1e6714385a87f0cacb25497204d89535d35f (diff)
downloadgitlab-ce-673ea5d2ac50e17a1839d0db83641e6851422f88.tar.gz
Rescue RuntimeError when "too many loops" occur
With this workaround we temporarily prevent an exception from Fugit gem to be raised in Gitlab::Ci::CronParser
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/ci/cron_parser_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ci/cron_parser_spec.rb b/spec/lib/gitlab/ci/cron_parser_spec.rb
index 491e3fba9d9..a228334d53e 100644
--- a/spec/lib/gitlab/ci/cron_parser_spec.rb
+++ b/spec/lib/gitlab/ci/cron_parser_spec.rb
@@ -181,6 +181,13 @@ describe Gitlab::Ci::CronParser do
it { expect(subject).to be_nil }
end
+
+ context 'when cron is scheduled to a non existent day' do
+ let(:cron) { '0 12 31 2 *' }
+ let(:cron_timezone) { 'UTC' }
+
+ it { expect(subject).to be_nil }
+ end
end
describe '#cron_valid?' do