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
4ca8fc6e
Commit
4ca8fc6e
authored
Apr 19, 2019
by
syasonik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assert ee module has been included
parent
690a8291
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
ee/spec/lib/ee/gitlab/metrics_dashboard/processor_spec.rb
ee/spec/lib/ee/gitlab/metrics_dashboard/processor_spec.rb
+10
-3
No files found.
ee/spec/lib/ee/gitlab/metrics_dashboard/processor_spec.rb
View file @
4ca8fc6e
...
...
@@ -7,6 +7,16 @@ describe Gitlab::MetricsDashboard::Processor do
let
(
:environment
)
{
alert
.
environment
}
let
(
:dashboard_yml
)
{
YAML
.
load_file
(
'spec/fixtures/lib/gitlab/metrics_dashboard/sample_dashboard.yml'
)
}
describe
'stages'
do
let
(
:environment
)
{
build
(
:environment
)
}
let
(
:process_params
)
{
[
dashboard_yml
,
project
,
environment
]
}
let
(
:stages
)
{
described_class
.
new
(
*
process_params
).
stages
}
it
'should include the alerts processing stage'
do
expect
(
stages
.
length
).
to
eq
(
4
)
end
end
describe
'process'
do
let
(
:process_params
)
{
[
dashboard_yml
,
project
,
environment
]
}
let
(
:dashboard
)
{
described_class
.
new
(
*
process_params
).
process
}
...
...
@@ -18,9 +28,6 @@ describe Gitlab::MetricsDashboard::Processor do
it
'includes an alert path'
do
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
include
(
:alert_path
)
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