diff options
Diffstat (limited to 'spec/lib/gitlab/ci/charts_spec.rb')
-rw-r--r-- | spec/lib/gitlab/ci/charts_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/lib/gitlab/ci/charts_spec.rb b/spec/lib/gitlab/ci/charts_spec.rb index 46d7d4a58f0..3a82d058819 100644 --- a/spec/lib/gitlab/ci/charts_spec.rb +++ b/spec/lib/gitlab/ci/charts_spec.rb @@ -98,7 +98,12 @@ RSpec.describe Gitlab::Ci::Charts do subject { chart.total } before do - create(:ci_empty_pipeline, project: project, duration: 120) + # The created_at time used by the following execution + # can end up being after the creation of the 'today' time + # objects created above, and cause the queried counts to + # go to zero when the test executes close to midnight on the + # CI system, so we explicitly set it to a day earlier + create(:ci_empty_pipeline, project: project, duration: 120, created_at: today - 1.day) end it 'uses a utc time zone for range times' do |