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
cb5ae9a8
Commit
cb5ae9a8
authored
Jan 12, 2020
by
Dan Davison
Committed by
Mark Lapierre
Jan 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add quarantine tag message
Add spec for adding a message to quarantined tests
parent
ee46dd70
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
1 deletion
+37
-1
qa/qa/specs/helpers/quarantine.rb
qa/qa/specs/helpers/quarantine.rb
+17
-1
qa/spec/specs/helpers/quarantine_spec.rb
qa/spec/specs/helpers/quarantine_spec.rb
+20
-0
No files found.
qa/qa/specs/helpers/quarantine.rb
View file @
cb5ae9a8
...
@@ -43,7 +43,23 @@ module QA::Specs::Helpers
...
@@ -43,7 +43,23 @@ module QA::Specs::Helpers
# the quarantined tests when they're not run so that we're aware of them
# the quarantined tests when they're not run so that we're aware of them
skip
(
"Only running tests tagged with :quarantine and any of
#{
included_filters
.
keys
}
"
)
if
should_skip_when_focused?
(
example
.
metadata
,
included_filters
)
skip
(
"Only running tests tagged with :quarantine and any of
#{
included_filters
.
keys
}
"
)
if
should_skip_when_focused?
(
example
.
metadata
,
included_filters
)
else
else
skip
(
'In quarantine'
)
if
example
.
metadata
.
key?
(
:quarantine
)
if
example
.
metadata
.
key?
(
:quarantine
)
quarantine_message
=
%w(In quarantine)
quarantine_tag
=
example
.
metadata
[
:quarantine
]
if
!!
quarantine_tag
quarantine_message
<<
case
quarantine_tag
when
String
":
#{
quarantine_tag
}
"
when
Hash
":
#{
quarantine_tag
[
:issue
]
}
"
else
''
end
end
skip
(
quarantine_message
.
join
(
' '
).
strip
)
end
end
end
end
end
...
...
qa/spec/specs/helpers/quarantine_spec.rb
View file @
cb5ae9a8
...
@@ -155,6 +155,26 @@ describe QA::Specs::Helpers::Quarantine do
...
@@ -155,6 +155,26 @@ describe QA::Specs::Helpers::Quarantine do
expect
(
group
.
examples
.
first
.
execution_result
.
status
).
to
eq
(
:passed
)
expect
(
group
.
examples
.
first
.
execution_result
.
status
).
to
eq
(
:passed
)
end
end
context
'quarantine message'
do
shared_examples
'test with quarantine message'
do
|
quarantine_tag
|
it
'outputs the quarantine message'
do
group
=
describe_successfully
do
it
(
'is quarantined'
,
quarantine:
quarantine_tag
)
{}
end
expect
(
group
.
examples
.
first
.
execution_result
.
pending_message
)
.
to
eq
(
'In quarantine : for a reason'
)
end
end
it_behaves_like
'test with quarantine message'
,
'for a reason'
it_behaves_like
'test with quarantine message'
,
{
issue:
'for a reason'
,
environment:
[
:nightly
,
:staging
]
}
end
end
end
context
'with :quarantine focused'
do
context
'with :quarantine focused'
do
...
...
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