gitlab-qa 7.0.1 → 7.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +4 -0
- data/docs/what_tests_can_be_run.md +1 -0
- data/lib/gitlab/qa/component/base.rb +2 -2
- data/lib/gitlab/qa/component/elasticsearch.rb +1 -1
- data/lib/gitlab/qa/component/gitlab.rb +2 -16
- data/lib/gitlab/qa/component/internet_tunnel.rb +4 -1
- data/lib/gitlab/qa/component/jira.rb +1 -1
- data/lib/gitlab/qa/component/ldap.rb +1 -1
- data/lib/gitlab/qa/component/mail_hog.rb +1 -1
- data/lib/gitlab/qa/component/minio.rb +1 -1
- data/lib/gitlab/qa/component/postgresql.rb +1 -1
- data/lib/gitlab/qa/component/saml.rb +1 -1
- data/lib/gitlab/qa/component/specs.rb +2 -2
- data/lib/gitlab/qa/docker/engine.rb +2 -2
- data/lib/gitlab/qa/runner.rb +22 -4
- data/lib/gitlab/qa/runtime/env.rb +3 -2
- data/lib/gitlab/qa/runtime/omnibus_configuration.rb +12 -2
- data/lib/gitlab/qa/runtime/omnibus_configurations/default.rb +1 -0
- data/lib/gitlab/qa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbdcaeeeaa99ad4d6e7c479db9acaadc8f25e62f4fa17c4f6861d9b7be98fe2a
|
4
|
+
data.tar.gz: 890d74307cac468dae04a9108d80ca147a1c4f44fb14fc2301055d459f53cf06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 903a50594c371873590470df3f8fc3fac516f29c086befd61c14bc2dbd17c87aa5e8a88d4792762fffa895e7b2caf8dd8670a37cde20fad527c7b75719759457
|
7
|
+
data.tar.gz: 59106ca07a8da61737bcaa482e0da8222fd6be52b5b0ee12f250be4cf0de0d55e99dbf6253ad712a049612e61f30253988690aba955648a7a0a3713d72468a23
|
data/.gitlab-ci.yml
CHANGED
@@ -739,6 +739,7 @@ ee:object_storage:
|
|
739
739
|
- .rspec-report-opts
|
740
740
|
variables:
|
741
741
|
GITLAB_QA_OPTS: "--omnibus-config object_storage"
|
742
|
+
QA_RSPEC_TAGS: "--tag object_storage"
|
742
743
|
|
743
744
|
ee:object_storage-quarantine:
|
744
745
|
extends:
|
@@ -749,6 +750,7 @@ ee:object_storage-quarantine:
|
|
749
750
|
- .rspec-report-opts
|
750
751
|
variables:
|
751
752
|
GITLAB_QA_OPTS: "--omnibus-config object_storage"
|
753
|
+
QA_RSPEC_TAGS: "--tag quarantine --tag object_storage"
|
752
754
|
|
753
755
|
ee:packages:
|
754
756
|
extends:
|
@@ -758,6 +760,7 @@ ee:packages:
|
|
758
760
|
- .rspec-report-opts
|
759
761
|
variables:
|
760
762
|
GITLAB_QA_OPTS: "--omnibus-config packages"
|
763
|
+
QA_RSPEC_TAGS: "--tag packages"
|
761
764
|
|
762
765
|
ee:packages-quarantine:
|
763
766
|
extends:
|
@@ -768,6 +771,7 @@ ee:packages-quarantine:
|
|
768
771
|
- .rspec-report-opts
|
769
772
|
variables:
|
770
773
|
GITLAB_QA_OPTS: "--omnibus-config packages"
|
774
|
+
QA_RSPEC_TAGS: "--tag quarantine --tag packages"
|
771
775
|
|
772
776
|
ce:actioncable:
|
773
777
|
extends:
|
@@ -85,6 +85,7 @@ All environment variables used by GitLab QA should be defined in [`lib/gitlab/qa
|
|
85
85
|
| `DEPLOY_VERSION` |- | The version of GitLab being tested against. | No|
|
86
86
|
| `GITLAB_QA_USER_AGENT` |- | The browser user-agent to use instead of the default Chrome user-agent. | No|
|
87
87
|
| `GEO_FAILOVER` | `false` | Set to `true` when a Geo secondary site has been promoted to a Geo primary site. | No|
|
88
|
+
| `GITLAB_INITIAL_ROOT_PASSWORD` | `5iveL!fe` | Initial root password for Omnibus installations | No|
|
88
89
|
|
89
90
|
|
90
91
|
## [Supported Remote Grid environment variables](./running_against_remote_grid.md)
|
@@ -78,7 +78,7 @@ module Gitlab
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def start # rubocop:disable Metrics/AbcSize
|
81
|
-
docker.run(image, tag) do |command|
|
81
|
+
docker.run(image: image, tag: tag) do |command|
|
82
82
|
command << "-d"
|
83
83
|
command << "--name #{name}"
|
84
84
|
command << "--net #{network}"
|
@@ -129,7 +129,7 @@ module Gitlab
|
|
129
129
|
def pull
|
130
130
|
return if Runtime::Env.skip_pull?
|
131
131
|
|
132
|
-
docker.pull(image, tag)
|
132
|
+
docker.pull(image: image, tag: tag)
|
133
133
|
end
|
134
134
|
|
135
135
|
def process_exec_commands
|
@@ -33,7 +33,7 @@ module Gitlab
|
|
33
33
|
@volumes[GITLAB_CERTIFICATES_PATH] = SSL_PATH
|
34
34
|
@volumes[AUTHORITY_CERTIFICATES_PATH] = TRUSTED_PATH
|
35
35
|
|
36
|
-
@omnibus_configuration ||= OmnibusConfiguration.new
|
36
|
+
@omnibus_configuration ||= Runtime::OmnibusConfiguration.new(Runtime::Scenario.omnibus_configuration)
|
37
37
|
|
38
38
|
self.release = 'CE'
|
39
39
|
end
|
@@ -100,7 +100,7 @@ module Gitlab
|
|
100
100
|
def start # rubocop:disable Metrics/AbcSize
|
101
101
|
ensure_configured!
|
102
102
|
|
103
|
-
docker.run(image, tag) do |command|
|
103
|
+
docker.run(image: image, tag: tag) do |command|
|
104
104
|
command << "-d -p #{port}"
|
105
105
|
command << "--name #{name}"
|
106
106
|
command << "--net #{network}"
|
@@ -206,20 +206,6 @@ module Gitlab
|
|
206
206
|
@uri.scheme == 'https' ? { use_ssl: true, verify_mode: OpenSSL::SSL::VERIFY_NONE } : {}
|
207
207
|
end
|
208
208
|
end
|
209
|
-
|
210
|
-
class OmnibusConfiguration
|
211
|
-
def initialize
|
212
|
-
@config = Runtime::Scenario.attributes[:omnibus_configuration] || []
|
213
|
-
end
|
214
|
-
|
215
|
-
def <<(configuration)
|
216
|
-
@config << configuration
|
217
|
-
end
|
218
|
-
|
219
|
-
def to_s
|
220
|
-
@config.to_s
|
221
|
-
end
|
222
|
-
end
|
223
209
|
end
|
224
210
|
end
|
225
211
|
end
|
@@ -49,7 +49,10 @@ module Gitlab
|
|
49
49
|
def start
|
50
50
|
raise "Must set gitlab_hostname" unless @gitlab_hostname
|
51
51
|
|
52
|
-
@docker.run(
|
52
|
+
@docker.run(
|
53
|
+
image: DOCKER_IMAGE,
|
54
|
+
tag: DOCKER_IMAGE_TAG,
|
55
|
+
args: ["-o StrictHostKeyChecking=no -N -R #{subdomain}:#{@gitlab_hostname}:80 #{ENV.fetch('TUNNEL_SSH_USER')}@#{tunnel_server_hostname}"]) do |command|
|
53
56
|
command << '-d '
|
54
57
|
command << "--name #{name}"
|
55
58
|
command << "--net #{network}"
|
@@ -63,7 +63,7 @@ module Gitlab
|
|
63
63
|
def start
|
64
64
|
# copy-service needed for bootstraping LDAP user:
|
65
65
|
# https://github.com/osixia/docker-openldap#seed-ldap-database-with-ldif
|
66
|
-
docker.run(image, tag, '--copy-service') do |command|
|
66
|
+
docker.run(image: image, tag: tag, args: ['--copy-service']) do |command|
|
67
67
|
command << '-d '
|
68
68
|
command << "--name #{name}"
|
69
69
|
command << "--net #{network}"
|
@@ -70,7 +70,7 @@ module Gitlab
|
|
70
70
|
def start # rubocop:disable Metrics/AbcSize
|
71
71
|
# --compat needed until https://gitlab.com/gitlab-org/gitlab-workhorse/issues/210
|
72
72
|
# is resolved
|
73
|
-
docker.run(image, tag, "server", "--compat", DATA_DIR) do |command|
|
73
|
+
docker.run(image: image, tag: tag, args: ["server", "--compat", DATA_DIR]) do |command|
|
74
74
|
command << '-d '
|
75
75
|
command << "--name #{name}"
|
76
76
|
command << "--net #{network}"
|
@@ -23,7 +23,7 @@ module Gitlab
|
|
23
23
|
|
24
24
|
@docker.login(**release.login_params) if release.login_params
|
25
25
|
|
26
|
-
@docker.pull(qa_image) unless Runtime::Env.skip_pull?
|
26
|
+
@docker.pull(image: qa_image) unless Runtime::Env.skip_pull?
|
27
27
|
|
28
28
|
puts "Running test suite `#{suite}` for #{release.project_name}"
|
29
29
|
|
@@ -43,7 +43,7 @@ module Gitlab
|
|
43
43
|
feature_flag_sets << [] unless feature_flag_sets.any?
|
44
44
|
|
45
45
|
feature_flag_sets.each do |feature_flag_set|
|
46
|
-
@docker.run(qa_image,
|
46
|
+
@docker.run(image: qa_image, args: [suite, *args_with_flags(args, feature_flag_set)]) do |command|
|
47
47
|
command << "-t --rm --net=#{network || 'bridge'}"
|
48
48
|
|
49
49
|
env.merge(Runtime::Env.variables).each do |key, value|
|
@@ -15,11 +15,11 @@ module Gitlab
|
|
15
15
|
Docker::Command.execute(%(login --username "#{username}" --password "#{password}" #{registry}), mask_secrets: password)
|
16
16
|
end
|
17
17
|
|
18
|
-
def pull(image
|
18
|
+
def pull(image:, tag: nil)
|
19
19
|
Docker::Command.execute("pull #{full_image_name(image, tag)}")
|
20
20
|
end
|
21
21
|
|
22
|
-
def run(image
|
22
|
+
def run(image:, tag: nil, args: [])
|
23
23
|
Docker::Command.new('run').tap do |command|
|
24
24
|
yield command if block_given?
|
25
25
|
|
data/lib/gitlab/qa/runner.rb
CHANGED
@@ -57,7 +57,10 @@ module Gitlab
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
|
-
|
60
|
+
# Remove arguments passed into GitLab QA preventing them from being
|
61
|
+
# passed into the specs
|
62
|
+
args = remove_gitlab_qa_args(args)
|
63
|
+
|
61
64
|
if args.size >= 1
|
62
65
|
load_omnibus_configurations
|
63
66
|
|
@@ -79,7 +82,22 @@ module Gitlab
|
|
79
82
|
end
|
80
83
|
|
81
84
|
def self.gitlab_qa_options
|
82
|
-
@gitlab_qa_options ||= @options.top.list
|
85
|
+
@gitlab_qa_options ||= @options.top.list
|
86
|
+
end
|
87
|
+
|
88
|
+
# Take a set of arguments and remove them from the set of
|
89
|
+
# predefined GitLab QA arguments
|
90
|
+
# @param args Array the arguments to parse through and remove GitLab QA opts
|
91
|
+
# @return Arguments to be passed ultimately to the RSpec runner
|
92
|
+
def self.remove_gitlab_qa_args(args)
|
93
|
+
args.each_with_index do |arg, i|
|
94
|
+
gitlab_qa_options.each do |opt|
|
95
|
+
next unless opt.long.flatten.first == arg
|
96
|
+
|
97
|
+
args[i] = nil
|
98
|
+
args[i + 1] = nil if opt.is_a? OptionParser::Switch::RequiredArgument
|
99
|
+
end
|
100
|
+
end.compact
|
83
101
|
end
|
84
102
|
|
85
103
|
def self.load_omnibus_configurations
|
@@ -100,8 +118,8 @@ module Gitlab
|
|
100
118
|
end
|
101
119
|
rescue NameError
|
102
120
|
raise <<~ERROR
|
103
|
-
|
104
|
-
|
121
|
+
Invalid Omnibus Configuration `#{config}`.
|
122
|
+
Possible configurations: #{Runtime::OmnibusConfigurations.constants.map { |c| c.to_s.underscore }.join(',')}"
|
105
123
|
ERROR
|
106
124
|
end
|
107
125
|
end
|
@@ -90,7 +90,8 @@ module Gitlab
|
|
90
90
|
'CACHE_NAMESPACE_NAME' => :cache_namespace_name,
|
91
91
|
'DEPLOY_VERSION' => :deploy_version,
|
92
92
|
'GITLAB_QA_USER_AGENT' => :gitlab_qa_user_agent,
|
93
|
-
'GEO_FAILOVER' => :geo_failover
|
93
|
+
'GEO_FAILOVER' => :geo_failover,
|
94
|
+
'GITLAB_INITIAL_ROOT_PASSWORD' => :initial_root_password
|
94
95
|
}.freeze
|
95
96
|
|
96
97
|
ENV_VARIABLES.each do |env_name, method_name|
|
@@ -189,7 +190,7 @@ module Gitlab
|
|
189
190
|
end
|
190
191
|
|
191
192
|
def initial_root_password
|
192
|
-
ENV['GITLAB_INITIAL_ROOT_PASSWORD']
|
193
|
+
ENV['GITLAB_INITIAL_ROOT_PASSWORD'] || '5iveL!fe'
|
193
194
|
end
|
194
195
|
|
195
196
|
def qa_container_registry_access_token
|
@@ -6,8 +6,18 @@ module Gitlab
|
|
6
6
|
module QA
|
7
7
|
module Runtime
|
8
8
|
class OmnibusConfiguration
|
9
|
-
|
9
|
+
# @param prefixed_config The configuration to be prefixed to the new configuration
|
10
|
+
def initialize(prefixed_config = nil)
|
10
11
|
@config = ["# Generated by GitLab QA Omnibus Configurator at #{Time.now.strftime('%Y-%m-%d %H:%M:%S')}"]
|
12
|
+
|
13
|
+
return unless prefixed_config
|
14
|
+
|
15
|
+
# remove generation statement if it exists within the prefixed configuration that was passed
|
16
|
+
# and insert the rest AFTER the very first generation statement
|
17
|
+
config_to_insert = prefixed_config.to_s
|
18
|
+
generation_regexp = /# Generated by GitLab QA Omnibus Configurator.*\n/
|
19
|
+
config_to_insert = config_to_insert.gsub(generation_regexp, '') if config_to_insert.match?(generation_regexp)
|
20
|
+
@config.insert(1, config_to_insert)
|
11
21
|
end
|
12
22
|
|
13
23
|
def to_s
|
@@ -28,7 +38,7 @@ module Gitlab
|
|
28
38
|
[]
|
29
39
|
end
|
30
40
|
|
31
|
-
# Ensures no duplicate entries
|
41
|
+
# Ensures no duplicate entries and sanitizes configurations
|
32
42
|
# @raise RuntimeError if competing configurations exist
|
33
43
|
# rubocop:disable Metrics/AbcSize
|
34
44
|
def sanitize!
|
@@ -12,6 +12,7 @@ module Gitlab
|
|
12
12
|
gitlab_rails['gitlab_default_theme'] = 10 # Light Red Theme
|
13
13
|
gitlab_rails['gitlab_disable_animations'] = true # Disable animations
|
14
14
|
gitlab_rails['application_settings_cache_seconds'] = 0 # Settings cache expiry
|
15
|
+
gitlab_rails['initial_root_password'] = '#{Runtime::Env.initial_root_password}' # Initial root password
|
15
16
|
OMNIBUS
|
16
17
|
end
|
17
18
|
|
data/lib/gitlab/qa/version.rb
CHANGED
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: 7.0
|
4
|
+
version: 7.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitLab Quality
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|