gitlab-qa 7.32.0 → 7.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitlab/ci/jobs/base.gitlab-ci.yml +0 -1
- data/.gitlab/ci/jobs/registry_with_cdn.gitlab-ci.yml +12 -0
- data/.rubocop_todo.yml +0 -7
- data/Dangerfile +2 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +1 -1
- data/Rakefile +2 -0
- data/docs/what_tests_can_be_run.md +2 -1
- data/exe/gitlab-qa +1 -0
- data/exe/gitlab-qa-report +1 -0
- data/lib/gitlab/qa/component/base.rb +3 -1
- data/lib/gitlab/qa/component/elasticsearch.rb +3 -1
- data/lib/gitlab/qa/component/gitlab.rb +42 -24
- data/lib/gitlab/qa/component/internet_tunnel.rb +4 -2
- data/lib/gitlab/qa/component/jira.rb +4 -2
- data/lib/gitlab/qa/component/mail_hog.rb +3 -2
- data/lib/gitlab/qa/component/minio.rb +7 -5
- data/lib/gitlab/qa/component/postgresql.rb +4 -2
- data/lib/gitlab/qa/component/preprod.rb +3 -1
- data/lib/gitlab/qa/component/production.rb +3 -1
- data/lib/gitlab/qa/component/release.rb +3 -1
- data/lib/gitlab/qa/component/saml.rb +4 -2
- data/lib/gitlab/qa/component/specs.rb +2 -0
- data/lib/gitlab/qa/component/staging.rb +4 -2
- data/lib/gitlab/qa/component/staging_ref.rb +4 -2
- data/lib/gitlab/qa/docker/command.rb +7 -1
- data/lib/gitlab/qa/docker/engine.rb +10 -0
- data/lib/gitlab/qa/docker/shellout.rb +24 -14
- data/lib/gitlab/qa/docker/volumes.rb +3 -1
- data/lib/gitlab/qa/release.rb +6 -4
- data/lib/gitlab/qa/report/prepare_stage_reports.rb +2 -0
- data/lib/gitlab/qa/report/summary_table.rb +2 -0
- data/lib/gitlab/qa/report/update_screenshot_path.rb +2 -0
- data/lib/gitlab/qa/reporter.rb +2 -0
- data/lib/gitlab/qa/runtime/env.rb +9 -4
- data/lib/gitlab/qa/runtime/logger.rb +1 -1
- data/lib/gitlab/qa/scenario/actable.rb +2 -0
- data/lib/gitlab/qa/scenario/cli_commands.rb +3 -1
- data/lib/gitlab/qa/scenario/template.rb +2 -0
- data/lib/gitlab/qa/scenario/test/instance/airgapped.rb +2 -0
- data/lib/gitlab/qa/scenario/test/instance/any.rb +2 -0
- data/lib/gitlab/qa/scenario/test/instance/deployment_base.rb +2 -0
- data/lib/gitlab/qa/scenario/test/instance/geo.rb +2 -0
- data/lib/gitlab/qa/scenario/test/instance/image.rb +2 -0
- data/lib/gitlab/qa/scenario/test/instance/preprod.rb +2 -0
- data/lib/gitlab/qa/scenario/test/instance/production.rb +2 -0
- data/lib/gitlab/qa/scenario/test/instance/relative_url.rb +2 -0
- data/lib/gitlab/qa/scenario/test/instance/release.rb +2 -0
- data/lib/gitlab/qa/scenario/test/instance/repository_storage.rb +2 -0
- data/lib/gitlab/qa/scenario/test/instance/smoke.rb +2 -0
- data/lib/gitlab/qa/scenario/test/instance/staging.rb +2 -0
- data/lib/gitlab/qa/scenario/test/instance/staging_geo.rb +2 -0
- data/lib/gitlab/qa/scenario/test/instance/staging_ref.rb +2 -0
- data/lib/gitlab/qa/scenario/test/instance/staging_ref_geo.rb +2 -0
- data/lib/gitlab/qa/scenario/test/integration/client_ssl.rb +2 -0
- data/lib/gitlab/qa/scenario/test/integration/elasticsearch.rb +2 -0
- data/lib/gitlab/qa/scenario/test/integration/geo.rb +2 -0
- data/lib/gitlab/qa/scenario/test/integration/gitaly_cluster.rb +51 -27
- data/lib/gitlab/qa/scenario/test/integration/group_saml.rb +2 -0
- data/lib/gitlab/qa/scenario/test/integration/instance_saml.rb +2 -0
- data/lib/gitlab/qa/scenario/test/integration/jira.rb +2 -0
- data/lib/gitlab/qa/scenario/test/integration/kubernetes.rb +2 -0
- data/lib/gitlab/qa/scenario/test/integration/ldap.rb +8 -6
- data/lib/gitlab/qa/scenario/test/integration/ldap_no_server.rb +2 -0
- data/lib/gitlab/qa/scenario/test/integration/ldap_no_tls.rb +2 -0
- data/lib/gitlab/qa/scenario/test/integration/ldap_tls.rb +2 -0
- data/lib/gitlab/qa/scenario/test/integration/mattermost.rb +2 -0
- data/lib/gitlab/qa/scenario/test/integration/mtls.rb +2 -0
- data/lib/gitlab/qa/scenario/test/integration/praefect.rb +2 -0
- data/lib/gitlab/qa/scenario/test/integration/saml.rb +2 -0
- data/lib/gitlab/qa/scenario/test/integration/smtp.rb +2 -0
- data/lib/gitlab/qa/scenario/test/omnibus/image.rb +2 -0
- data/lib/gitlab/qa/scenario/test/omnibus/update.rb +2 -0
- data/lib/gitlab/qa/scenario/test/omnibus/upgrade.rb +2 -0
- data/lib/gitlab/qa/scenario/test/sanity/version.rb +2 -0
- data/lib/gitlab/qa/slack/post_to_slack.rb +2 -0
- data/lib/gitlab/qa/support/dev_ee_qa_image.rb +3 -1
- data/lib/gitlab/qa/support/get_request.rb +2 -0
- data/lib/gitlab/qa/support/http_request.rb +2 -0
- data/lib/gitlab/qa/support/invalid_response_error.rb +2 -0
- data/lib/gitlab/qa/version.rb +1 -1
- data/lib/gitlab/qa.rb +4 -0
- data/scripts/generate-qa-jobs.rb +1 -0
- data/support/data/license_usage_seed.rb +2 -1
- metadata +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'active_support/core_ext/object/blank'
|
|
2
4
|
require 'securerandom'
|
|
3
|
-
require 'rainbow/refinement'
|
|
4
5
|
|
|
5
6
|
module Gitlab
|
|
6
7
|
module QA
|
|
@@ -142,7 +143,9 @@ module Gitlab
|
|
|
142
143
|
attr_writer(method_name)
|
|
143
144
|
|
|
144
145
|
define_method(method_name) do
|
|
145
|
-
env_var_value_if_defined(env_name) || (
|
|
146
|
+
env_var_value_if_defined(env_name) || (if instance_variable_defined?("@#{method_name}")
|
|
147
|
+
instance_variable_get("@#{method_name}")
|
|
148
|
+
end)
|
|
146
149
|
end
|
|
147
150
|
end
|
|
148
151
|
|
|
@@ -220,11 +223,13 @@ module Gitlab
|
|
|
220
223
|
end
|
|
221
224
|
|
|
222
225
|
def host_artifacts_dir
|
|
223
|
-
@host_artifacts_dir ||= File.join(
|
|
226
|
+
@host_artifacts_dir ||= File.join(
|
|
227
|
+
env_var_value_if_defined('QA_ARTIFACTS_DIR') || '/tmp/gitlab-qa', Runtime::Env.run_id
|
|
228
|
+
)
|
|
224
229
|
end
|
|
225
230
|
|
|
226
231
|
def elastic_version
|
|
227
|
-
env_var_value_if_defined('ELASTIC_VERSION') || '7.17.0'
|
|
232
|
+
env_var_value_if_defined('ELASTIC_VERSION') || '7.17.0'
|
|
228
233
|
end
|
|
229
234
|
|
|
230
235
|
def require_license!
|
|
@@ -16,7 +16,7 @@ module Gitlab
|
|
|
16
16
|
log_path = Env.log_path
|
|
17
17
|
::FileUtils.mkdir_p(log_path) unless File.exist?(log_path)
|
|
18
18
|
|
|
19
|
-
TestLogger.logger(level: Env.
|
|
19
|
+
TestLogger.logger(level: Env.log_level, path: log_path)
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
22
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Gitlab
|
|
2
4
|
module QA
|
|
3
5
|
module Scenario
|
|
@@ -20,28 +22,14 @@ module Gitlab
|
|
|
20
22
|
end
|
|
21
23
|
|
|
22
24
|
def perform(release, *rspec_args)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
sql.run_psql '-d template1 -c "CREATE DATABASE praefect_production OWNER postgres"'
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
praefect_node = Component::Gitlab.new.tap do |praefect|
|
|
36
|
-
praefect.release = QA::Release.new(release)
|
|
37
|
-
praefect.name = @praefect_node_name
|
|
38
|
-
praefect.network = @network
|
|
39
|
-
praefect.skip_availability_check = true
|
|
40
|
-
praefect.seed_admin_token = false
|
|
41
|
-
|
|
42
|
-
praefect.omnibus_configuration << praefect_omnibus_configuration
|
|
43
|
-
|
|
44
|
-
praefect.instance(skip_teardown: true)
|
|
25
|
+
# The postgres container starts in seconds so not essential to parallelize it
|
|
26
|
+
# This also ensure that the docker network is created here, avoiding any potential race conditions later
|
|
27
|
+
# if the gitaly-cluster and GitLab containers attempt to create a network in parallel
|
|
28
|
+
@sql_node = postgres
|
|
29
|
+
|
|
30
|
+
gitaly_cluster = Thread.new do
|
|
31
|
+
Thread.current.abort_on_exception = true
|
|
32
|
+
start_gitaly_cluster(release)
|
|
45
33
|
end
|
|
46
34
|
|
|
47
35
|
Component::Gitlab.perform do |gitlab|
|
|
@@ -51,6 +39,8 @@ module Gitlab
|
|
|
51
39
|
|
|
52
40
|
gitlab.omnibus_configuration << gitlab_omnibus_configuration
|
|
53
41
|
gitlab.instance do
|
|
42
|
+
# Wait for gitaly cluster to finish booting, before attempting to run specs
|
|
43
|
+
gitaly_cluster.join
|
|
54
44
|
Runtime::Logger.info('Running Gitaly Cluster specs!')
|
|
55
45
|
|
|
56
46
|
if @tag
|
|
@@ -68,15 +58,25 @@ module Gitlab
|
|
|
68
58
|
end
|
|
69
59
|
end
|
|
70
60
|
ensure
|
|
71
|
-
praefect_node&.teardown
|
|
72
|
-
sql_node&.teardown
|
|
73
|
-
gitaly_primary_node&.teardown
|
|
74
|
-
gitaly_secondary_node&.teardown
|
|
75
|
-
gitaly_tertiary_node&.teardown
|
|
61
|
+
@praefect_node&.teardown
|
|
62
|
+
@sql_node&.teardown
|
|
63
|
+
@gitaly_primary_node&.teardown
|
|
64
|
+
@gitaly_secondary_node&.teardown
|
|
65
|
+
@gitaly_tertiary_node&.teardown
|
|
76
66
|
end
|
|
77
67
|
|
|
78
68
|
private
|
|
79
69
|
|
|
70
|
+
def start_gitaly_cluster(release)
|
|
71
|
+
Runtime::Logger.info("Starting Gitaly Cluster")
|
|
72
|
+
@gitaly_primary_node = gitaly(@primary_node_name, release)
|
|
73
|
+
@gitaly_secondary_node = gitaly(@secondary_node_name, release)
|
|
74
|
+
@gitaly_tertiary_node = gitaly(@tertiary_node_name, release)
|
|
75
|
+
|
|
76
|
+
@praefect_node = praefect(@praefect_node_name, release)
|
|
77
|
+
Runtime::Logger.info("Gitaly Cluster Ready")
|
|
78
|
+
end
|
|
79
|
+
|
|
80
80
|
def disable_other_services
|
|
81
81
|
<<~OMNIBUS
|
|
82
82
|
postgresql['enable'] = false;
|
|
@@ -191,6 +191,30 @@ module Gitlab
|
|
|
191
191
|
OMNIBUS
|
|
192
192
|
end
|
|
193
193
|
|
|
194
|
+
def praefect(name, release)
|
|
195
|
+
Component::Gitlab.new.tap do |praefect|
|
|
196
|
+
praefect.release = QA::Release.new(release)
|
|
197
|
+
praefect.name = name
|
|
198
|
+
praefect.network = @network
|
|
199
|
+
praefect.skip_availability_check = true
|
|
200
|
+
praefect.seed_admin_token = false
|
|
201
|
+
|
|
202
|
+
praefect.omnibus_configuration << praefect_omnibus_configuration
|
|
203
|
+
|
|
204
|
+
praefect.instance(skip_teardown: true)
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
def postgres
|
|
209
|
+
Component::PostgreSQL.new.tap do |sql|
|
|
210
|
+
sql.name = @database
|
|
211
|
+
sql.network = @network
|
|
212
|
+
sql.instance(skip_teardown: true) do
|
|
213
|
+
sql.run_psql '-d template1 -c "CREATE DATABASE praefect_production OWNER postgres"'
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
|
|
194
218
|
def gitaly(name, release)
|
|
195
219
|
Component::Gitlab.new.tap do |gitaly|
|
|
196
220
|
gitaly.release = QA::Release.new(release)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'yaml'
|
|
2
4
|
|
|
3
5
|
module Gitlab
|
|
@@ -8,12 +10,12 @@ module Gitlab
|
|
|
8
10
|
class LDAP < Scenario::Template
|
|
9
11
|
LDAP_PORT = 389
|
|
10
12
|
LDAP_TLS_PORT = 636
|
|
11
|
-
BASE_DN = 'dc=example,dc=org'
|
|
12
|
-
BIND_DN = 'cn=admin,dc=example,dc=org'
|
|
13
|
-
GROUP_BASE = 'ou=Global Groups,dc=example,dc=org'
|
|
14
|
-
ADMIN_GROUP = 'AdminGroup'
|
|
15
|
-
ADMIN_USER = 'admin'
|
|
16
|
-
ADMIN_PASSWORD = 'admin'
|
|
13
|
+
BASE_DN = 'dc=example,dc=org'
|
|
14
|
+
BIND_DN = 'cn=admin,dc=example,dc=org'
|
|
15
|
+
GROUP_BASE = 'ou=Global Groups,dc=example,dc=org'
|
|
16
|
+
ADMIN_GROUP = 'AdminGroup'
|
|
17
|
+
ADMIN_USER = 'admin'
|
|
18
|
+
ADMIN_PASSWORD = 'admin'
|
|
17
19
|
|
|
18
20
|
attr_reader :gitlab_name, :spec_suite, :tls, :ldap_name, :network, :orchestrate_ldap_server
|
|
19
21
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'json'
|
|
2
4
|
require 'uri'
|
|
3
5
|
|
|
@@ -7,7 +9,7 @@ module Gitlab
|
|
|
7
9
|
class DevEEQAImage
|
|
8
10
|
attr_reader :base_url
|
|
9
11
|
|
|
10
|
-
DEV_ADDRESS = 'https://dev.gitlab.org'
|
|
12
|
+
DEV_ADDRESS = 'https://dev.gitlab.org'
|
|
11
13
|
GITLAB_EE_QA_REPOSITORY_ID = 55
|
|
12
14
|
QAImageNotFoundError = Class.new(StandardError)
|
|
13
15
|
|
data/lib/gitlab/qa/version.rb
CHANGED
data/lib/gitlab/qa.rb
CHANGED
data/scripts/generate-qa-jobs.rb
CHANGED
|
@@ -48,7 +48,8 @@ class LicenseUsageSeed
|
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
def self.create_member(user, group_id)
|
|
51
|
-
|
|
51
|
+
# Excludes GUEST role based on ultimate license seat count
|
|
52
|
+
roles = [Gitlab::Access::REPORTER, Gitlab::Access::DEVELOPER, Gitlab::Access::MAINTAINER]
|
|
52
53
|
|
|
53
54
|
GroupMember.create(user_id: user.id, access_level: roles.sample, source_id: group_id)
|
|
54
55
|
Users::UpdateHighestMemberRoleService.new(user).execute
|
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.
|
|
4
|
+
version: 7.35.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: 2022-06-
|
|
11
|
+
date: 2022-06-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: climate_control
|