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
40d3c588
Commit
40d3c588
authored
Nov 09, 2021
by
Desiree Chevalier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate testcase cop execution
parent
2c206a8a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
7 deletions
+13
-7
.gitlab/ci/static-analysis.gitlab-ci.yml
.gitlab/ci/static-analysis.gitlab-ci.yml
+8
-0
.rubocop.yml
.rubocop.yml
+4
-0
qa/qa/specs/features/ee/browser_ui/10_protect/policies_list_spec.rb
...s/features/ee/browser_ui/10_protect/policies_list_spec.rb
+1
-1
rubocop/cop/qa/duplicate_testcase_link.rb
rubocop/cop/qa/duplicate_testcase_link.rb
+0
-6
No files found.
.gitlab/ci/static-analysis.gitlab-ci.yml
View file @
40d3c588
...
@@ -93,6 +93,14 @@ rubocop:
...
@@ -93,6 +93,14 @@ rubocop:
script
:
script
:
-
run_timed_command "bundle exec rubocop --parallel"
-
run_timed_command "bundle exec rubocop --parallel"
qa:testcases:
extends
:
-
.static-analysis-base
-
.rubocop-job-cache
-
.static-analysis:rules:ee-and-foss
script
:
-
run_timed_command "bundle exec rubocop qa/qa/specs/features/**/* --only QA/DuplicateTestcaseLink"
feature-flags-usage
:
feature-flags-usage
:
extends
:
extends
:
-
.static-analysis-base
-
.static-analysis-base
...
...
.rubocop.yml
View file @
40d3c588
...
@@ -734,6 +734,10 @@ QA/SelectorUsage:
...
@@ -734,6 +734,10 @@ QA/SelectorUsage:
Exclude
:
Exclude
:
-
'
spec/rubocop/**/*_spec.rb'
-
'
spec/rubocop/**/*_spec.rb'
QA/DuplicateTestcaseLink
:
# this cop is executed in static-analysis.gitlab-ci.yml since it cannot be run in parallel
Enabled
:
false
Performance/ActiveRecordSubtransactions
:
Performance/ActiveRecordSubtransactions
:
Exclude
:
Exclude
:
-
'
spec/**/*.rb'
-
'
spec/**/*.rb'
...
...
qa/qa/specs/features/ee/browser_ui/10_protect/policies_list_spec.rb
View file @
40d3c588
...
@@ -23,7 +23,7 @@ module QA
...
@@ -23,7 +23,7 @@ module QA
project
.
visit!
project
.
visit!
end
end
it
'can load Policies page and view the policies list'
,
:smoke
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/
189
2'
do
it
'can load Policies page and view the policies list'
,
:smoke
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/
238
2'
do
Page
::
Project
::
Menu
.
perform
(
&
:click_on_policies
)
Page
::
Project
::
Menu
.
perform
(
&
:click_on_policies
)
EE
::
Page
::
Project
::
Policies
::
Index
.
perform
do
|
policies_page
|
EE
::
Page
::
Project
::
Policies
::
Index
.
perform
do
|
policies_page
|
...
...
rubocop/cop/qa/duplicate_testcase_link.rb
View file @
40d3c588
# frozen_string_literal: true
# frozen_string_literal: true
require_relative
'../../qa_helpers'
module
RuboCop
module
RuboCop
module
Cop
module
Cop
module
QA
module
QA
...
@@ -17,8 +15,6 @@ module RuboCop
...
@@ -17,8 +15,6 @@ module RuboCop
# it 'some test', testcase: '(...)/quality/test_cases/1892'
# it 'some test', testcase: '(...)/quality/test_cases/1892'
# it 'another test, testcase: '(...)/quality/test_cases/1894'
# it 'another test, testcase: '(...)/quality/test_cases/1894'
class
DuplicateTestcaseLink
<
RuboCop
::
Cop
::
Cop
class
DuplicateTestcaseLink
<
RuboCop
::
Cop
::
Cop
include
QAHelpers
MESSAGE
=
"Don't reuse the same testcase link in different tests. Replace one of `%s`."
MESSAGE
=
"Don't reuse the same testcase link in different tests. Replace one of `%s`."
@testcase_set
=
Set
.
new
@testcase_set
=
Set
.
new
...
@@ -34,8 +30,6 @@ module RuboCop
...
@@ -34,8 +30,6 @@ module RuboCop
PATTERN
PATTERN
def
on_block
(
node
)
def
on_block
(
node
)
return
unless
in_qa_file?
(
node
)
duplicate_testcase_link
(
node
)
do
|
link
|
duplicate_testcase_link
(
node
)
do
|
link
|
break
unless
self
.
class
.
duplicate?
(
link
)
break
unless
self
.
class
.
duplicate?
(
link
)
...
...
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