Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Brandl <abrandl@gitlab.com>2019-04-05 16:02:56 +0300
committerAndreas Brandl <abrandl@gitlab.com>2019-04-05 16:02:56 +0300
commit46b1b9c1d61c269588bd3cd4203420608ddd7f0b (patch)
treea877f5366d3367e1264e96f3f5e8a4b23bdbd62a /spec/requests
parent7a48a06cf3b454021aa466464686fee8c82d6862 (diff)
Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"
This reverts merge request !26823
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/api/projects_spec.rb49
-rw-r--r--spec/requests/api/settings_spec.rb33
2 files changed, 0 insertions, 82 deletions
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb
index 352ea448c00..2bfb17d9c9a 100644
--- a/spec/requests/api/projects_spec.rb
+++ b/spec/requests/api/projects_spec.rb
@@ -46,8 +46,6 @@ shared_examples 'languages and percentages JSON response' do
end
describe API::Projects do
- include ExternalAuthorizationServiceHelpers
-
let(:user) { create(:user) }
let(:user2) { create(:user) }
let(:user3) { create(:user) }
@@ -1338,39 +1336,6 @@ describe API::Projects do
end
end
end
-
- context 'with external authorization' do
- let(:project) do
- create(:project,
- namespace: user.namespace,
- external_authorization_classification_label: 'the-label')
- end
-
- context 'when the user has access to the project' do
- before do
- external_service_allow_access(user, project)
- end
-
- it 'includes the label in the response' do
- get api("/projects/#{project.id}", user)
-
- expect(response).to have_gitlab_http_status(200)
- expect(json_response['external_authorization_classification_label']).to eq('the-label')
- end
- end
-
- context 'when the external service denies access' do
- before do
- external_service_deny_access(user, project)
- end
-
- it 'returns a 404' do
- get api("/projects/#{project.id}", user)
-
- expect(response).to have_gitlab_http_status(404)
- end
- end
- end
end
describe 'GET /projects/:id/users' do
@@ -1925,20 +1890,6 @@ describe API::Projects do
expect(response).to have_gitlab_http_status(403)
end
end
-
- context 'when updating external classification' do
- before do
- enable_external_authorization_service_check
- end
-
- it 'updates the classification label' do
- put(api("/projects/#{project.id}", user), params: { external_authorization_classification_label: 'new label' })
-
- expect(response).to have_gitlab_http_status(200)
-
- expect(project.reload.external_authorization_classification_label).to eq('new label')
- end
- end
end
describe 'POST /projects/:id/archive' do
diff --git a/spec/requests/api/settings_spec.rb b/spec/requests/api/settings_spec.rb
index 2d6b2d5da23..f33eb5b9e02 100644
--- a/spec/requests/api/settings_spec.rb
+++ b/spec/requests/api/settings_spec.rb
@@ -114,39 +114,6 @@ describe API::Settings, 'Settings' do
expect(json_response['performance_bar_allowed_group_id']).to be_nil
end
- context 'external policy classification settings' do
- let(:settings) do
- {
- external_authorization_service_enabled: true,
- external_authorization_service_url: 'https://custom.service/',
- external_authorization_service_default_label: 'default',
- external_authorization_service_timeout: 9.99,
- external_auth_client_cert: File.read('spec/fixtures/passphrase_x509_certificate.crt'),
- external_auth_client_key: File.read('spec/fixtures/passphrase_x509_certificate_pk.key'),
- external_auth_client_key_pass: "5iveL!fe"
- }
- end
- let(:attribute_names) { settings.keys.map(&:to_s) }
-
- it 'includes the attributes in the API' do
- get api("/application/settings", admin)
-
- expect(response).to have_gitlab_http_status(200)
- attribute_names.each do |attribute|
- expect(json_response.keys).to include(attribute)
- end
- end
-
- it 'allows updating the settings' do
- put api("/application/settings", admin), params: settings
-
- expect(response).to have_gitlab_http_status(200)
- settings.each do |attribute, value|
- expect(ApplicationSetting.current.public_send(attribute)).to eq(value)
- end
- end
- end
-
context "missing plantuml_url value when plantuml_enabled is true" do
it "returns a blank parameter error message" do
put api("/application/settings", admin), params: { plantuml_enabled: true }