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
ce77ede5
Commit
ce77ede5
authored
Sep 05, 2018
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix alert EE specs
parent
daf772c2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
ee/spec/factories/prometheus_alert.rb
ee/spec/factories/prometheus_alert.rb
+8
-2
ee/spec/services/projects/prometheus/metrics/destroy_service_spec.rb
...vices/projects/prometheus/metrics/destroy_service_spec.rb
+1
-1
ee/spec/services/projects/prometheus/metrics/update_service_spec.rb
...rvices/projects/prometheus/metrics/update_service_spec.rb
+1
-1
No files found.
ee/spec/factories/prometheus_alert.rb
View file @
ce77ede5
FactoryBot
.
define
do
factory
:prometheus_alert
do
project
environment
prometheus_metric
operator
:gt
threshold
1
environment
do
|
alert
|
build
(
:environment
,
project:
alert
.
project
)
end
prometheus_metric
do
|
alert
|
build
(
:prometheus_metric
,
project:
alert
.
project
)
end
end
end
ee/spec/services/projects/prometheus/metrics/destroy_service_spec.rb
View file @
ce77ede5
...
...
@@ -13,7 +13,7 @@ describe Projects::Prometheus::Metrics::DestroyService do
context
'when metric has a prometheus alert associated'
do
it
'schedules a prometheus alert update'
do
create
(
:prometheus_alert
,
prometheus_metric:
metric
)
create
(
:prometheus_alert
,
pro
ject:
metric
.
project
,
pro
metheus_metric:
metric
)
schedule_update_service
=
spy
allow
(
::
Clusters
::
Applications
::
ScheduleUpdateService
).
to
receive
(
:new
).
and_return
(
schedule_update_service
)
...
...
ee/spec/services/projects/prometheus/metrics/update_service_spec.rb
View file @
ce77ede5
...
...
@@ -13,7 +13,7 @@ describe Projects::Prometheus::Metrics::UpdateService do
let
(
:schedule_update_service
)
{
spy
}
before
do
create
(
:prometheus_alert
,
prometheus_metric:
metric
)
create
(
:prometheus_alert
,
pro
ject:
metric
.
project
,
pro
metheus_metric:
metric
)
allow
(
::
Clusters
::
Applications
::
ScheduleUpdateService
).
to
receive
(
:new
).
and_return
(
schedule_update_service
)
end
...
...
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