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
07a6697c
Commit
07a6697c
authored
Dec 17, 2019
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't include migrations files in the unit test level pattern
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
97b65561
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
lib/quality/test_level.rb
lib/quality/test_level.rb
+4
-5
spec/lib/quality/test_level_spec.rb
spec/lib/quality/test_level_spec.rb
+2
-2
No files found.
lib/quality/test_level.rb
View file @
07a6697c
...
...
@@ -5,6 +5,10 @@ module Quality
UnknownTestLevelError
=
Class
.
new
(
StandardError
)
TEST_LEVEL_FOLDERS
=
{
migration:
%w[
migrations
lib/gitlab/background_migration
]
,
unit:
%w[
bin
config
...
...
@@ -19,7 +23,6 @@ module Quality
initializers
javascripts
lib
migrations
models
policies
presenters
...
...
@@ -36,10 +39,6 @@ module Quality
workers
elastic_integration
]
,
migration:
%w[
migrations
lib/gitlab/background_migration
]
,
integration:
%w[
controllers
mailers
...
...
spec/lib/quality/test_level_spec.rb
View file @
07a6697c
...
...
@@ -21,7 +21,7 @@ RSpec.describe Quality::TestLevel do
context
'when level is unit'
do
it
'returns a pattern'
do
expect
(
subject
.
pattern
(
:unit
))
.
to
eq
(
"spec/{bin,config,db,dependencies,factories,finders,frontend,graphql,haml_lint,helpers,initializers,javascripts,lib,m
igrations,m
odels,policies,presenters,rack_servers,routing,rubocop,serializers,services,sidekiq,tasks,uploaders,validators,views,workers,elastic_integration}{,/**/}*_spec.rb"
)
.
to
eq
(
"spec/{bin,config,db,dependencies,factories,finders,frontend,graphql,haml_lint,helpers,initializers,javascripts,lib,models,policies,presenters,rack_servers,routing,rubocop,serializers,services,sidekiq,tasks,uploaders,validators,views,workers,elastic_integration}{,/**/}*_spec.rb"
)
end
end
...
...
@@ -82,7 +82,7 @@ RSpec.describe Quality::TestLevel do
context
'when level is unit'
do
it
'returns a regexp'
do
expect
(
subject
.
regexp
(
:unit
))
.
to
eq
(
%r{spec/(bin|config|db|dependencies|factories|finders|frontend|graphql|haml_lint|helpers|initializers|javascripts|lib|m
igrations|m
odels|policies|presenters|rack_servers|routing|rubocop|serializers|services|sidekiq|tasks|uploaders|validators|views|workers|elastic_integration)}
)
.
to
eq
(
%r{spec/(bin|config|db|dependencies|factories|finders|frontend|graphql|haml_lint|helpers|initializers|javascripts|lib|models|policies|presenters|rack_servers|routing|rubocop|serializers|services|sidekiq|tasks|uploaders|validators|views|workers|elastic_integration)}
)
end
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