Skip to content
代码片段 群组 项目
未验证 提交 9975bae7 编辑于 作者: Patrick Bajao's avatar Patrick Bajao 提交者: GitLab
浏览文件

Merge branch '454369-allow-exclude_service_accounts-param' into 'master'

Allow controllers to use the exclude_service_accounts parameter

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/149918



Merged-by: default avatarPatrick Bajao <ebajao@gitlab.com>
Approved-by: default avatarIvane Gkomarteli <igkomarteli@gitlab.com>
Approved-by: default avatarPatrick Bajao <ebajao@gitlab.com>
Co-authored-by: default avatarj.seto <jseto@gitlab.com>
No related branches found
No related tags found
无相关合并请求
...@@ -43,6 +43,7 @@ module Params ...@@ -43,6 +43,7 @@ module Params
:diffblue_license_key, :diffblue_license_key,
:drone_url, :drone_url,
:enable_ssl_verification, :enable_ssl_verification,
:exclude_service_accounts,
:external_wiki_url, :external_wiki_url,
:google_iap_service_account_json, :google_iap_service_account_json,
:google_iap_audience_client_id, :google_iap_audience_client_id,
......
...@@ -3,25 +3,55 @@ ...@@ -3,25 +3,55 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'Integration settings', feature_category: :integrations do RSpec.describe 'Integration settings', feature_category: :integrations do
let_it_be(:project) { create(:project) } context 'when the integration is for a project ' do
let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) }
let_it_be(:user) { create(:user) }
before do before do
project.add_maintainer(user) project.add_maintainer(user)
sign_in(user) sign_in(user)
end
context 'with Zentao integration records' do
before do
create(:integration, project: project, type_new: 'Integrations::Zentao', category: 'issue_tracker')
end
it 'shows settings without Zentao', :js do
visit namespace_project_settings_integrations_path(namespace_id: project.namespace.full_path,
project_id: project.path)
expect(page).to have_content('Add an integration')
expect(page).not_to have_content('ZenTao')
end
end
end end
context 'with Zentao integration records' do context 'when the integration is for the instance' do
let_it_be(:user) { create(:admin) }
before do before do
create(:integration, project: project, type_new: 'Integrations::Zentao', category: 'issue_tracker') sign_in(user)
enable_admin_mode!(user)
end end
it 'shows settings without Zentao', :js do context 'with Beyond Identity', :js do
visit namespace_project_settings_integrations_path(namespace_id: project.namespace.full_path, it 'creates a Beyond Identity integration' do
project_id: project.path) visit edit_admin_application_settings_integration_path(Integrations::BeyondIdentity.to_param)
first('label', text: 'Exclude service accounts').click
fill_in('service-token', with: 'sometoken')
click_button 'Save changes'
click_button 'Save'
expect(page).to have_checked_field('Active')
expect(page).to have_checked_field('Exclude service accounts')
expect(page).to have_content('Add an integration') integration = Integrations::BeyondIdentity.for_instance.take
expect(page).not_to have_content('ZenTao') expect(integration).to be_active
expect(integration.exclude_service_accounts).to be_truthy
end
end end
end end
end end
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册