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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
520fcaab
Commit
520fcaab
authored
Aug 03, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to pass --tag to bin/qa run
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
02e9a8f9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
5 deletions
+24
-5
qa/qa/scenario/template.rb
qa/qa/scenario/template.rb
+6
-2
qa/qa/scenario/test/instance.rb
qa/qa/scenario/test/instance.rb
+6
-1
qa/spec/runtime/env_spec.rb
qa/spec/runtime/env_spec.rb
+4
-0
qa/spec/scenario/test/instance/all_spec.rb
qa/spec/scenario/test/instance/all_spec.rb
+7
-1
qa/spec/scenario/test/instance/smoke_spec.rb
qa/spec/scenario/test/instance/smoke_spec.rb
+1
-1
No files found.
qa/qa/scenario/template.rb
View file @
520fcaab
...
@@ -21,14 +21,18 @@ module QA
...
@@ -21,14 +21,18 @@ module QA
def
perform
(
address
,
*
rspec_options
)
def
perform
(
address
,
*
rspec_options
)
Runtime
::
Scenario
.
define
(
:gitlab_address
,
address
)
Runtime
::
Scenario
.
define
(
:gitlab_address
,
address
)
##
# Perform before hooks, which are different for CE and EE
#
Runtime
::
Release
.
perform_before_hooks
Specs
::
Runner
.
perform
do
|
specs
|
Specs
::
Runner
.
perform
do
|
specs
|
specs
.
tty
=
true
specs
.
tty
=
true
specs
.
tags
=
self
.
class
.
focus
specs
.
options
=
specs
.
options
=
if
rspec_options
.
any?
if
rspec_options
.
any?
rspec_options
rspec_options
else
else
::
File
.
expand_path
(
'../specs/features'
,
__dir__
)
[
'--tag'
,
self
.
class
.
focus
.
join
(
','
),
'--'
,
::
File
.
expand_path
(
'../specs/features'
,
__dir__
)]
end
end
end
end
end
end
...
...
qa/qa/scenario/test/instance.rb
View file @
520fcaab
...
@@ -20,13 +20,18 @@ module QA
...
@@ -20,13 +20,18 @@ module QA
def
self
.
do_perform
(
address
,
*
rspec_options
)
def
self
.
do_perform
(
address
,
*
rspec_options
)
Runtime
::
Scenario
.
define
(
:gitlab_address
,
address
)
Runtime
::
Scenario
.
define
(
:gitlab_address
,
address
)
##
# Perform before hooks, which are different for CE and EE
#
Runtime
::
Release
.
perform_before_hooks
Specs
::
Runner
.
perform
do
|
specs
|
Specs
::
Runner
.
perform
do
|
specs
|
specs
.
tty
=
true
specs
.
tty
=
true
specs
.
options
=
specs
.
options
=
if
rspec_options
.
any?
if
rspec_options
.
any?
rspec_options
rspec_options
else
else
::
File
.
expand_path
(
'../../specs/features'
,
__dir__
)
[
'--tag'
,
self
.
class
.
focus
.
join
(
','
),
'--'
,
::
File
.
expand_path
(
'../../specs/features'
,
__dir__
)]
end
end
end
end
end
end
...
...
qa/spec/runtime/env_spec.rb
View file @
520fcaab
...
@@ -104,6 +104,8 @@ describe QA::Runtime::Env do
...
@@ -104,6 +104,8 @@ describe QA::Runtime::Env do
describe
'.github_access_token'
do
describe
'.github_access_token'
do
it
'returns "" if GITHUB_ACCESS_TOKEN is not defined'
do
it
'returns "" if GITHUB_ACCESS_TOKEN is not defined'
do
stub_env
(
'GITHUB_ACCESS_TOKEN'
,
nil
)
expect
(
described_class
.
github_access_token
).
to
eq
(
''
)
expect
(
described_class
.
github_access_token
).
to
eq
(
''
)
end
end
...
@@ -115,6 +117,8 @@ describe QA::Runtime::Env do
...
@@ -115,6 +117,8 @@ describe QA::Runtime::Env do
describe
'.require_github_access_token!'
do
describe
'.require_github_access_token!'
do
it
'raises ArgumentError if GITHUB_ACCESS_TOKEN is not defined'
do
it
'raises ArgumentError if GITHUB_ACCESS_TOKEN is not defined'
do
stub_env
(
'GITHUB_ACCESS_TOKEN'
,
nil
)
expect
{
described_class
.
require_github_access_token!
}.
to
raise_error
(
ArgumentError
)
expect
{
described_class
.
require_github_access_token!
}.
to
raise_error
(
ArgumentError
)
end
end
...
...
qa/spec/scenario/test/instance/all_spec.rb
View file @
520fcaab
describe
QA
::
Scenario
::
Test
::
Instance
::
All
do
describe
QA
::
Scenario
::
Test
::
Instance
::
All
do
subject
do
Class
.
new
(
described_class
)
do
tags
:rspec
,
:foo
end
end
context
'#perform'
do
context
'#perform'
do
let
(
:arguments
)
{
spy
(
'Runtime::Scenario'
)
}
let
(
:arguments
)
{
spy
(
'Runtime::Scenario'
)
}
let
(
:release
)
{
spy
(
'Runtime::Release'
)
}
let
(
:release
)
{
spy
(
'Runtime::Release'
)
}
...
@@ -24,7 +30,7 @@ describe QA::Scenario::Test::Instance::All do
...
@@ -24,7 +30,7 @@ describe QA::Scenario::Test::Instance::All do
subject
.
perform
(
"test"
)
subject
.
perform
(
"test"
)
expect
(
runner
).
to
have_received
(
:options
=
)
expect
(
runner
).
to
have_received
(
:options
=
)
.
with
(
::
File
.
expand_path
(
'../../../../qa/specs/features'
,
__dir__
)
)
.
with
(
[
'--tag'
,
'rspec,foo'
,
'--'
,
::
File
.
expand_path
(
'../../../../qa/specs/features'
,
__dir__
)]
)
end
end
end
end
...
...
qa/spec/scenario/test/instance/smoke_spec.rb
View file @
520fcaab
...
@@ -30,7 +30,7 @@ describe QA::Scenario::Test::Instance::Smoke do
...
@@ -30,7 +30,7 @@ describe QA::Scenario::Test::Instance::Smoke do
subject
.
perform
(
"test"
)
subject
.
perform
(
"test"
)
expect
(
runner
).
to
have_received
(
:options
=
)
expect
(
runner
).
to
have_received
(
:options
=
)
.
with
(
::
File
.
expand_path
(
'../../../../qa/specs/features'
,
__dir__
)
)
.
with
(
[
'--tag'
,
'smoke'
,
'--'
,
::
File
.
expand_path
(
'../../../../qa/specs/features'
,
__dir__
)]
)
end
end
end
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