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
c7222834
Commit
c7222834
authored
Mar 24, 2020
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove alerts unlicenced checks from specs
parent
d16c5362
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
31 deletions
+0
-31
ee/spec/controllers/projects/prometheus/alerts_controller_spec.rb
...controllers/projects/prometheus/alerts_controller_spec.rb
+0
-17
ee/spec/services/metrics/dashboard/gitlab_alert_embed_service_spec.rb
...ices/metrics/dashboard/gitlab_alert_embed_service_spec.rb
+0
-6
ee/spec/services/projects/operations/update_service_spec.rb
ee/spec/services/projects/operations/update_service_spec.rb
+0
-8
No files found.
ee/spec/controllers/projects/prometheus/alerts_controller_spec.rb
View file @
c7222834
...
@@ -26,18 +26,6 @@ describe Projects::Prometheus::AlertsController do
...
@@ -26,18 +26,6 @@ describe Projects::Prometheus::AlertsController do
end
end
end
end
shared_examples
'unlicensed'
do
before
do
stub_licensed_features
(
prometheus_alerts:
false
)
end
it
'returns not_found'
do
make_request
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
end
end
shared_examples
'project non-specific environment'
do
|
status
|
shared_examples
'project non-specific environment'
do
|
status
|
let
(
:other
)
{
create
(
:environment
)
}
let
(
:other
)
{
create
(
:environment
)
}
...
@@ -118,7 +106,6 @@ describe Projects::Prometheus::AlertsController do
...
@@ -118,7 +106,6 @@ describe Projects::Prometheus::AlertsController do
end
end
it_behaves_like
'unprivileged'
it_behaves_like
'unprivileged'
it_behaves_like
'unlicensed'
it_behaves_like
'project non-specific environment'
,
:ok
it_behaves_like
'project non-specific environment'
,
:ok
end
end
...
@@ -166,7 +153,6 @@ describe Projects::Prometheus::AlertsController do
...
@@ -166,7 +153,6 @@ describe Projects::Prometheus::AlertsController do
end
end
it_behaves_like
'unprivileged'
it_behaves_like
'unprivileged'
it_behaves_like
'unlicensed'
it_behaves_like
'project non-specific environment'
,
:not_found
it_behaves_like
'project non-specific environment'
,
:not_found
it_behaves_like
'project non-specific metric'
,
:not_found
it_behaves_like
'project non-specific metric'
,
:not_found
end
end
...
@@ -269,7 +255,6 @@ describe Projects::Prometheus::AlertsController do
...
@@ -269,7 +255,6 @@ describe Projects::Prometheus::AlertsController do
end
end
it_behaves_like
'unprivileged'
it_behaves_like
'unprivileged'
it_behaves_like
'unlicensed'
it_behaves_like
'project non-specific environment'
,
:no_content
it_behaves_like
'project non-specific environment'
,
:no_content
end
end
...
@@ -318,7 +303,6 @@ describe Projects::Prometheus::AlertsController do
...
@@ -318,7 +303,6 @@ describe Projects::Prometheus::AlertsController do
end
end
it_behaves_like
'unprivileged'
it_behaves_like
'unprivileged'
it_behaves_like
'unlicensed'
it_behaves_like
'project non-specific environment'
,
:not_found
it_behaves_like
'project non-specific environment'
,
:not_found
it_behaves_like
'project non-specific metric'
,
:not_found
it_behaves_like
'project non-specific metric'
,
:not_found
end
end
...
@@ -350,7 +334,6 @@ describe Projects::Prometheus::AlertsController do
...
@@ -350,7 +334,6 @@ describe Projects::Prometheus::AlertsController do
end
end
it_behaves_like
'unprivileged'
it_behaves_like
'unprivileged'
it_behaves_like
'unlicensed'
it_behaves_like
'project non-specific environment'
,
:not_found
it_behaves_like
'project non-specific environment'
,
:not_found
it_behaves_like
'project non-specific metric'
,
:not_found
it_behaves_like
'project non-specific metric'
,
:not_found
end
end
...
...
ee/spec/services/metrics/dashboard/gitlab_alert_embed_service_spec.rb
View file @
c7222834
...
@@ -68,13 +68,7 @@ describe Metrics::Dashboard::GitlabAlertEmbedService do
...
@@ -68,13 +68,7 @@ describe Metrics::Dashboard::GitlabAlertEmbedService do
let
(
:service_call
)
{
described_class
.
new
(
*
service_params
).
get_dashboard
}
let
(
:service_call
)
{
described_class
.
new
(
*
service_params
).
get_dashboard
}
it_behaves_like
'misconfigured dashboard service response'
,
:unauthorized
context
'when alerting is available'
do
context
'when alerting is available'
do
before
do
stub_licensed_features
(
prometheus_alerts:
true
)
end
it_behaves_like
'valid embedded dashboard service response'
it_behaves_like
'valid embedded dashboard service response'
it_behaves_like
'raises error for users with insufficient permissions'
it_behaves_like
'raises error for users with insufficient permissions'
...
...
ee/spec/services/projects/operations/update_service_spec.rb
View file @
c7222834
...
@@ -163,14 +163,6 @@ describe Projects::Operations::UpdateService do
...
@@ -163,14 +163,6 @@ describe Projects::Operations::UpdateService do
context
'without an existing setting'
do
context
'without an existing setting'
do
it_behaves_like
'setting creation'
it_behaves_like
'setting creation'
context
'without license'
do
before
do
stub_licensed_features
(
prometheus_alerts:
false
)
end
it_behaves_like
'no operation'
end
context
'with insufficient permissions'
do
context
'with insufficient permissions'
do
before
do
before
do
project
.
add_reporter
(
user
)
project
.
add_reporter
(
user
)
...
...
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