uptimeRule.ts 641 B

12345678910111213141516171819202122
  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. traceSampling: false,
  19. ...params,
  20. }
  21. }