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:
authorThong Kuah <tkuah@gitlab.com>2018-10-10 11:45:49 +0300
committerThong Kuah <tkuah@gitlab.com>2018-10-15 01:09:10 +0300
commit504cbb27c1018bd702346eb6497e37372dd9f35a (patch)
treea6af04b3348898bcaf916bca4f81c193b350c5ff /app/controllers/projects/clusters
parentcc1ccbf83a4a20f367011a6aec3d158214cfeb34 (diff)
Remove un-used inheritance from service
Remove the inheritance from ::BaseService which is causing us to inherit the initializer that has project as the first arg, as we will not have access to project with forthcoming group clusters. Also call install service from create service - 1 less thing to re-use Extract TestRequest code into a spec helper. Given that we need different behaviour for Rails 5.0 (and again in Rails 5.1!), it's handy to have that branching behaviour in one place
Diffstat (limited to 'app/controllers/projects/clusters')
-rw-r--r--app/controllers/projects/clusters/applications_controller.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/projects/clusters/applications_controller.rb b/app/controllers/projects/clusters/applications_controller.rb
index a3fc4f4741b..bcea96bce94 100644
--- a/app/controllers/projects/clusters/applications_controller.rb
+++ b/app/controllers/projects/clusters/applications_controller.rb
@@ -6,12 +6,10 @@ class Projects::Clusters::ApplicationsController < Projects::ApplicationControll
before_action :authorize_create_cluster!, only: [:create]
def create
- application = Clusters::Applications::CreateService
+ Clusters::Applications::CreateService
.new(@cluster, current_user, create_cluster_application_params)
.execute(request)
- Clusters::Applications::ScheduleInstallationService.new(project, current_user).execute(application)
-
head :no_content
rescue Clusters::Applications::CreateService::InvalidApplicationError
render_404