diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-10-15 19:28:09 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-10-15 19:28:09 +0300 |
commit | 0602fcb6bf0050f71e8b8f69e0328031f9386618 (patch) | |
tree | c900c2cb8d19323c3c81d9d266ca187e1f79f885 /spec | |
parent | bf47fc8b0c05bf57e18e985e2ad2569c625108b3 (diff) | |
parent | 8a934b0676b44bd601f67f8ab88fb4e3dba3134e (diff) |
Merge branch 'sh-remove-koding' into 'master'
Remove Koding integration and documentation
Closes #39697
See merge request gitlab-org/gitlab-ce!22334
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb | 35 | ||||
-rw-r--r-- | spec/features/security/dashboard_access_spec.rb | 14 | ||||
-rw-r--r-- | spec/fixtures/valid.po | 3 | ||||
-rw-r--r-- | spec/lib/gitlab/file_detector_spec.rb | 4 | ||||
-rw-r--r-- | spec/models/repository_spec.rb | 14 | ||||
-rw-r--r-- | spec/presenters/project_presenter_spec.rb | 31 | ||||
-rw-r--r-- | spec/requests/api/settings_spec.rb | 15 | ||||
-rw-r--r-- | spec/routing/routing_spec.rb | 7 |
8 files changed, 0 insertions, 123 deletions
diff --git a/spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb b/spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb index 6fe21579e8e..df2b492ae6b 100644 --- a/spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb +++ b/spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb @@ -350,41 +350,6 @@ describe 'Projects > Show > User sees setup shortcut buttons' do end end end - - describe '"Set up Koding" button' do - it 'no "Set up Koding" button if Koding disabled' do - stub_application_setting(koding_enabled?: false) - - visit project_path(project) - - page.within('.project-stats') do - expect(page).not_to have_link('Set up Koding') - end - end - - it 'no "Set up Koding" button if the project already has a .koding.yml' do - stub_application_setting(koding_enabled?: true) - allow(Gitlab::CurrentSettings.current_application_settings).to receive(:koding_url).and_return('http://koding.example.com') - expect(project.repository.changelog).not_to be_nil - allow_any_instance_of(Repository).to receive(:koding_yml).and_return(project.repository.changelog) - - visit project_path(project) - - page.within('.project-stats') do - expect(page).not_to have_link('Set up Koding') - end - end - - it '"Set up Koding" button linked to new file populated for a .koding.yml' do - stub_application_setting(koding_enabled?: true) - - visit project_path(project) - - page.within('.project-stats') do - expect(page).to have_link('Set up Koding', href: presenter.add_koding_stack_path) - end - end - end end end end diff --git a/spec/features/security/dashboard_access_spec.rb b/spec/features/security/dashboard_access_spec.rb index 149bd32e736..0c893e65d9c 100644 --- a/spec/features/security/dashboard_access_spec.rb +++ b/spec/features/security/dashboard_access_spec.rb @@ -43,20 +43,6 @@ describe "Dashboard access" do it { is_expected.to be_allowed_for :visitor } end - describe "GET /koding" do - subject { koding_path } - - context 'with Koding enabled' do - before do - stub_application_setting(koding_enabled?: true) - end - - it { is_expected.to be_allowed_for :admin } - it { is_expected.to be_allowed_for :user } - it { is_expected.to be_denied_for :visitor } - end - end - describe "GET /projects/new" do it { expect(new_project_path).to be_allowed_for :admin } it { expect(new_project_path).to be_allowed_for :user } diff --git a/spec/fixtures/valid.po b/spec/fixtures/valid.po index e43fd5fea15..dbe2f952bad 100644 --- a/spec/fixtures/valid.po +++ b/spec/fixtures/valid.po @@ -790,9 +790,6 @@ msgstr "Establezca una contraseña en su cuenta para actualizar o enviar a travà msgid "Set up CI" msgstr "Configurar CI" -msgid "Set up Koding" -msgstr "Configurar Koding" - msgid "Set up auto deploy" msgstr "Configurar auto despliegue" diff --git a/spec/lib/gitlab/file_detector_spec.rb b/spec/lib/gitlab/file_detector_spec.rb index 9e351368b22..294ec2c2fd6 100644 --- a/spec/lib/gitlab/file_detector_spec.rb +++ b/spec/lib/gitlab/file_detector_spec.rb @@ -46,10 +46,6 @@ describe Gitlab::FileDetector do expect(described_class.type_of('.gitignore')).to eq(:gitignore) end - it 'returns the type of a Koding config file' do - expect(described_class.type_of('.koding.yml')).to eq(:koding) - end - it 'returns the type of a GitLab CI config file' do expect(described_class.type_of('.gitlab-ci.yml')).to eq(:gitlab_ci) end diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index 6f5a4118b95..fb16a321e4b 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -1567,7 +1567,6 @@ describe Repository do :license_blob, :license_key, :gitignore, - :koding_yml, :gitlab_ci_yml, :branch_names, :tag_names, @@ -1921,19 +1920,6 @@ describe Repository do end end - describe '#koding_yml', :use_clean_rails_memory_store_caching do - it 'returns and caches the output' do - expect(repository).to receive(:file_on_head) - .with(:koding) - .and_return(Gitlab::Git::Tree.new(path: '.koding.yml')) - .once - - 2.times do - expect(repository.koding_yml).to be_an_instance_of(Gitlab::Git::Tree) - end - end - end - describe '#readme', :use_clean_rails_memory_store_caching do context 'with a non-existing repository' do it 'returns nil' do diff --git a/spec/presenters/project_presenter_spec.rb b/spec/presenters/project_presenter_spec.rb index 96193784072..3eb2f149311 100644 --- a/spec/presenters/project_presenter_spec.rb +++ b/spec/presenters/project_presenter_spec.rb @@ -410,36 +410,5 @@ describe ProjectPresenter do end end end - - describe '#koding_anchor_data' do - it 'returns link to set up Koding if user can push and no koding YML exists' do - project.add_developer(user) - allow(project.repository).to receive(:koding_yml).and_return(nil) - allow(Gitlab::CurrentSettings).to receive(:koding_enabled?).and_return(true) - - expect(presenter.koding_anchor_data).to have_attributes(enabled: false, - label: 'Set up Koding', - link: presenter.add_koding_stack_path) - end - - it 'returns nil if user cannot push' do - expect(presenter.koding_anchor_data).to be_nil - end - - it 'returns nil if koding is not enabled' do - project.add_developer(user) - allow(Gitlab::CurrentSettings).to receive(:koding_enabled?).and_return(false) - - expect(presenter.koding_anchor_data).to be_nil - end - - it 'returns nil if koding YML already exists' do - project.add_developer(user) - allow(project.repository).to receive(:koding_yml).and_return(double) - allow(Gitlab::CurrentSettings).to receive(:koding_enabled?).and_return(true) - - expect(presenter.koding_anchor_data).to be_nil - end - end end end diff --git a/spec/requests/api/settings_spec.rb b/spec/requests/api/settings_spec.rb index fb1be16a111..84c7210f6bb 100644 --- a/spec/requests/api/settings_spec.rb +++ b/spec/requests/api/settings_spec.rb @@ -13,8 +13,6 @@ describe API::Settings, 'Settings' do expect(json_response['default_projects_limit']).to eq(42) expect(json_response['password_authentication_enabled_for_web']).to be_truthy expect(json_response['repository_storages']).to eq(['default']) - expect(json_response['koding_enabled']).to be_falsey - expect(json_response['koding_url']).to be_nil expect(json_response['plantuml_enabled']).to be_falsey expect(json_response['plantuml_url']).to be_nil expect(json_response['default_project_visibility']).to be_a String @@ -47,8 +45,6 @@ describe API::Settings, 'Settings' do default_projects_limit: 3, password_authentication_enabled_for_web: false, repository_storages: ['custom'], - koding_enabled: true, - koding_url: 'http://koding.example.com', plantuml_enabled: true, plantuml_url: 'http://plantuml.example.com', default_snippet_visibility: 'internal', @@ -72,8 +68,6 @@ describe API::Settings, 'Settings' do expect(json_response['default_projects_limit']).to eq(3) expect(json_response['password_authentication_enabled_for_web']).to be_falsey expect(json_response['repository_storages']).to eq(['custom']) - expect(json_response['koding_enabled']).to be_truthy - expect(json_response['koding_url']).to eq('http://koding.example.com') expect(json_response['plantuml_enabled']).to be_truthy expect(json_response['plantuml_url']).to eq('http://plantuml.example.com') expect(json_response['default_snippet_visibility']).to eq('internal') @@ -112,15 +106,6 @@ describe API::Settings, 'Settings' do expect(json_response['performance_bar_allowed_group_id']).to be_nil end - context "missing koding_url value when koding_enabled is true" do - it "returns a blank parameter error message" do - put api("/application/settings", admin), koding_enabled: true - - expect(response).to have_gitlab_http_status(400) - expect(json_response['error']).to eq('koding_url is missing') - 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), plantuml_enabled: true diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index dd8f6239587..a170bb14144 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -140,13 +140,6 @@ describe HelpController, "routing" do end end -# koding GET /koding(.:format) koding#index -describe KodingController, "routing" do - it "to #index" do - expect(get("/koding")).to route_to('koding#index') - end -end - # profile_account GET /profile/account(.:format) profile#account # profile_history GET /profile/history(.:format) profile#history # profile_password PUT /profile/password(.:format) profile#password_update |