Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f6f61506
Commit
f6f61506
authored
Aug 09, 2021
by
Hordur Freyr Yngvason
Committed by
Kerri Miller
Aug 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove cluster applications controllers and routes
parent
8b030d4c
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
0 additions
and
678 deletions
+0
-678
app/controllers/admin/clusters/applications_controller.rb
app/controllers/admin/clusters/applications_controller.rb
+0
-11
app/controllers/clusters/applications_controller.rb
app/controllers/clusters/applications_controller.rb
+0
-56
app/controllers/groups/clusters/applications_controller.rb
app/controllers/groups/clusters/applications_controller.rb
+0
-18
app/controllers/projects/clusters/applications_controller.rb
app/controllers/projects/clusters/applications_controller.rb
+0
-15
app/presenters/clusterable_presenter.rb
app/presenters/clusterable_presenter.rb
+0
-8
app/presenters/group_clusterable_presenter.rb
app/presenters/group_clusterable_presenter.rb
+0
-10
app/presenters/instance_clusterable_presenter.rb
app/presenters/instance_clusterable_presenter.rb
+0
-10
app/presenters/project_clusterable_presenter.rb
app/presenters/project_clusterable_presenter.rb
+0
-10
config/routes.rb
config/routes.rb
+0
-6
spec/controllers/admin/clusters/applications_controller_spec.rb
...ontrollers/admin/clusters/applications_controller_spec.rb
+0
-139
spec/controllers/groups/clusters/applications_controller_spec.rb
...ntrollers/groups/clusters/applications_controller_spec.rb
+0
-148
spec/controllers/projects/clusters/applications_controller_spec.rb
...rollers/projects/clusters/applications_controller_spec.rb
+0
-215
spec/presenters/group_clusterable_presenter_spec.rb
spec/presenters/group_clusterable_presenter_spec.rb
+0
-16
spec/presenters/project_clusterable_presenter_spec.rb
spec/presenters/project_clusterable_presenter_spec.rb
+0
-16
No files found.
app/controllers/admin/clusters/applications_controller.rb
deleted
100644 → 0
View file @
8b030d4c
# frozen_string_literal: true
class
Admin::Clusters::ApplicationsController
<
Clusters
::
ApplicationsController
include
EnforcesAdminAuthentication
private
def
clusterable
@clusterable
||=
InstanceClusterablePresenter
.
fabricate
(
Clusters
::
Instance
.
new
,
current_user:
current_user
)
end
end
app/controllers/clusters/applications_controller.rb
deleted
100644 → 0
View file @
8b030d4c
# frozen_string_literal: true
class
Clusters::ApplicationsController
<
Clusters
::
BaseController
before_action
:cluster
before_action
:authorize_create_cluster!
,
only:
[
:create
]
before_action
:authorize_update_cluster!
,
only:
[
:update
]
before_action
:authorize_admin_cluster!
,
only:
[
:destroy
]
def
create
request_handler
do
Clusters
::
Applications
::
CreateService
.
new
(
@cluster
,
current_user
,
cluster_application_params
)
.
execute
(
request
)
end
end
def
update
request_handler
do
Clusters
::
Applications
::
UpdateService
.
new
(
@cluster
,
current_user
,
cluster_application_params
)
.
execute
(
request
)
end
end
def
destroy
request_handler
do
Clusters
::
Applications
::
DestroyService
.
new
(
@cluster
,
current_user
,
cluster_application_destroy_params
)
.
execute
(
request
)
end
end
private
def
request_handler
yield
head
:no_content
rescue
Clusters
::
Applications
::
BaseService
::
InvalidApplicationError
render_404
rescue
StandardError
head
:bad_request
end
def
cluster
@cluster
||=
clusterable
.
clusters
.
find
(
params
[
:id
])
||
render_404
end
def
cluster_application_params
params
.
permit
(
:application
,
:hostname
,
:pages_domain_id
,
:email
,
:stack
,
:host
,
:port
,
:protocol
)
end
def
cluster_application_destroy_params
params
.
permit
(
:application
)
end
end
app/controllers/groups/clusters/applications_controller.rb
deleted
100644 → 0
View file @
8b030d4c
# frozen_string_literal: true
class
Groups::Clusters::ApplicationsController
<
Clusters
::
ApplicationsController
include
ControllerWithCrossProjectAccessCheck
prepend_before_action
:group
requires_cross_project_access
private
def
clusterable
@clusterable
||=
ClusterablePresenter
.
fabricate
(
group
,
current_user:
current_user
)
end
def
group
@group
||=
find_routable!
(
Group
,
params
[
:group_id
]
||
params
[
:id
],
request
.
path_info
)
end
end
app/controllers/projects/clusters/applications_controller.rb
deleted
100644 → 0
View file @
8b030d4c
# frozen_string_literal: true
class
Projects::Clusters::ApplicationsController
<
Clusters
::
ApplicationsController
prepend_before_action
:project
private
def
clusterable
@clusterable
||=
ClusterablePresenter
.
fabricate
(
project
,
current_user:
current_user
)
end
def
project
@project
||=
find_routable!
(
Project
,
File
.
join
(
params
[
:namespace_id
],
params
[
:project_id
]),
request
.
path_info
)
end
end
app/presenters/clusterable_presenter.rb
View file @
f6f61506
...
...
@@ -48,14 +48,6 @@ class ClusterablePresenter < Gitlab::View::Presenter::Delegated
raise
NotImplementedError
end
def
install_applications_cluster_path
(
cluster
,
application
)
raise
NotImplementedError
end
def
update_applications_cluster_path
(
cluster
,
application
)
raise
NotImplementedError
end
def
clear_cluster_cache_path
(
cluster
)
raise
NotImplementedError
end
...
...
app/presenters/group_clusterable_presenter.rb
View file @
f6f61506
...
...
@@ -9,16 +9,6 @@ class GroupClusterablePresenter < ClusterablePresenter
cluster_status_group_cluster_path
(
clusterable
,
cluster
,
params
)
end
override
:install_applications_cluster_path
def
install_applications_cluster_path
(
cluster
,
application
)
install_applications_group_cluster_path
(
clusterable
,
cluster
,
application
)
end
override
:update_applications_cluster_path
def
update_applications_cluster_path
(
cluster
,
application
)
update_applications_group_cluster_path
(
clusterable
,
cluster
,
application
)
end
override
:clear_cluster_cache_path
def
clear_cluster_cache_path
(
cluster
)
clear_cache_group_cluster_path
(
clusterable
,
cluster
)
...
...
app/presenters/instance_clusterable_presenter.rb
View file @
f6f61506
...
...
@@ -27,16 +27,6 @@ class InstanceClusterablePresenter < ClusterablePresenter
cluster_status_admin_cluster_path
(
cluster
,
params
)
end
override
:install_applications_cluster_path
def
install_applications_cluster_path
(
cluster
,
application
)
install_applications_admin_cluster_path
(
cluster
,
application
)
end
override
:update_applications_cluster_path
def
update_applications_cluster_path
(
cluster
,
application
)
update_applications_admin_cluster_path
(
cluster
,
application
)
end
override
:clear_cluster_cache_path
def
clear_cluster_cache_path
(
cluster
)
clear_cache_admin_cluster_path
(
cluster
)
...
...
app/presenters/project_clusterable_presenter.rb
View file @
f6f61506
...
...
@@ -9,16 +9,6 @@ class ProjectClusterablePresenter < ClusterablePresenter
cluster_status_project_cluster_path
(
clusterable
,
cluster
,
params
)
end
override
:install_applications_cluster_path
def
install_applications_cluster_path
(
cluster
,
application
)
install_applications_project_cluster_path
(
clusterable
,
cluster
,
application
)
end
override
:update_applications_cluster_path
def
update_applications_cluster_path
(
cluster
,
application
)
update_applications_project_cluster_path
(
clusterable
,
cluster
,
application
)
end
override
:clear_cluster_cache_path
def
clear_cluster_cache_path
(
cluster
)
clear_cache_project_cluster_path
(
clusterable
,
cluster
)
...
...
config/routes.rb
View file @
f6f61506
...
...
@@ -248,12 +248,6 @@ Rails.application.routes.draw do
get
:environments
,
format: :json
end
scope
:applications
do
post
'/:application'
,
to:
'clusters/applications#create'
,
as: :install_applications
patch
'/:application'
,
to:
'clusters/applications#update'
,
as: :update_applications
delete
'/:application'
,
to:
'clusters/applications#destroy'
,
as: :uninstall_applications
end
get
:metrics_dashboard
get
:'/prometheus/api/v1/*proxy_path'
,
to:
'clusters#prometheus_proxy'
,
as: :prometheus_api
get
:cluster_status
,
format: :json
...
...
spec/controllers/admin/clusters/applications_controller_spec.rb
deleted
100644 → 0
View file @
8b030d4c
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
Admin
::
Clusters
::
ApplicationsController
do
include
AccessMatchersForController
def
current_application
Clusters
::
Cluster
::
APPLICATIONS
[
application
]
end
shared_examples
'a secure endpoint'
do
it
{
expect
{
subject
}.
to
be_allowed_for
(
:admin
)
}
it
{
expect
{
subject
}.
to
be_denied_for
(
:user
)
}
it
{
expect
{
subject
}.
to
be_denied_for
(
:external
)
}
end
let
(
:cluster
)
{
create
(
:cluster
,
:instance
,
:provided_by_gcp
)
}
describe
'POST create'
do
subject
do
post
:create
,
params:
params
end
let
(
:application
)
{
'ingress'
}
let
(
:params
)
{
{
application:
application
,
id:
cluster
.
id
}
}
describe
'functionality'
do
let
(
:admin
)
{
create
(
:admin
)
}
before
do
sign_in
(
admin
)
end
it
'schedule an application installation'
do
expect
(
ClusterInstallAppWorker
).
to
receive
(
:perform_async
).
with
(
application
,
anything
).
once
expect
{
subject
}.
to
change
{
current_application
.
count
}
expect
(
response
).
to
have_gitlab_http_status
(
:no_content
)
expect
(
cluster
.
application_ingress
).
to
be_scheduled
end
context
'when cluster do not exists'
do
before
do
cluster
.
destroy!
end
it
'return 404'
do
expect
{
subject
}.
not_to
change
{
current_application
.
count
}
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
end
end
context
'when application is unknown'
do
let
(
:application
)
{
'unkwnown-app'
}
it
'return 404'
do
is_expected
.
to
have_gitlab_http_status
(
:not_found
)
end
end
context
'when application is already installing'
do
before
do
create
(
:clusters_applications_ingress
,
:installing
,
cluster:
cluster
)
end
it
'returns 400'
do
is_expected
.
to
have_gitlab_http_status
(
:bad_request
)
end
end
end
describe
'security'
do
before
do
allow
(
ClusterInstallAppWorker
).
to
receive
(
:perform_async
)
end
it_behaves_like
'a secure endpoint'
end
end
describe
'PATCH update'
do
subject
do
patch
:update
,
params:
params
end
let!
(
:application
)
{
create
(
:clusters_applications_cert_manager
,
:installed
,
cluster:
cluster
)
}
let
(
:application_name
)
{
application
.
name
}
let
(
:params
)
{
{
application:
application_name
,
id:
cluster
.
id
,
email:
"new-email@example.com"
}
}
describe
'functionality'
do
let
(
:admin
)
{
create
(
:admin
)
}
before
do
sign_in
(
admin
)
end
context
"when cluster and app exists"
do
it
"schedules an application update"
do
expect
(
ClusterPatchAppWorker
).
to
receive
(
:perform_async
).
with
(
application
.
name
,
anything
).
once
is_expected
.
to
have_gitlab_http_status
(
:no_content
)
expect
(
cluster
.
application_cert_manager
).
to
be_scheduled
end
end
context
'when cluster do not exists'
do
before
do
cluster
.
destroy!
end
it
{
is_expected
.
to
have_gitlab_http_status
(
:not_found
)
}
end
context
'when application is unknown'
do
let
(
:application_name
)
{
'unkwnown-app'
}
it
{
is_expected
.
to
have_gitlab_http_status
(
:not_found
)
}
end
context
'when application is already scheduled'
do
before
do
application
.
make_scheduled!
end
it
{
is_expected
.
to
have_gitlab_http_status
(
:bad_request
)
}
end
end
describe
'security'
do
before
do
allow
(
ClusterPatchAppWorker
).
to
receive
(
:perform_async
)
end
it_behaves_like
'a secure endpoint'
end
end
end
spec/controllers/groups/clusters/applications_controller_spec.rb
deleted
100644 → 0
View file @
8b030d4c
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
Groups
::
Clusters
::
ApplicationsController
do
include
AccessMatchersForController
def
current_application
Clusters
::
Cluster
::
APPLICATIONS
[
application
]
end
shared_examples
'a secure endpoint'
do
it
(
'is allowed for admin when admin mode is enabled'
,
:enable_admin_mode
)
{
expect
{
subject
}.
to
be_allowed_for
(
:admin
)
}
it
(
'is denied for admin when admin mode is disabled'
)
{
expect
{
subject
}.
to
be_denied_for
(
:admin
)
}
it
{
expect
{
subject
}.
to
be_allowed_for
(
:owner
).
of
(
group
)
}
it
{
expect
{
subject
}.
to
be_allowed_for
(
:maintainer
).
of
(
group
)
}
it
{
expect
{
subject
}.
to
be_denied_for
(
:developer
).
of
(
group
)
}
it
{
expect
{
subject
}.
to
be_denied_for
(
:reporter
).
of
(
group
)
}
it
{
expect
{
subject
}.
to
be_denied_for
(
:guest
).
of
(
group
)
}
it
{
expect
{
subject
}.
to
be_denied_for
(
:user
)
}
it
{
expect
{
subject
}.
to
be_denied_for
(
:external
)
}
end
let
(
:cluster
)
{
create
(
:cluster
,
:group
,
:provided_by_gcp
)
}
let
(
:group
)
{
cluster
.
group
}
describe
'POST create'
do
subject
do
post
:create
,
params:
params
.
merge
(
group_id:
group
)
end
let
(
:application
)
{
'ingress'
}
let
(
:params
)
{
{
application:
application
,
id:
cluster
.
id
}
}
describe
'functionality'
do
let
(
:user
)
{
create
(
:user
)
}
before
do
group
.
add_maintainer
(
user
)
sign_in
(
user
)
end
it
'schedule an application installation'
do
expect
(
ClusterInstallAppWorker
).
to
receive
(
:perform_async
).
with
(
application
,
anything
).
once
expect
{
subject
}.
to
change
{
current_application
.
count
}
expect
(
response
).
to
have_gitlab_http_status
(
:no_content
)
expect
(
cluster
.
application_ingress
).
to
be_scheduled
end
context
'when cluster do not exists'
do
before
do
cluster
.
destroy!
end
it
'return 404'
do
expect
{
subject
}.
not_to
change
{
current_application
.
count
}
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
end
end
context
'when application is unknown'
do
let
(
:application
)
{
'unkwnown-app'
}
it
'return 404'
do
is_expected
.
to
have_gitlab_http_status
(
:not_found
)
end
end
context
'when application is already installing'
do
before
do
create
(
:clusters_applications_ingress
,
:installing
,
cluster:
cluster
)
end
it
'returns 400'
do
is_expected
.
to
have_gitlab_http_status
(
:bad_request
)
end
end
end
describe
'security'
do
before
do
allow
(
ClusterInstallAppWorker
).
to
receive
(
:perform_async
)
end
it_behaves_like
'a secure endpoint'
end
end
describe
'PATCH update'
do
subject
do
patch
:update
,
params:
params
.
merge
(
group_id:
group
)
end
let!
(
:application
)
{
create
(
:clusters_applications_cert_manager
,
:installed
,
cluster:
cluster
)
}
let
(
:application_name
)
{
application
.
name
}
let
(
:params
)
{
{
application:
application_name
,
id:
cluster
.
id
,
email:
"new-email@example.com"
}
}
describe
'functionality'
do
let
(
:user
)
{
create
(
:user
)
}
before
do
group
.
add_maintainer
(
user
)
sign_in
(
user
)
end
context
"when cluster and app exists"
do
it
"schedules an application update"
do
expect
(
ClusterPatchAppWorker
).
to
receive
(
:perform_async
).
with
(
application
.
name
,
anything
).
once
is_expected
.
to
have_gitlab_http_status
(
:no_content
)
expect
(
cluster
.
application_cert_manager
).
to
be_scheduled
end
end
context
'when cluster do not exists'
do
before
do
cluster
.
destroy!
end
it
{
is_expected
.
to
have_gitlab_http_status
(
:not_found
)
}
end
context
'when application is unknown'
do
let
(
:application_name
)
{
'unkwnown-app'
}
it
{
is_expected
.
to
have_gitlab_http_status
(
:not_found
)
}
end
context
'when application is already scheduled'
do
before
do
application
.
make_scheduled!
end
it
{
is_expected
.
to
have_gitlab_http_status
(
:bad_request
)
}
end
end
describe
'security'
do
before
do
allow
(
ClusterPatchAppWorker
).
to
receive
(
:perform_async
)
end
it_behaves_like
'a secure endpoint'
end
end
end
spec/controllers/projects/clusters/applications_controller_spec.rb
deleted
100644 → 0
View file @
8b030d4c
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
Projects
::
Clusters
::
ApplicationsController
do
include
AccessMatchersForController
def
current_application
Clusters
::
Cluster
::
APPLICATIONS
[
application
]
end
shared_examples
'a secure endpoint'
do
it
'is allowed for admin when admin mode enabled'
,
:enable_admin_mode
do
expect
{
subject
}.
to
be_allowed_for
(
:admin
)
end
it
'is denied for admin when admin mode disabled'
do
expect
{
subject
}.
to
be_denied_for
(
:admin
)
end
it
{
expect
{
subject
}.
to
be_allowed_for
(
:owner
).
of
(
project
)
}
it
{
expect
{
subject
}.
to
be_allowed_for
(
:maintainer
).
of
(
project
)
}
it
{
expect
{
subject
}.
to
be_denied_for
(
:developer
).
of
(
project
)
}
it
{
expect
{
subject
}.
to
be_denied_for
(
:reporter
).
of
(
project
)
}
it
{
expect
{
subject
}.
to
be_denied_for
(
:guest
).
of
(
project
)
}
it
{
expect
{
subject
}.
to
be_denied_for
(
:user
)
}
it
{
expect
{
subject
}.
to
be_denied_for
(
:external
)
}
end
describe
'POST create'
do
subject
do
post
:create
,
params:
params
.
merge
(
namespace_id:
project
.
namespace
,
project_id:
project
)
end
let
(
:cluster
)
{
create
(
:cluster
,
:project
,
:provided_by_gcp
)
}
let
(
:project
)
{
cluster
.
project
}
let
(
:application
)
{
'ingress'
}
let
(
:params
)
{
{
application:
application
,
id:
cluster
.
id
}
}
describe
'functionality'
do
let
(
:user
)
{
create
(
:user
)
}
before
do
project
.
add_maintainer
(
user
)
sign_in
(
user
)
end
it
'schedule an application installation'
do
expect
(
ClusterInstallAppWorker
).
to
receive
(
:perform_async
).
with
(
application
,
anything
).
once
expect
{
subject
}.
to
change
{
current_application
.
count
}
expect
(
response
).
to
have_gitlab_http_status
(
:no_content
)
expect
(
cluster
.
application_ingress
).
to
be_scheduled
end
context
'when cluster do not exists'
do
before
do
cluster
.
destroy!
end
it
'return 404'
do
expect
{
subject
}.
not_to
change
{
current_application
.
count
}
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
end
end
context
'when application is unknown'
do
let
(
:application
)
{
'unkwnown-app'
}
it
'return 404'
do
is_expected
.
to
have_gitlab_http_status
(
:not_found
)
end
end
context
'when application is already installing'
do
before
do
create
(
:clusters_applications_ingress
,
:installing
,
cluster:
cluster
)
end
it
'returns 400'
do
is_expected
.
to
have_gitlab_http_status
(
:bad_request
)
end
end
end
describe
'security'
do
before
do
allow
(
ClusterInstallAppWorker
).
to
receive
(
:perform_async
)
end
it_behaves_like
'a secure endpoint'
end
end
describe
'PATCH update'
do
subject
do
patch
:update
,
params:
params
.
merge
(
namespace_id:
project
.
namespace
,
project_id:
project
)
end
let
(
:cluster
)
{
create
(
:cluster
,
:project
,
:provided_by_gcp
)
}
let
(
:project
)
{
cluster
.
project
}
let!
(
:application
)
{
create
(
:clusters_applications_knative
,
:installed
,
cluster:
cluster
)
}
let
(
:application_name
)
{
application
.
name
}
let
(
:params
)
{
{
application:
application_name
,
id:
cluster
.
id
,
hostname:
"new.example.com"
}
}
describe
'functionality'
do
let
(
:user
)
{
create
(
:user
)
}
before
do
project
.
add_maintainer
(
user
)
sign_in
(
user
)
end
context
"when cluster and app exists"
do
it
"schedules an application update"
do
expect
(
ClusterPatchAppWorker
).
to
receive
(
:perform_async
).
with
(
application
.
name
,
anything
).
once
is_expected
.
to
have_gitlab_http_status
(
:no_content
)
expect
(
cluster
.
application_knative
).
to
be_scheduled
end
end
context
'when cluster do not exists'
do
before
do
cluster
.
destroy!
end
it
{
is_expected
.
to
have_gitlab_http_status
(
:not_found
)
}
end
context
'when application is unknown'
do
let
(
:application_name
)
{
'unkwnown-app'
}
it
{
is_expected
.
to
have_gitlab_http_status
(
:not_found
)
}
end
context
'when application is already scheduled'
do
before
do
application
.
make_scheduled!
end
it
{
is_expected
.
to
have_gitlab_http_status
(
:bad_request
)
}
end
end
describe
'security'
do
before
do
allow
(
ClusterPatchAppWorker
).
to
receive
(
:perform_async
)
end
it_behaves_like
'a secure endpoint'
end
end
describe
'DELETE destroy'
do
subject
do
delete
:destroy
,
params:
params
.
merge
(
namespace_id:
project
.
namespace
,
project_id:
project
)
end
let
(
:cluster
)
{
create
(
:cluster
,
:project
,
:provided_by_gcp
)
}
let
(
:project
)
{
cluster
.
project
}
let!
(
:application
)
{
create
(
:clusters_applications_prometheus
,
:installed
,
cluster:
cluster
)
}
let
(
:application_name
)
{
application
.
name
}
let
(
:params
)
{
{
application:
application_name
,
id:
cluster
.
id
}
}
let
(
:worker_class
)
{
Clusters
::
Applications
::
UninstallWorker
}
describe
'functionality'
do
let
(
:user
)
{
create
(
:user
)
}
before
do
project
.
add_maintainer
(
user
)
sign_in
(
user
)
end
context
"when cluster and app exists"
do
it
"schedules an application update"
do
expect
(
worker_class
).
to
receive
(
:perform_async
).
with
(
application
.
name
,
application
.
id
).
once
is_expected
.
to
have_gitlab_http_status
(
:no_content
)
expect
(
cluster
.
application_prometheus
).
to
be_scheduled
end
end
context
'when cluster do not exists'
do
before
do
cluster
.
destroy!
end
it
{
is_expected
.
to
have_gitlab_http_status
(
:not_found
)
}
end
context
'when application is unknown'
do
let
(
:application_name
)
{
'unkwnown-app'
}
it
{
is_expected
.
to
have_gitlab_http_status
(
:not_found
)
}
end
context
'when application is already scheduled'
do
before
do
application
.
make_scheduled!
end
it
{
is_expected
.
to
have_gitlab_http_status
(
:bad_request
)
}
end
end
describe
'security'
do
before
do
allow
(
worker_class
).
to
receive
(
:perform_async
)
end
it_behaves_like
'a secure endpoint'
end
end
end
spec/presenters/group_clusterable_presenter_spec.rb
View file @
f6f61506
...
...
@@ -67,22 +67,6 @@ RSpec.describe GroupClusterablePresenter do
it
{
is_expected
.
to
eq
(
cluster_status_group_cluster_path
(
group
,
cluster
))
}
end
describe
'#install_applications_cluster_path'
do
let
(
:application
)
{
:helm
}
subject
{
presenter
.
install_applications_cluster_path
(
cluster
,
application
)
}
it
{
is_expected
.
to
eq
(
install_applications_group_cluster_path
(
group
,
cluster
,
application
))
}
end
describe
'#update_applications_cluster_path'
do
let
(
:application
)
{
:helm
}
subject
{
presenter
.
update_applications_cluster_path
(
cluster
,
application
)
}
it
{
is_expected
.
to
eq
(
update_applications_group_cluster_path
(
group
,
cluster
,
application
))
}
end
describe
'#clear_cluster_cache_path'
do
subject
{
presenter
.
clear_cluster_cache_path
(
cluster
)
}
...
...
spec/presenters/project_clusterable_presenter_spec.rb
View file @
f6f61506
...
...
@@ -67,22 +67,6 @@ RSpec.describe ProjectClusterablePresenter do
it
{
is_expected
.
to
eq
(
cluster_status_project_cluster_path
(
project
,
cluster
))
}
end
describe
'#install_applications_cluster_path'
do
let
(
:application
)
{
:helm
}
subject
{
presenter
.
install_applications_cluster_path
(
cluster
,
application
)
}
it
{
is_expected
.
to
eq
(
install_applications_project_cluster_path
(
project
,
cluster
,
application
))
}
end
describe
'#update_applications_cluster_path'
do
let
(
:application
)
{
:helm
}
subject
{
presenter
.
update_applications_cluster_path
(
cluster
,
application
)
}
it
{
is_expected
.
to
eq
(
update_applications_project_cluster_path
(
project
,
cluster
,
application
))
}
end
describe
'#clear_cluster_cache_path'
do
subject
{
presenter
.
clear_cluster_cache_path
(
cluster
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment