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
1cc4f3f2
Commit
1cc4f3f2
authored
Mar 04, 2020
by
Doug Stull
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken usage data test
- need to time travel due to time period constraint in test
parent
11cfef67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
ee/spec/lib/ee/gitlab/usage_data_spec.rb
ee/spec/lib/ee/gitlab/usage_data_spec.rb
+13
-6
No files found.
ee/spec/lib/ee/gitlab/usage_data_spec.rb
View file @
1cc4f3f2
...
...
@@ -345,11 +345,16 @@ describe Gitlab::UsageData do
context
'for secure'
do
let_it_be
(
:user
)
{
create
(
:user
,
group_view: :security_dashboard
)
}
let_it_be
(
:ci_build_container_scanning
)
{
create
(
:ci_build
,
name:
'container_scanning'
,
user:
user
)
}
let_it_be
(
:ci_build_dast
)
{
create
(
:ci_build
,
name:
'dast'
,
user:
user
)
}
let_it_be
(
:ci_build_dependency_scanning
)
{
create
(
:ci_build
,
name:
'dependency_scanning'
,
user:
user
)
}
let_it_be
(
:ci_build_license_management
)
{
create
(
:ci_build
,
name:
'license_management'
,
user:
user
)
}
let_it_be
(
:ci_build_sast
)
{
create
(
:ci_build
,
name:
'sast'
,
user:
user
)
}
before
do
Timecop
.
travel
2
.
days
.
ago
do
create
(
:ci_build
,
name:
'container_scanning'
,
user:
user
)
create
(
:ci_build
,
name:
'dast'
,
user:
user
)
create
(
:ci_build
,
name:
'dependency_scanning'
,
user:
user
)
create
(
:ci_build
,
name:
'license_management'
,
user:
user
)
create
(
:ci_build
,
name:
'sast'
,
user:
user
)
end
end
it
'includes accurate usage_activity_by_stage data'
do
expect
(
described_class
.
uncached_data
[
:usage_activity_by_stage_monthly
][
:secure
]).
to
eq
(
...
...
@@ -363,7 +368,9 @@ describe Gitlab::UsageData do
end
it
'combines license_scanning into license_management'
do
create
(
:ci_build
,
name:
'license_scanning'
,
user:
user
)
Timecop
.
travel
2
.
days
.
ago
do
create
(
:ci_build
,
name:
'license_scanning'
,
user:
user
)
end
expect
(
described_class
.
uncached_data
[
:usage_activity_by_stage_monthly
][
:secure
]).
to
eq
(
user_preferences_group_overview_security_dashboard:
1
,
...
...
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