Commit 4b1356a5 authored by Stan Hu's avatar Stan Hu

Merge branch 'sy-prevent-oncall-test-failures' into 'master'

Prevent daylight-savings-related failures in on-call management specs

See merge request gitlab-org/gitlab!56561
parents 581de7ae 0715c3a7
...@@ -6,7 +6,7 @@ RSpec.describe Resolvers::IncidentManagement::OncallShiftsResolver do ...@@ -6,7 +6,7 @@ RSpec.describe Resolvers::IncidentManagement::OncallShiftsResolver do
include GraphqlHelpers include GraphqlHelpers
let_it_be(:current_user) { create(:user) } let_it_be(:current_user) { create(:user) }
let_it_be(:rotation) { create(:incident_management_oncall_rotation, :with_participant) } let_it_be(:rotation) { create(:incident_management_oncall_rotation, :with_participant, :utc) }
let_it_be(:project) { rotation.project } let_it_be(:project) { rotation.project }
let(:args) { { start_time: rotation.starts_at, end_time: rotation.starts_at + rotation.shift_cycle_duration } } let(:args) { { start_time: rotation.starts_at, end_time: rotation.starts_at + rotation.shift_cycle_duration } }
......
...@@ -7,7 +7,7 @@ RSpec.describe ::IncidentManagement::OncallShifts::ReadService do ...@@ -7,7 +7,7 @@ RSpec.describe ::IncidentManagement::OncallShifts::ReadService do
let_it_be(:user_without_permissions) { create(:user) } let_it_be(:user_without_permissions) { create(:user) }
let_it_be(:current_user) { user_with_permissions } let_it_be(:current_user) { user_with_permissions }
let_it_be_with_refind(:rotation) { create(:incident_management_oncall_rotation, length: 1, length_unit: :days) } let_it_be_with_refind(:rotation) { create(:incident_management_oncall_rotation, :utc, length: 1, length_unit: :days) }
let_it_be(:participant) { create(:incident_management_oncall_participant, :with_developer_access, rotation: rotation) } let_it_be(:participant) { create(:incident_management_oncall_participant, :with_developer_access, rotation: rotation) }
let_it_be(:project) { rotation.project } let_it_be(:project) { rotation.project }
......
...@@ -59,6 +59,7 @@ RSpec.describe IncidentManagement::OncallRotations::PersistShiftsJob do ...@@ -59,6 +59,7 @@ RSpec.describe IncidentManagement::OncallRotations::PersistShiftsJob do
:incident_management_oncall_rotation, :incident_management_oncall_rotation,
:with_active_period, # 8:00 - 17:00 :with_active_period, # 8:00 - 17:00
:with_participant, :with_participant,
:utc,
created_at: created_at, # Monday @ 5:00 created_at: created_at, # Monday @ 5:00
starts_at: starts_at, # Tuesday @ 00:00 starts_at: starts_at, # Tuesday @ 00:00
updated_at: updated_at # Friday @ 6:00 updated_at: updated_at # Friday @ 6:00
...@@ -174,6 +175,7 @@ RSpec.describe IncidentManagement::OncallRotations::PersistShiftsJob do ...@@ -174,6 +175,7 @@ RSpec.describe IncidentManagement::OncallRotations::PersistShiftsJob do
let_it_be_with_reload(:rotation) do let_it_be_with_reload(:rotation) do
create( create(
:incident_management_oncall_rotation, :incident_management_oncall_rotation,
:utc,
:with_participant, :with_participant,
:with_active_period, # 8:00-17:00 :with_active_period, # 8:00-17:00
starts_at: starts_at starts_at: starts_at
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment