Skip to content

Commit

Permalink
test: in package handler
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksandrMatsko committed Nov 1, 2024
1 parent 7bb137d commit ebe85ea
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions api/handler/triggers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,8 @@ func TestGetTriggerFromRequest(t *testing.T) {
request = request.WithContext(middleware.SetContextValueForTest(request.Context(), "metricSourceProvider", sourceProvider))
request = request.WithContext(middleware.SetContextValueForTest(request.Context(), "limits", api.GetTestLimitsConfig()))

triggerDTO.Schedule = moira.NewDefaultScheduleData()
triggerDTO.Schedule.TimezoneOffset = 0
triggerDTO.Schedule.StartOffset = 0
triggerDTO.Schedule.EndOffset = 0
for i := range triggerDTO.Schedule.Days {
if i != 0 {
triggerDTO.Schedule.Days[i].Enabled = false
}
}
triggerDTO.Schedule.Days = moira.GetFilledScheduleDataDays(false)
triggerDTO.Schedule.Days[0].Enabled = true

Convey("It should be parsed successfully", func() {
triggerDTO.TTL = moira.DefaultTTL
Expand Down

0 comments on commit ebe85ea

Please sign in to comment.