uptimeRule.ts 615 B

123456789101112131415161718192021
  1. import { ActorFixture } from "sentry-fixture/actor";
  2. import { UptimeMonitorMode, UptimeMonitorStatus, UptimeRule } from "sentry/views/alerts/rules/uptime/types";
  3. export function UptimeRuleFixture(params: Partial<UptimeRule> = {}): UptimeRule {
  4. return {
  5. id: '1',
  6. intervalSeconds: 60,
  7. mode: UptimeMonitorMode.AUTO_DETECTED_ACTIVE,
  8. name: 'Uptime Rule',
  9. owner: ActorFixture(),
  10. projectSlug: 'project-slug',
  11. environment: 'prod',
  12. status: UptimeMonitorStatus.OK,
  13. timeoutMs: 5000,
  14. url: 'https://sentry.io/',
  15. headers: [],
  16. method: 'GET',
  17. body: null,
  18. ...params,
  19. }
  20. }