diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /spec/requests/api/graphql/mutations/alert_management | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/requests/api/graphql/mutations/alert_management')
7 files changed, 8 insertions, 3 deletions
diff --git a/spec/requests/api/graphql/mutations/alert_management/alerts/set_assignees_spec.rb b/spec/requests/api/graphql/mutations/alert_management/alerts/set_assignees_spec.rb index cd5cefa0a9a..fcef7b4e3ec 100644 --- a/spec/requests/api/graphql/mutations/alert_management/alerts/set_assignees_spec.rb +++ b/spec/requests/api/graphql/mutations/alert_management/alerts/set_assignees_spec.rb @@ -8,6 +8,7 @@ RSpec.describe 'Setting assignees of an alert' do let_it_be(:project) { create(:project) } let_it_be(:current_user) { create(:user) } let_it_be(:alert) { create(:alert_management_alert, project: project) } + let(:input) { { assignee_usernames: [current_user.username] } } let(:mutation) do diff --git a/spec/requests/api/graphql/mutations/alert_management/alerts/todo/create_spec.rb b/spec/requests/api/graphql/mutations/alert_management/alerts/todo/create_spec.rb index cd423d7764a..48307964345 100644 --- a/spec/requests/api/graphql/mutations/alert_management/alerts/todo/create_spec.rb +++ b/spec/requests/api/graphql/mutations/alert_management/alerts/todo/create_spec.rb @@ -7,6 +7,7 @@ RSpec.describe 'Creating a todo for the alert' do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } + let(:alert) { create(:alert_management_alert, project: project) } let(:mutation) do diff --git a/spec/requests/api/graphql/mutations/alert_management/alerts/update_alert_status_spec.rb b/spec/requests/api/graphql/mutations/alert_management/alerts/update_alert_status_spec.rb index ff55656a2ae..802d8d6c5a1 100644 --- a/spec/requests/api/graphql/mutations/alert_management/alerts/update_alert_status_spec.rb +++ b/spec/requests/api/graphql/mutations/alert_management/alerts/update_alert_status_spec.rb @@ -7,6 +7,7 @@ RSpec.describe 'Setting the status of an alert' do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } + let(:alert) { create(:alert_management_alert, project: project) } let(:input) { { status: 'ACKNOWLEDGED' } } diff --git a/spec/requests/api/graphql/mutations/alert_management/http_integration/create_spec.rb b/spec/requests/api/graphql/mutations/alert_management/http_integration/create_spec.rb index e594d67aab4..ff93da2153f 100644 --- a/spec/requests/api/graphql/mutations/alert_management/http_integration/create_spec.rb +++ b/spec/requests/api/graphql/mutations/alert_management/http_integration/create_spec.rb @@ -7,6 +7,7 @@ RSpec.describe 'Creating a new HTTP Integration' do let_it_be(:current_user) { create(:user) } let_it_be(:project) { create(:project) } + let(:variables) do { project_path: project.full_path, diff --git a/spec/requests/api/graphql/mutations/alert_management/prometheus_integration/create_spec.rb b/spec/requests/api/graphql/mutations/alert_management/prometheus_integration/create_spec.rb index 0ef61ae0d5b..4c359d9b357 100644 --- a/spec/requests/api/graphql/mutations/alert_management/prometheus_integration/create_spec.rb +++ b/spec/requests/api/graphql/mutations/alert_management/prometheus_integration/create_spec.rb @@ -7,6 +7,7 @@ RSpec.describe 'Creating a new Prometheus Integration' do let_it_be(:current_user) { create(:user) } let_it_be(:project) { create(:project) } + let(:variables) do { project_path: project.full_path, @@ -42,7 +43,7 @@ RSpec.describe 'Creating a new Prometheus Integration' do it 'creates a new integration' do post_graphql_mutation(mutation, current_user: current_user) - new_integration = ::PrometheusService.last! + new_integration = ::Integrations::Prometheus.last! integration_response = mutation_response['integration'] expect(response).to have_gitlab_http_status(:success) diff --git a/spec/requests/api/graphql/mutations/alert_management/prometheus_integration/reset_token_spec.rb b/spec/requests/api/graphql/mutations/alert_management/prometheus_integration/reset_token_spec.rb index d8d0ace5981..31053c50cac 100644 --- a/spec/requests/api/graphql/mutations/alert_management/prometheus_integration/reset_token_spec.rb +++ b/spec/requests/api/graphql/mutations/alert_management/prometheus_integration/reset_token_spec.rb @@ -7,7 +7,7 @@ RSpec.describe 'Resetting a token on an existing Prometheus Integration' do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } - let_it_be(:integration) { create(:prometheus_service, project: project) } + let_it_be(:integration) { create(:prometheus_integration, project: project) } let(:mutation) do variables = { diff --git a/spec/requests/api/graphql/mutations/alert_management/prometheus_integration/update_spec.rb b/spec/requests/api/graphql/mutations/alert_management/prometheus_integration/update_spec.rb index 6c4a647a353..ad26ec118d7 100644 --- a/spec/requests/api/graphql/mutations/alert_management/prometheus_integration/update_spec.rb +++ b/spec/requests/api/graphql/mutations/alert_management/prometheus_integration/update_spec.rb @@ -7,7 +7,7 @@ RSpec.describe 'Updating an existing Prometheus Integration' do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } - let_it_be(:integration) { create(:prometheus_service, project: project) } + let_it_be(:integration) { create(:prometheus_integration, project: project) } let(:mutation) do variables = { |