Commit 09ae3806 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'qa/gb/fix-bootable-scenario-arguments' into 'master'

Fix bootable scenario arguments for OptionParser

See merge request gitlab-org/gitlab-ce!15309
parents 8331786c a396030a
......@@ -4,4 +4,4 @@ require_relative '../qa'
QA::Scenario
.const_get(ARGV.shift)
.launch!(*ARGV)
.launch!(ARGV)
......@@ -11,6 +11,8 @@ module QA
module ClassMethods
def launch!(argv)
return self.perform(*argv) unless has_attributes?
arguments = OptionParser.new do |parser|
options.to_a.each do |opt|
parser.on(opt.arg, opt.desc) do |value|
......@@ -21,11 +23,7 @@ module QA
arguments.parse!(argv)
if has_attributes?
self.perform(**Runtime::Scenario.attributes)
else
self.perform(*argv)
end
self.perform(**Runtime::Scenario.attributes)
end
private
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment