checkIn.ts 680 B

1234567891011121314151617181920212223
  1. import {CheckInStatus, CheckIn, ScheduleType} from 'sentry/views/monitors/types';
  2. export function CheckInFixture(params: Partial<CheckIn> = {}): CheckIn {
  3. return {
  4. status: CheckInStatus.ERROR,
  5. duration: 767,
  6. environment: 'production',
  7. dateCreated: '2025-01-01T00:00:00Z',
  8. expectedTime: '2025-01-01T00:00:00Z',
  9. id: '97f0e440-317c-5bb5-b5e0-024ca202a61d',
  10. monitorConfig: {
  11. checkin_margin: 5,
  12. max_runtime: 10,
  13. timezone: 'America/Los_Angeles',
  14. alert_rule_id: 1234,
  15. failure_issue_threshold: 2,
  16. recovery_threshold: 2,
  17. schedule: '0 0 * * *',
  18. schedule_type: ScheduleType.CRONTAB,
  19. },
  20. ...params,
  21. };
  22. }