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
01226c75
Commit
01226c75
authored
Jan 13, 2020
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
90184b64
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
3 deletions
+38
-3
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
spec/models/container_expiration_policy_spec.rb
spec/models/container_expiration_policy_spec.rb
+1
-2
No files found.
qa/qa/specs/helpers/quarantine.rb
View file @
01226c75
...
...
@@ -43,7 +43,23 @@ module QA::Specs::Helpers
# 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
)
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
...
...
qa/spec/specs/helpers/quarantine_spec.rb
View file @
01226c75
...
...
@@ -155,6 +155,26 @@ describe QA::Specs::Helpers::Quarantine do
expect
(
group
.
examples
.
first
.
execution_result
.
status
).
to
eq
(
:passed
)
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
context
'with :quarantine focused'
do
...
...
spec/models/container_expiration_policy_spec.rb
View file @
01226c75
...
...
@@ -43,8 +43,7 @@ RSpec.describe ContainerExpirationPolicy, type: :model do
subject
{
described_class
.
preloaded
}
before
do
# container_expiration_policies are created for every new project
create_list
(
:project
,
3
)
create_list
(
:container_expiration_policy
,
3
)
end
it
'preloads the associations'
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