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
3f64b1ad
Commit
3f64b1ad
authored
Aug 22, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[QA] Re-add Test::Instance for back-compatibility with GitLab < 11.3
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
1bbe3945
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
qa/qa.rb
qa/qa.rb
+1
-0
qa/qa/scenario/test/instance.rb
qa/qa/scenario/test/instance.rb
+36
-0
No files found.
qa/qa.rb
View file @
3f64b1ad
...
...
@@ -83,6 +83,7 @@ module QA
# Test scenario entrypoints.
#
module
Test
autoload
:Instance
,
'qa/scenario/test/instance'
module
Instance
autoload
:All
,
'qa/scenario/test/instance/all'
autoload
:Smoke
,
'qa/scenario/test/instance/smoke'
...
...
qa/qa/scenario/test/instance.rb
0 → 100644
View file @
3f64b1ad
# frozen_string_literal: true
module
QA
module
Scenario
module
Test
# This class exists for back-compatibility so that gitlab-qa can continue
# to call Test::Instance instead of Test::Instance::All until at least
# the current latest GitLab version has the Test::Instance::All class.
# As of Aug, 22nd 2018. Only GitLab >= 11.3 has this class.
module
Instance
include
Bootable
def
self
.
perform
(
*
args
)
self
.
tap
do
|
scenario
|
yield
scenario
if
block_given?
break
scenario
.
do_perform
(
*
args
)
end
end
def
self
.
do_perform
(
address
,
*
rspec_options
)
Runtime
::
Scenario
.
define
(
:gitlab_address
,
address
)
Specs
::
Runner
.
perform
do
|
specs
|
specs
.
tty
=
true
specs
.
options
=
if
rspec_options
.
any?
rspec_options
else
::
File
.
expand_path
(
'../specs/features'
,
__dir__
)
end
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