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
66b844d0
Commit
66b844d0
authored
Mar 28, 2018
by
Brett Walker
Committed by
Grzegorz Bizon
Mar 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QA: allow rspec files/options to be handled more consistently
parent
21e33025
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
14 deletions
+14
-14
qa/qa/ee/scenario/test/geo.rb
qa/qa/ee/scenario/test/geo.rb
+2
-2
qa/qa/scenario/bootable.rb
qa/qa/scenario/bootable.rb
+1
-1
qa/qa/scenario/test/instance.rb
qa/qa/scenario/test/instance.rb
+4
-4
qa/qa/scenario/test/integration/mattermost.rb
qa/qa/scenario/test/integration/mattermost.rb
+2
-2
qa/qa/specs/runner.rb
qa/qa/specs/runner.rb
+3
-3
qa/spec/scenario/test/instance_spec.rb
qa/spec/scenario/test/instance_spec.rb
+2
-2
No files found.
qa/qa/ee/scenario/test/geo.rb
View file @
66b844d0
...
@@ -11,8 +11,8 @@ module QA
...
@@ -11,8 +11,8 @@ module QA
attribute
:geo_secondary_name
,
'--secondary-name SECONDARY_NAME'
attribute
:geo_secondary_name
,
'--secondary-name SECONDARY_NAME'
attribute
:geo_skip_setup?
,
'--without-setup'
attribute
:geo_skip_setup?
,
'--without-setup'
def
perform
(
**
arg
s
)
def
perform
(
options
,
*
file
s
)
unless
arg
s
[
:geo_skip_setup?
]
unless
option
s
[
:geo_skip_setup?
]
Geo
::
Primary
.
act
do
Geo
::
Primary
.
act
do
add_license
add_license
enable_hashed_storage
enable_hashed_storage
...
...
qa/qa/scenario/bootable.rb
View file @
66b844d0
...
@@ -23,7 +23,7 @@ module QA
...
@@ -23,7 +23,7 @@ module QA
arguments
.
parse!
(
argv
)
arguments
.
parse!
(
argv
)
self
.
perform
(
**
Runtime
::
Scenario
.
attributes
)
self
.
perform
(
Runtime
::
Scenario
.
attributes
,
*
arguments
.
default_argv
)
end
end
private
private
...
...
qa/qa/scenario/test/instance.rb
View file @
66b844d0
...
@@ -11,7 +11,7 @@ module QA
...
@@ -11,7 +11,7 @@ module QA
tags
:core
tags
:core
def
perform
(
address
,
*
file
s
)
def
perform
(
address
,
*
rspec_option
s
)
Runtime
::
Scenario
.
define
(
:gitlab_address
,
address
)
Runtime
::
Scenario
.
define
(
:gitlab_address
,
address
)
##
##
...
@@ -22,9 +22,9 @@ module QA
...
@@ -22,9 +22,9 @@ module QA
Specs
::
Runner
.
perform
do
|
specs
|
Specs
::
Runner
.
perform
do
|
specs
|
specs
.
tty
=
true
specs
.
tty
=
true
specs
.
tags
=
self
.
class
.
focus
specs
.
tags
=
self
.
class
.
focus
specs
.
file
s
=
specs
.
option
s
=
if
file
s
.
any?
if
rspec_option
s
.
any?
file
s
rspec_option
s
else
else
File
.
expand_path
(
'../../specs/features'
,
__dir__
)
File
.
expand_path
(
'../../specs/features'
,
__dir__
)
end
end
...
...
qa/qa/scenario/test/integration/mattermost.rb
View file @
66b844d0
...
@@ -9,10 +9,10 @@ module QA
...
@@ -9,10 +9,10 @@ module QA
class
Mattermost
<
Test
::
Instance
class
Mattermost
<
Test
::
Instance
tags
:core
,
:mattermost
tags
:core
,
:mattermost
def
perform
(
address
,
mattermost
,
*
file
s
)
def
perform
(
address
,
mattermost
,
*
rspec_option
s
)
Runtime
::
Scenario
.
define
(
:mattermost_address
,
mattermost
)
Runtime
::
Scenario
.
define
(
:mattermost_address
,
mattermost
)
super
(
address
,
*
file
s
)
super
(
address
,
*
rspec_option
s
)
end
end
end
end
end
end
...
...
qa/qa/specs/runner.rb
View file @
66b844d0
...
@@ -3,19 +3,19 @@ require 'rspec/core'
...
@@ -3,19 +3,19 @@ require 'rspec/core'
module
QA
module
QA
module
Specs
module
Specs
class
Runner
<
Scenario
::
Template
class
Runner
<
Scenario
::
Template
attr_accessor
:tty
,
:tags
,
:
file
s
attr_accessor
:tty
,
:tags
,
:
option
s
def
initialize
def
initialize
@tty
=
false
@tty
=
false
@tags
=
[]
@tags
=
[]
@
file
s
=
[
File
.
expand_path
(
'./features'
,
__dir__
)]
@
option
s
=
[
File
.
expand_path
(
'./features'
,
__dir__
)]
end
end
def
perform
def
perform
args
=
[]
args
=
[]
args
.
push
(
'--tty'
)
if
tty
args
.
push
(
'--tty'
)
if
tty
tags
.
to_a
.
each
{
|
tag
|
args
.
push
([
'-t'
,
tag
.
to_s
])
}
tags
.
to_a
.
each
{
|
tag
|
args
.
push
([
'-t'
,
tag
.
to_s
])
}
args
.
push
(
file
s
)
args
.
push
(
option
s
)
Runtime
::
Browser
.
configure!
Runtime
::
Browser
.
configure!
...
...
qa/spec/scenario/test/instance_spec.rb
View file @
66b844d0
...
@@ -29,7 +29,7 @@ describe QA::Scenario::Test::Instance do
...
@@ -29,7 +29,7 @@ describe QA::Scenario::Test::Instance do
it
'should call runner with default arguments'
do
it
'should call runner with default arguments'
do
subject
.
perform
(
"test"
)
subject
.
perform
(
"test"
)
expect
(
runner
).
to
have_received
(
:
file
s
=
)
expect
(
runner
).
to
have_received
(
:
option
s
=
)
.
with
(
File
.
expand_path
(
'../../../qa/specs/features'
,
__dir__
))
.
with
(
File
.
expand_path
(
'../../../qa/specs/features'
,
__dir__
))
end
end
end
end
...
@@ -38,7 +38,7 @@ describe QA::Scenario::Test::Instance do
...
@@ -38,7 +38,7 @@ describe QA::Scenario::Test::Instance do
it
'should call runner with paths'
do
it
'should call runner with paths'
do
subject
.
perform
(
'test'
,
'path1'
,
'path2'
)
subject
.
perform
(
'test'
,
'path1'
,
'path2'
)
expect
(
runner
).
to
have_received
(
:
file
s
=
).
with
(
%w[path1 path2]
)
expect
(
runner
).
to
have_received
(
:
option
s
=
).
with
(
%w[path1 path2]
)
end
end
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