gitlab-qa 3.1.0 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c43864e3afe1ee61964bdcd2e81646278adb110e183d21e9c3bae0deea67d1f1
4
- data.tar.gz: 022cb5a101dc79f9cbca06b4b661acf7fdc45882fdb4754be507175f919a4187
3
+ metadata.gz: 5740a7e12aba0408c71f2f6c4044f800f451e9219dd07a0f9c47be3a21bb5c86
4
+ data.tar.gz: 342da269858a882aa2be68d6150e0115dfd5171ca535100dac7d35f306615490
5
5
  SHA512:
6
- metadata.gz: ef47922f60046f4df91bfeb758d4dd2aa345dd11c1cd2422f0096917549e6bf674a00a46f99c2c500a5688b1c1b742d9ba3fa08cf946ddcd29fc9152015c7a45
7
- data.tar.gz: 89fed700c3848962272bf6bf04dee329f9296a89df986403fe7e099b1fa0418e832da36945269e397ef8819265a39a61c1a45b18cef69457fbcf5f5c1df6a977
6
+ metadata.gz: 10789ef35f2dc2f68f51cb72b51cef717f8fcc13fb454a4bb946a66bca99b37c113d42afbc1ce997c9961e301323c033c8b5e68a42f1591671d3a6787cb47371
7
+ data.tar.gz: 5f6d6c83d09214a50d48b3274f79e893c0d999d326fd4d93337dcf9ddbd7b44014e66ca58afe3f016df23d899fd4c7671c7cf3ef069fa0d61723fa1b64b736a3
data/bin/qa CHANGED
@@ -3,6 +3,4 @@
3
3
  require 'bundler/setup'
4
4
  require 'gitlab/qa'
5
5
 
6
- Gitlab::QA::Scenario
7
- .const_get(ARGV.shift)
8
- .perform(*ARGV)
6
+ Gitlab::QA::Runner.run(ARGV)
@@ -1,48 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'gitlab/qa'
4
- require 'optparse'
5
4
 
6
- # We use OptionParser here in gitlab-qa and in the QA framework in CE/EE, so we
7
- # need to include a separator, --, before rspec options so that OptionParser
8
- # doesn't reject them.
9
- #
10
- # Since we invoke OptionParser twice, the original command would need 2
11
- # separators otherwise the 2nd invocation of OptionParser would reject the rspec
12
- # tags that follow the separator.
13
- #
14
- # Rather than have to include 2 separators when we run gitlab-qa, the following
15
- # adds a 2nd separator if there is one in the command. It is then removed by
16
- # OptionParser, but when the args are passed on to the QA framework there is
17
- # still 1 separator so the rspec options don't cause an error when OptionParser
18
- # parses the options again.
19
-
20
- args = ARGV
21
- index = args.index('--')
22
- args.insert(index, '--') if index && args.count('--') == 1
23
-
24
- options = OptionParser.new do |opts|
25
- opts.banner = 'Usage: gitlab-qa [options] Scenario URL [[--] path] [rspec_options]'
26
-
27
- opts.on('-v', '--version', 'Show the version') do
28
- require 'gitlab/qa/version'
29
- puts "#{$PROGRAM_NAME} : #{Gitlab::QA::VERSION}"
30
- exit
31
- end
32
-
33
- opts.on('-h', '--help', 'Show the usage') do
34
- puts opts
35
- exit
36
- end
37
-
38
- opts.parse!(args)
39
- end
40
-
41
- if ARGV.size >= 1
42
- Gitlab::QA::Scenario
43
- .const_get(args.shift)
44
- .perform(*args)
45
- else
46
- puts options
47
- exit 1
48
- end
5
+ Gitlab::QA::Runner.run(ARGV)
@@ -3,6 +3,7 @@ $LOAD_PATH << File.expand_path(__dir__)
3
3
  module Gitlab
4
4
  module QA
5
5
  autoload :Release, 'qa/release'
6
+ autoload :Runner, 'qa/runner'
6
7
 
7
8
  module Runtime
8
9
  autoload :Env, 'qa/runtime/env'
@@ -0,0 +1,49 @@
1
+ require 'optparse'
2
+
3
+ module Gitlab
4
+ module QA
5
+ class Runner
6
+ # These options are implemented in the QA framework (i.e., in the CE/EE codebase)
7
+ # They're included here so that gitlab-qa treats them as valid options
8
+ PASS_THROUGH_OPTS = [
9
+ ['--address URL', 'Address of the instance to test'],
10
+ ['--mattermost-address URL', 'Address of the Mattermost server'],
11
+ ['--enable-feature FEATURE_FLAG', 'Enable a feature before running tests']
12
+ ].freeze
13
+
14
+ # rubocop:disable Metrics/AbcSize
15
+ def self.run(args)
16
+ options = OptionParser.new do |opts|
17
+ opts.banner = 'Usage: gitlab-qa [options] Scenario URL [[--] path] [rspec_options]'
18
+
19
+ PASS_THROUGH_OPTS.each do |opt|
20
+ opts.on(*opt)
21
+ end
22
+
23
+ opts.on_tail('-v', '--version', 'Show the version') do
24
+ require 'gitlab/qa/version'
25
+ puts "#{$PROGRAM_NAME} : #{VERSION}"
26
+ exit
27
+ end
28
+
29
+ opts.on_tail('-h', '--help', 'Show the usage') do
30
+ puts opts
31
+ exit
32
+ end
33
+
34
+ opts.parse(args)
35
+ end
36
+
37
+ if args.size >= 1
38
+ Scenario
39
+ .const_get(args.shift)
40
+ .perform(*args)
41
+ else
42
+ puts options
43
+ exit 1
44
+ end
45
+ end
46
+ # rubocop:enable Metrics/AbcSize
47
+ end
48
+ end
49
+ end
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module QA
3
- VERSION = '3.1.0'.freeze
3
+ VERSION = '3.1.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-qa
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grzegorz Bizon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-25 00:00:00.000000000 Z
11
+ date: 2019-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -163,6 +163,7 @@ files:
163
163
  - lib/gitlab/qa/docker/shellout.rb
164
164
  - lib/gitlab/qa/docker/volumes.rb
165
165
  - lib/gitlab/qa/release.rb
166
+ - lib/gitlab/qa/runner.rb
166
167
  - lib/gitlab/qa/runtime/env.rb
167
168
  - lib/gitlab/qa/scenario/actable.rb
168
169
  - lib/gitlab/qa/scenario/template.rb
@@ -210,7 +211,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
211
  - !ruby/object:Gem::Version
211
212
  version: '0'
212
213
  requirements: []
213
- rubygems_version: 3.0.3
214
+ rubyforge_project:
215
+ rubygems_version: 2.7.6
214
216
  signing_key:
215
217
  specification_version: 4
216
218
  summary: Integration tests for GitLab