summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-11-10 11:11:23 +0000
committerRémy Coutable <remy@rymai.me>2017-11-10 11:11:23 +0000
commit09ae380698578205ece74ed594d48a3177042024 (patch)
treea2de291fc3dd959a4dd7e6cd8a62edfa3690c587
parent8331786cfafd8c7c20daa154f0cc744a5ae5022f (diff)
parenta396030a14ac9d832bbf86103a7006a0b710e9a9 (diff)
downloadgitlab-ce-09ae380698578205ece74ed594d48a3177042024.tar.gz
Merge branch 'qa/gb/fix-bootable-scenario-arguments' into 'master'
Fix bootable scenario arguments for OptionParser See merge request gitlab-org/gitlab-ce!15309
-rwxr-xr-xqa/bin/qa2
-rw-r--r--qa/qa/scenario/bootable.rb8
2 files changed, 4 insertions, 6 deletions
diff --git a/qa/bin/qa b/qa/bin/qa
index f1704dc54e9..6a772e93cee 100755
--- a/qa/bin/qa
+++ b/qa/bin/qa
@@ -4,4 +4,4 @@ require_relative '../qa'
QA::Scenario
.const_get(ARGV.shift)
- .launch!(*ARGV)
+ .launch!(ARGV)
diff --git a/qa/qa/scenario/bootable.rb b/qa/qa/scenario/bootable.rb
index 22496bcc2fc..cf8996cd597 100644
--- a/qa/qa/scenario/bootable.rb
+++ b/qa/qa/scenario/bootable.rb
@@ -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