2020-04-28 15:09:29 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 09:08:32 +00:00
|
|
|
RSpec.describe GitlabSchema.types['AlertManagementAlert'] do
|
2020-05-07 06:09:38 +00:00
|
|
|
specify { expect(described_class.graphql_name).to eq('AlertManagementAlert') }
|
2020-04-28 15:09:29 +00:00
|
|
|
|
2020-05-07 21:09:26 +00:00
|
|
|
specify { expect(described_class).to require_graphql_authorizations(:read_alert_management_alert) }
|
2020-04-28 15:09:29 +00:00
|
|
|
|
|
|
|
it 'exposes the expected fields' do
|
|
|
|
expected_fields = %i[
|
|
|
|
iid
|
2021-03-04 15:11:19 +00:00
|
|
|
issueIid
|
|
|
|
issue
|
2020-04-28 15:09:29 +00:00
|
|
|
title
|
2020-05-06 12:09:36 +00:00
|
|
|
description
|
2020-04-28 15:09:29 +00:00
|
|
|
severity
|
|
|
|
status
|
|
|
|
service
|
|
|
|
monitoring_tool
|
2020-05-06 12:09:36 +00:00
|
|
|
hosts
|
2020-04-28 15:09:29 +00:00
|
|
|
started_at
|
|
|
|
ended_at
|
|
|
|
event_count
|
2020-05-06 12:09:36 +00:00
|
|
|
details
|
|
|
|
created_at
|
|
|
|
updated_at
|
2020-05-29 21:08:35 +00:00
|
|
|
assignees
|
2020-06-12 12:08:56 +00:00
|
|
|
notes
|
|
|
|
discussions
|
2020-06-30 15:08:48 +00:00
|
|
|
metrics_dashboard_url
|
2020-08-07 12:09:59 +00:00
|
|
|
runbook
|
2020-08-03 15:09:44 +00:00
|
|
|
todos
|
2020-08-13 18:10:36 +00:00
|
|
|
details_url
|
|
|
|
prometheus_alert
|
2020-10-13 06:09:09 +00:00
|
|
|
environment
|
2020-04-28 15:09:29 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
expect(described_class).to have_graphql_fields(*expected_fields)
|
|
|
|
end
|
|
|
|
end
|