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
690a8291
Commit
690a8291
authored
Apr 19, 2019
by
syasonik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log extra data from alerts spec for debugging
parent
6883708c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
ee/spec/lib/ee/gitlab/metrics_dashboard/processor_spec.rb
ee/spec/lib/ee/gitlab/metrics_dashboard/processor_spec.rb
+4
-1
No files found.
ee/spec/lib/ee/gitlab/metrics_dashboard/processor_spec.rb
View file @
690a8291
...
@@ -12,12 +12,15 @@ describe Gitlab::MetricsDashboard::Processor do
...
@@ -12,12 +12,15 @@ describe Gitlab::MetricsDashboard::Processor do
let
(
:dashboard
)
{
described_class
.
new
(
*
process_params
).
process
}
let
(
:dashboard
)
{
described_class
.
new
(
*
process_params
).
process
}
context
'when the dashboard references persisted metrics with alerts'
do
context
'when the dashboard references persisted metrics with alerts'
do
let!
(
:alert
)
{
create
(
:prometheus_alert
,
project:
project
,
prometheus_metric:
persisted_metric
)
}
let!
(
:alert
)
{
create
(
:prometheus_alert
,
project:
project
,
prometheus_metric:
persisted_metric
)
}
shared_examples_for
'has saved alerts'
do
shared_examples_for
'has saved alerts'
do
it
'includes an alert path'
do
it
'includes an alert path'
do
target_metric
=
all_metrics
.
find
{
|
metric
|
metric
[
:metric_id
]
==
persisted_metric
.
id
}
target_metric
=
all_metrics
.
find
{
|
metric
|
metric
[
:metric_id
]
==
persisted_metric
.
id
}
p
PrometheusAlert
.
all
p
target_metric
expect
(
target_metric
).
to
be_a
Hash
expect
(
target_metric
).
to
be_a
Hash
expect
(
target_metric
).
to
include
(
:alert_path
)
expect
(
target_metric
).
to
include
(
:alert_path
)
expect
(
target_metric
[
:alert_path
]).
to
include
(
expect
(
target_metric
[
:alert_path
]).
to
include
(
...
...
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