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
217bf817
Commit
217bf817
authored
Sep 16, 2020
by
drew cimino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Speed up finder spec with let_it_be for target records
parent
74853a42
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
16 deletions
+15
-16
ee/spec/finders/ci/daily_build_group_report_results_by_group_finder_spec.rb
.../daily_build_group_report_results_by_group_finder_spec.rb
+15
-16
No files found.
ee/spec/finders/ci/daily_build_group_report_results_by_group_finder_spec.rb
View file @
217bf817
...
@@ -4,26 +4,25 @@ require 'spec_helper'
...
@@ -4,26 +4,25 @@ require 'spec_helper'
RSpec
.
describe
Ci
::
DailyBuildGroupReportResultsByGroupFinder
do
RSpec
.
describe
Ci
::
DailyBuildGroupReportResultsByGroupFinder
do
describe
'#execute'
do
describe
'#execute'
do
let
!
(
:user
)
{
create
(
:user
)
}
let
_it_be
(
:user
)
{
create
(
:user
)
}
let
!
(
:project
)
{
create
(
:project
,
:private
)
}
let
_it_be
(
:project
)
{
create
(
:project
,
:private
)
}
let
!
(
:project_coverage
)
{
create_daily_coverage
(
'rspec'
,
95.0
,
'2020-03-10'
,
project
)
}
let
_it_be
(
:project_coverage
)
{
create_daily_coverage
(
'rspec'
,
95.0
,
'2020-03-10'
,
project
)
}
let
!
(
:group
)
{
create
(
:group
,
:private
)
}
let
_it_be
(
:group
)
{
create
(
:group
,
:private
)
}
let
!
(
:rspec_project
)
{
create
(
:project
,
namespace:
group
)
}
let
_it_be
(
:rspec_project
)
{
create
(
:project
,
namespace:
group
)
}
let
!
(
:rspec_project_coverage
)
{
create_daily_coverage
(
'rspec'
,
79.0
,
'2020-03-09'
,
rspec_project
)
}
let
_it_be
(
:rspec_project_coverage
)
{
create_daily_coverage
(
'rspec'
,
79.0
,
'2020-03-09'
,
rspec_project
)
}
let
!
(
:karma_project
)
{
create
(
:project
,
namespace:
group
)
}
let
_it_be
(
:karma_project
)
{
create
(
:project
,
namespace:
group
)
}
let
!
(
:karma_project_coverage
)
{
create_daily_coverage
(
'karma'
,
89.0
,
'2020-03-09'
,
karma_project
)
}
let
_it_be
(
:karma_project_coverage
)
{
create_daily_coverage
(
'karma'
,
89.0
,
'2020-03-09'
,
karma_project
)
}
let
(
:generic_project
)
{
create
(
:project
,
namespace:
group
)
}
let
_it_be
(
:generic_project
)
{
create
(
:project
,
namespace:
group
)
}
let
!
(
:generic_coverage
)
{
create_daily_coverage
(
'unreported'
,
95.0
,
'2020-03-10'
,
generic_project
)
}
let
_it_be
(
:generic_coverage
)
{
create_daily_coverage
(
'unreported'
,
95.0
,
'2020-03-10'
,
generic_project
)
}
let
(
:subgroup
)
{
create
(
:group
,
:private
,
parent:
group
)
}
let
_it_be
(
:subgroup
)
{
create
(
:group
,
:private
,
parent:
group
)
}
let
(
:subgroup_project
)
{
create
(
:project
,
namespace:
subgroup
)
}
let
_it_be
(
:subgroup_project
)
{
create
(
:project
,
namespace:
subgroup
)
}
let
!
(
:subgroup_project_coverage
)
{
create_daily_coverage
(
'rspec'
,
89.0
,
'2020-03-09'
,
subgroup_project
)
}
let
_it_be
(
:subgroup_project_coverage
)
{
create_daily_coverage
(
'rspec'
,
89.0
,
'2020-03-09'
,
subgroup_project
)
}
let
(
:ref_path
)
{
'refs/heads/master'
}
let
(
:limit
)
{
nil
}
let
(
:limit
)
{
nil
}
let
(
:project_ids
)
{
nil
}
let
(
:project_ids
)
{
nil
}
...
@@ -32,7 +31,7 @@ RSpec.describe Ci::DailyBuildGroupReportResultsByGroupFinder do
...
@@ -32,7 +31,7 @@ RSpec.describe Ci::DailyBuildGroupReportResultsByGroupFinder do
current_user:
user
,
current_user:
user
,
group:
group
,
group:
group
,
project_ids:
project_ids
,
project_ids:
project_ids
,
ref_path:
ref_path
,
ref_path:
'refs/heads/master'
,
start_date:
'2020-03-09'
,
start_date:
'2020-03-09'
,
end_date:
'2020-03-10'
,
end_date:
'2020-03-10'
,
limit:
limit
limit:
limit
...
@@ -126,7 +125,7 @@ RSpec.describe Ci::DailyBuildGroupReportResultsByGroupFinder do
...
@@ -126,7 +125,7 @@ RSpec.describe Ci::DailyBuildGroupReportResultsByGroupFinder do
create
(
create
(
:ci_daily_build_group_report_result
,
:ci_daily_build_group_report_result
,
project:
project
,
project:
project
,
ref_path:
ref_path
,
ref_path:
'refs/heads/master'
,
group_name:
group_name
,
group_name:
group_name
,
data:
{
'coverage'
=>
coverage
},
data:
{
'coverage'
=>
coverage
},
date:
date
date:
date
...
...
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