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
5dce3398
Commit
5dce3398
authored
Nov 10, 2021
by
Nailia Iskhakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Account for Staging Ref in E2E context selector
Signed-off-by:
Nailia Iskhakova
<
niskhakova@gitlab.com
>
parent
4c210dec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
qa/qa/specs/helpers/context_selector.rb
qa/qa/specs/helpers/context_selector.rb
+2
-2
qa/spec/specs/helpers/context_selector_spec.rb
qa/spec/specs/helpers/context_selector_spec.rb
+18
-0
No files found.
qa/qa/specs/helpers/context_selector.rb
View file @
5dce3398
...
...
@@ -45,11 +45,11 @@ module QA
opts
[
:subdomain
]
=
case
option
[
:subdomain
]
when
Array
"(
#{
option
[
:subdomain
].
join
(
"|"
)
}
)."
"(
#{
option
[
:subdomain
].
join
(
"|"
)
}
)
\\
."
when
Regexp
option
[
:subdomain
]
else
"(
#{
option
[
:subdomain
]
}
)."
"(
#{
option
[
:subdomain
]
}
)
\\
."
end
end
end
...
...
qa/spec/specs/helpers/context_selector_spec.rb
View file @
5dce3398
...
...
@@ -186,6 +186,24 @@ RSpec.describe QA::Specs::Helpers::ContextSelector do
end
end
context
'staging-ref'
do
before
do
QA
::
Runtime
::
Scenario
.
define
(
:gitlab_address
,
'https://staging-ref.gitlab.com/'
)
end
it
'runs on staging-ref'
do
group
=
describe_successfully
do
it
(
'does not run in staging'
,
only:
{
subdomain: :staging
})
{}
it
(
'runs in staging-ref'
,
only:
{
subdomain:
/^staging-ref./
})
{}
end
aggregate_failures
do
expect
(
group
.
examples
[
0
].
execution_result
.
status
).
to
eq
(
:pending
)
expect
(
group
.
examples
[
1
].
execution_result
.
status
).
to
eq
(
:passed
)
end
end
end
context
'production'
do
before
do
QA
::
Runtime
::
Scenario
.
define
(
:gitlab_address
,
'https://gitlab.com/'
)
...
...
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