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
8f32caab
Commit
8f32caab
authored
Jun 02, 2020
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tooling/ to the unit test level
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
1b3d3066
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
lib/quality/test_level.rb
lib/quality/test_level.rb
+1
-0
spec/lib/quality/test_level_spec.rb
spec/lib/quality/test_level_spec.rb
+6
-2
No files found.
lib/quality/test_level.rb
View file @
8f32caab
...
...
@@ -44,6 +44,7 @@ module Quality
views
workers
elastic_integration
tooling
]
,
integration:
%w[
controllers
...
...
spec/lib/quality/test_level_spec.rb
View file @
8f32caab
...
...
@@ -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,channels,config,db,dependencies,factories,finders,frontend,graphql,haml_lint,helpers,initializers,javascripts,lib,models,policies,presenters,rack_servers,replicators,routing,rubocop,serializers,services,sidekiq,support_specs,tasks,uploaders,validators,views,workers,elastic_integration}{,/**/}*_spec.rb"
)
.
to
eq
(
"spec/{bin,channels,config,db,dependencies,factories,finders,frontend,graphql,haml_lint,helpers,initializers,javascripts,lib,models,policies,presenters,rack_servers,replicators,routing,rubocop,serializers,services,sidekiq,support_specs,tasks,uploaders,validators,views,workers,elastic_integration
,tooling
}{,/**/}*_spec.rb"
)
end
end
...
...
@@ -89,7 +89,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|channels|config|db|dependencies|factories|finders|frontend|graphql|haml_lint|helpers|initializers|javascripts|lib|models|policies|presenters|rack_servers|replicators|routing|rubocop|serializers|services|sidekiq|support_specs|tasks|uploaders|validators|views|workers|elastic_integration)}
)
.
to
eq
(
%r{spec/(bin|channels|config|db|dependencies|factories|finders|frontend|graphql|haml_lint|helpers|initializers|javascripts|lib|models|policies|presenters|rack_servers|replicators|routing|rubocop|serializers|services|sidekiq|support_specs|tasks|uploaders|validators|views|workers|elastic_integration
|tooling
)}
)
end
end
...
...
@@ -144,6 +144,10 @@ RSpec.describe Quality::TestLevel do
expect
(
subject
.
level_for
(
'spec/models/abuse_report_spec.rb'
)).
to
eq
(
:unit
)
end
it
'returns the correct level for a tooling test'
do
expect
(
subject
.
level_for
(
'spec/tooling/lib/tooling/test_file_finder_spec.rb'
)).
to
eq
(
:unit
)
end
it
'returns the correct level for a migration test'
do
expect
(
subject
.
level_for
(
'spec/migrations/add_default_and_free_plans_spec.rb'
)).
to
eq
(
:migration
)
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