gitlab-qa 7.9.0 → 7.10.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 +2 -2
- data/.rubocop.yml +14 -8
- data/.rubocop_todo.yml +85 -16
- data/gitlab-qa.gemspec +4 -7
- data/lib/gitlab/qa/component/minio.rb +2 -2
- data/lib/gitlab/qa/component/specs.rb +1 -1
- data/lib/gitlab/qa/docker/shellout.rb +1 -1
- data/lib/gitlab/qa/runtime/env.rb +44 -87
- data/lib/gitlab/qa/scenario/test/integration/client_ssl.rb +1 -3
- data/lib/gitlab/qa/scenario/test/integration/geo.rb +0 -3
- data/lib/gitlab/qa/scenario/test/integration/gitaly_cluster.rb +0 -2
- data/lib/gitlab/qa/scenario/test/integration/kubernetes.rb +0 -2
- data/lib/gitlab/qa/scenario/test/integration/mtls.rb +0 -2
- data/lib/gitlab/qa/scenario/test/integration/ssh_tunnel.rb +0 -2
- data/lib/gitlab/qa/version.rb +1 -1
- metadata +12 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bdd2d8930d98c4af896a15b4f43a724a2c24300ae44d3498f7db96914592880
|
4
|
+
data.tar.gz: 3db21c904e7b711d167f465f9a75abe32526bf89edfa095e2551d91786962e6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fcfe4c12d04ebcb175e7fc7f7d3a282e2a759eb89e07cff001741d80b476658a033de10e32acd7ed05b6c1008025ad0dda15ecf6dd4e8b2f347eb4c9c023080
|
7
|
+
data.tar.gz: 70767539d91c219907646c5197127db1070317ea8038f2d01b7a5bcb150fcde36a6f6efad73c71357f8301069845b15c148fdf452a63c2a739a6c68eb229012f
|
data/.gitlab-ci.yml
CHANGED
@@ -55,7 +55,7 @@ variables:
|
|
55
55
|
.check-base:
|
56
56
|
stage: check
|
57
57
|
script:
|
58
|
-
- bundle exec $CI_JOB_NAME
|
58
|
+
- bundle exec $CI_JOB_NAME --color
|
59
59
|
|
60
60
|
rubocop:
|
61
61
|
extends: .check-base
|
@@ -884,7 +884,7 @@ ee:praefect:
|
|
884
884
|
- .ee-qa
|
885
885
|
- .knapsack-variables
|
886
886
|
- .rspec-report-opts
|
887
|
-
parallel:
|
887
|
+
parallel: 10
|
888
888
|
variables:
|
889
889
|
QA_SCENARIO: "Test::Integration::Praefect"
|
890
890
|
QA_CAN_TEST_PRAEFECT: "true"
|
data/.rubocop.yml
CHANGED
@@ -1,15 +1,21 @@
|
|
1
|
-
inherit_from: .rubocop_todo.yml
|
2
|
-
|
3
|
-
require:
|
4
|
-
# Due to a probably bug in rubocop (https://github.com/bbatsov/rubocop/issues/5251)
|
5
|
-
# we need to require rubocop-rspec a second time so that RSpec/FilePath does
|
6
|
-
# not fallback to Rails/FilePath.
|
7
|
-
- rubocop-rspec
|
8
|
-
|
9
1
|
inherit_gem:
|
10
2
|
gitlab-styles:
|
11
3
|
- rubocop-default.yml
|
12
4
|
|
5
|
+
inherit_from:
|
6
|
+
<% unless ENV['REVEAL_RUBOCOP_TODO'] == '1' %>
|
7
|
+
- '.rubocop_todo.yml'
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
Lint/HashCompareByIdentity:
|
11
|
+
Enabled: true
|
12
|
+
|
13
|
+
Lint/RedundantSafeNavigation:
|
14
|
+
Enabled: true
|
15
|
+
|
16
|
+
Style/ClassEqualityComparison:
|
17
|
+
Enabled: true
|
18
|
+
|
13
19
|
Lint/ShadowingOuterLocalVariable:
|
14
20
|
Enabled: false
|
15
21
|
|
data/.rubocop_todo.yml
CHANGED
@@ -1,17 +1,41 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2021-09-17 06:55:33 UTC using RuboCop version 0.93.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 165
|
10
10
|
# Cop supports --auto-correct.
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
CodeReuse/ActiveRecord:
|
12
|
+
Enabled: false
|
13
|
+
|
14
|
+
# Offense count: 2
|
15
|
+
# Cop supports --auto-correct.
|
16
|
+
Cop/LineBreakAroundConditionalBlock:
|
17
|
+
Exclude:
|
18
|
+
- 'lib/gitlab/qa/release.rb'
|
19
|
+
- 'lib/gitlab/qa/runtime/env.rb'
|
20
|
+
|
21
|
+
# Offense count: 1
|
22
|
+
# Configuration parameters: Include.
|
23
|
+
# Include: **/*.gemspec
|
24
|
+
Gemspec/RequiredRubyVersion:
|
25
|
+
Exclude:
|
26
|
+
- 'gitlab-qa.gemspec'
|
27
|
+
|
28
|
+
# Offense count: 1
|
29
|
+
Lint/ConstantDefinitionInBlock:
|
30
|
+
Exclude:
|
31
|
+
- 'spec/gitlab/qa/scenario/test/instance/deployment_base_spec.rb'
|
32
|
+
|
33
|
+
# Offense count: 5
|
34
|
+
Lint/MixedRegexpCaptureTypes:
|
35
|
+
Exclude:
|
36
|
+
- 'lib/gitlab/qa/release.rb'
|
37
|
+
- 'lib/gitlab/qa/report/relate_failure_issue.rb'
|
38
|
+
- 'lib/gitlab/qa/report/update_screenshot_path.rb'
|
15
39
|
|
16
40
|
# Offense count: 2
|
17
41
|
# Cop supports --auto-correct.
|
@@ -20,6 +44,13 @@ Lint/RedundantCopDisableDirective:
|
|
20
44
|
- 'lib/gitlab/qa/component/staging.rb'
|
21
45
|
- 'lib/gitlab/qa/runtime/scenario.rb'
|
22
46
|
|
47
|
+
# Offense count: 10
|
48
|
+
# Configuration parameters: IgnoredMethods.
|
49
|
+
Metrics/AbcSize:
|
50
|
+
Max: 26
|
51
|
+
IgnoredMethods:
|
52
|
+
- perform
|
53
|
+
|
23
54
|
# Offense count: 1
|
24
55
|
# Cop supports --auto-correct.
|
25
56
|
# Configuration parameters: PreferredName.
|
@@ -33,6 +64,13 @@ Performance/RegexpMatch:
|
|
33
64
|
Exclude:
|
34
65
|
- 'lib/gitlab/qa/component/gitlab.rb'
|
35
66
|
|
67
|
+
# Offense count: 1
|
68
|
+
# Cop supports --auto-correct.
|
69
|
+
# Configuration parameters: AutoCorrect.
|
70
|
+
Performance/StringInclude:
|
71
|
+
Exclude:
|
72
|
+
- 'lib/gitlab/qa/component/gitlab.rb'
|
73
|
+
|
36
74
|
# Offense count: 3
|
37
75
|
# Cop supports --auto-correct.
|
38
76
|
RSpec/EmptyLineAfterLetBlock:
|
@@ -51,7 +89,18 @@ RSpec/LeakyConstantDeclaration:
|
|
51
89
|
Exclude:
|
52
90
|
- 'spec/gitlab/qa/scenario/test/instance/deployment_base_spec.rb'
|
53
91
|
|
54
|
-
# Offense count:
|
92
|
+
# Offense count: 221
|
93
|
+
# Configuration parameters: AllowSubject.
|
94
|
+
RSpec/MultipleMemoizedHelpers:
|
95
|
+
Max: 22
|
96
|
+
|
97
|
+
# Offense count: 1
|
98
|
+
# Cop supports --auto-correct.
|
99
|
+
Style/ExplicitBlockArgument:
|
100
|
+
Exclude:
|
101
|
+
- 'lib/gitlab/qa/scenario/test/integration/ldap.rb'
|
102
|
+
|
103
|
+
# Offense count: 86
|
55
104
|
# Cop supports --auto-correct.
|
56
105
|
# Configuration parameters: EnforcedStyle.
|
57
106
|
# SupportedStyles: always, always_true, never
|
@@ -64,21 +113,19 @@ Style/HashTransformKeys:
|
|
64
113
|
Exclude:
|
65
114
|
- 'lib/gitlab/qa/docker/volumes.rb'
|
66
115
|
|
67
|
-
# Offense count:
|
116
|
+
# Offense count: 1
|
117
|
+
# Cop supports --auto-correct.
|
118
|
+
Style/HashTransformation:
|
119
|
+
Exclude:
|
120
|
+
- 'lib/gitlab/qa/docker/volumes.rb'
|
121
|
+
|
122
|
+
# Offense count: 3
|
68
123
|
# Cop supports --auto-correct.
|
69
124
|
Style/IfUnlessModifier:
|
70
125
|
Exclude:
|
71
|
-
- 'lib/gitlab/qa/component/gitlab.rb'
|
72
|
-
- 'lib/gitlab/qa/release.rb'
|
73
126
|
- 'lib/gitlab/qa/runtime/env.rb'
|
74
127
|
- 'lib/gitlab/qa/runtime/scenario.rb'
|
75
128
|
- 'lib/gitlab/qa/scenario/test/omnibus/upgrade.rb'
|
76
|
-
- 'lib/gitlab/qa/support/http_request.rb'
|
77
|
-
|
78
|
-
# Offense count: 1
|
79
|
-
Style/MethodMissingSuper:
|
80
|
-
Exclude:
|
81
|
-
- 'lib/gitlab/qa/runtime/scenario.rb'
|
82
129
|
|
83
130
|
# Offense count: 1
|
84
131
|
Style/MissingRespondToMissing:
|
@@ -96,3 +143,25 @@ Style/MutableConstant:
|
|
96
143
|
- 'db/geo/migrate/**/*'
|
97
144
|
- 'lib/gitlab/qa/release.rb'
|
98
145
|
- 'lib/gitlab/qa/report/update_screenshot_path.rb'
|
146
|
+
|
147
|
+
# Offense count: 9
|
148
|
+
# Cop supports --auto-correct.
|
149
|
+
Style/RedundantRegexpEscape:
|
150
|
+
Exclude:
|
151
|
+
- 'lib/gitlab/qa/release.rb'
|
152
|
+
- 'lib/gitlab/qa/report/generate_test_session.rb'
|
153
|
+
- 'lib/gitlab/qa/report/relate_failure_issue.rb'
|
154
|
+
- 'lib/gitlab/qa/report/update_screenshot_path.rb'
|
155
|
+
|
156
|
+
# Offense count: 1
|
157
|
+
# Cop supports --auto-correct.
|
158
|
+
Style/StringConcatenation:
|
159
|
+
Exclude:
|
160
|
+
- 'lib/gitlab/qa/reporter.rb'
|
161
|
+
|
162
|
+
# Offense count: 126
|
163
|
+
# Cop supports --auto-correct.
|
164
|
+
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
165
|
+
# URISchemes: http, https
|
166
|
+
Layout/LineLength:
|
167
|
+
Max: 192
|
data/gitlab-qa.gemspec
CHANGED
@@ -20,19 +20,16 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ['lib']
|
22
22
|
|
23
|
-
# Some dependencies are pinned, to prevent new cops from breaking the CI pipelines
|
24
23
|
spec.add_development_dependency 'climate_control', '~> 0.2'
|
25
|
-
spec.add_development_dependency 'gitlab-styles', '~>
|
24
|
+
spec.add_development_dependency 'gitlab-styles', '~> 6.2.1'
|
26
25
|
spec.add_development_dependency 'pry', '~> 0.11'
|
27
|
-
spec.add_development_dependency 'rake', '~>
|
26
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
28
27
|
spec.add_development_dependency 'rspec', '~> 3.7'
|
29
|
-
spec.add_development_dependency 'rubocop', '~> 0.82.0'
|
30
|
-
spec.add_development_dependency 'rubocop-rspec', '~> 1.36'
|
31
28
|
spec.add_development_dependency 'solargraph', '~> 0.41'
|
32
29
|
spec.add_development_dependency 'webmock', '3.7.0'
|
33
|
-
spec.add_runtime_dependency 'activesupport', '~> 6.
|
30
|
+
spec.add_runtime_dependency 'activesupport', '~> 6.1'
|
34
31
|
spec.add_runtime_dependency 'gitlab', '~> 4.16.1'
|
35
|
-
spec.add_runtime_dependency 'http', '
|
32
|
+
spec.add_runtime_dependency 'http', '~> 5.0'
|
36
33
|
spec.add_runtime_dependency 'nokogiri', '~> 1.10'
|
37
34
|
spec.add_runtime_dependency 'table_print', '1.5.7'
|
38
35
|
end
|
@@ -9,7 +9,7 @@ module Gitlab
|
|
9
9
|
module Component
|
10
10
|
class Minio < Base
|
11
11
|
DOCKER_IMAGE = 'minio/minio'.freeze
|
12
|
-
DOCKER_IMAGE_TAG = '
|
12
|
+
DOCKER_IMAGE_TAG = 'RELEASE.2021-09-15T04-54-25Z'.freeze
|
13
13
|
# These are secrets used in a local Minio container, they're not used for any online S3 server.
|
14
14
|
AWS_ACCESS_KEY = 'AKIAIOSFODNN7EXAMPLE'.freeze
|
15
15
|
AWS_SECRET_KEY = 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'.freeze
|
@@ -19,7 +19,7 @@ module Gitlab
|
|
19
19
|
def initialize
|
20
20
|
super
|
21
21
|
|
22
|
-
@environment = {
|
22
|
+
@environment = { MINIO_ROOT_USER: AWS_ACCESS_KEY, MINIO_ROOT_PASSWORD: AWS_SECRET_KEY }
|
23
23
|
@volumes = { host_data_dir => DATA_DIR }
|
24
24
|
@buckets = []
|
25
25
|
end
|
@@ -13,7 +13,7 @@ module Gitlab
|
|
13
13
|
puts "Docker shell command: `#{@command.mask_secrets}`"
|
14
14
|
end
|
15
15
|
|
16
|
-
def execute!
|
16
|
+
def execute! # rubocop:disable Metrics/AbcSize
|
17
17
|
raise StatusError, 'Command already executed' if @output.any?
|
18
18
|
|
19
19
|
Open3.popen2e(@command.to_s) do |_in, out, wait|
|
@@ -49,6 +49,9 @@ module Gitlab
|
|
49
49
|
'GITLAB_SANDBOX_NAME' => :gitlab_sandbox_name,
|
50
50
|
'GITLAB_QA_ACCESS_TOKEN' => :qa_access_token,
|
51
51
|
'GITLAB_QA_ADMIN_ACCESS_TOKEN' => :qa_admin_access_token,
|
52
|
+
'GITLAB_QA_DEV_ACCESS_TOKEN' => :qa_dev_access_token,
|
53
|
+
'GITLAB_QA_CONTAINER_REGISTRY_ACCESS_TOKEN' => :qa_container_registry_access_token,
|
54
|
+
'GITLAB_QA_ISSUE_URL' => :qa_issue_url,
|
52
55
|
'GITHUB_ACCESS_TOKEN' => :github_access_token,
|
53
56
|
'GITLAB_URL' => :gitlab_url,
|
54
57
|
'SIMPLE_SAML_HOSTNAME' => :simple_saml_hostname,
|
@@ -60,6 +63,7 @@ module Gitlab
|
|
60
63
|
'CLOUDSDK_CORE_PROJECT' => :cloudsdk_core_project,
|
61
64
|
'GCLOUD_REGION' => :gcloud_region,
|
62
65
|
'SIGNUP_DISABLED' => :signup_disabled,
|
66
|
+
'GITLAB_CI_API_TOKEN' => :gitlab_ci_api_token,
|
63
67
|
'GITLAB_QA_USERNAME_1' => :gitlab_qa_username_1,
|
64
68
|
'GITLAB_QA_PASSWORD_1' => :gitlab_qa_password_1,
|
65
69
|
'GITLAB_QA_USERNAME_2' => :gitlab_qa_username_2,
|
@@ -71,17 +75,24 @@ module Gitlab
|
|
71
75
|
'KNAPSACK_TEST_FILE_PATTERN' => :knapsack_test_file_pattern,
|
72
76
|
'KNAPSACK_TEST_DIR' => :knapsack_test_dir,
|
73
77
|
'CI' => :ci,
|
78
|
+
'CI_COMMIT_REF_NAME' => :ci_commit_ref_name,
|
74
79
|
'CI_JOB_NAME' => :ci_job_name,
|
75
80
|
'CI_JOB_URL' => :ci_job_url,
|
81
|
+
'CI_JOB_TOKEN' => :ci_job_token,
|
76
82
|
'CI_RUNNER_ID' => :ci_runner_id,
|
77
83
|
'CI_SERVER_HOST' => :ci_server_host,
|
78
84
|
'CI_SERVER_PERSONAL_ACCESS_TOKEN' => :ci_server_personal_access_token,
|
79
85
|
'CI_NODE_INDEX' => :ci_node_index,
|
80
86
|
'CI_NODE_TOTAL' => :ci_node_total,
|
87
|
+
'CI_PROJECT_ID' => :ci_project_id,
|
81
88
|
'CI_PROJECT_NAME' => :ci_project_name,
|
82
89
|
'CI_SLACK_WEBHOOK_URL' => :ci_slack_webhook_url,
|
90
|
+
'CI_PIPELINE_ID' => :ci_pipeline_id,
|
91
|
+
'CI_PIPELINE_SOURCE' => :ci_pipeline_source,
|
92
|
+
'CI_PIPELINE_URL' => :ci_pipeline_url,
|
83
93
|
'CI_PIPELINE_CREATED_AT' => :ci_pipeline_created_at,
|
84
94
|
'CI_MERGE_REQUEST_IID' => :ci_merge_request_iid,
|
95
|
+
'CI_API_V4_URL' => :ci_api_v4_url,
|
85
96
|
'GITLAB_CI' => :gitlab_ci,
|
86
97
|
'ELASTIC_URL' => :elastic_url,
|
87
98
|
'GITLAB_QA_LOOP_RUNNER_MINUTES' => :gitlab_qa_loop_runner_minutes,
|
@@ -108,20 +119,32 @@ module Gitlab
|
|
108
119
|
'GOOGLE_PROJECT' => :google_project,
|
109
120
|
'GOOGLE_CLIENT_EMAIL' => :google_client_email,
|
110
121
|
'GOOGLE_JSON_KEY' => :google_json_key,
|
111
|
-
'GCS_BUCKET_NAME' => :gcs_bucket_name
|
122
|
+
'GCS_BUCKET_NAME' => :gcs_bucket_name,
|
123
|
+
'SMOKE_ONLY' => :smoke_only,
|
124
|
+
'NO_ADMIN' => :no_admin
|
112
125
|
}.freeze
|
113
126
|
|
114
127
|
ENV_VARIABLES.each do |env_name, method_name|
|
115
128
|
attr_writer(method_name)
|
116
129
|
|
117
130
|
define_method(method_name) do
|
118
|
-
ENV[env_name] ||
|
119
|
-
if instance_variable_defined?("@#{method_name}")
|
120
|
-
instance_variable_get("@#{method_name}")
|
121
|
-
end
|
131
|
+
ENV[env_name] || (instance_variable_get("@#{method_name}") if instance_variable_defined?("@#{method_name}"))
|
122
132
|
end
|
123
133
|
end
|
124
134
|
|
135
|
+
def variables
|
136
|
+
vars = {}
|
137
|
+
|
138
|
+
ENV_VARIABLES.each do |name, attribute|
|
139
|
+
# Variables that are overridden in the environment take precedence
|
140
|
+
# over the defaults specified by the QA runtime.
|
141
|
+
value = env_value_if_defined(name) || send(attribute) # rubocop:disable GitlabSecurity/PublicSend
|
142
|
+
vars[name] = value if value
|
143
|
+
end
|
144
|
+
|
145
|
+
vars
|
146
|
+
end
|
147
|
+
|
125
148
|
def default_branch
|
126
149
|
ENV['QA_DEFAULT_BRANCH'] || 'main'
|
127
150
|
end
|
@@ -142,42 +165,6 @@ module Gitlab
|
|
142
165
|
ENV['GITLAB_API_BASE'] || 'https://gitlab.com/api/v4'
|
143
166
|
end
|
144
167
|
|
145
|
-
def gitlab_ci_api_token
|
146
|
-
ENV['GITLAB_CI_API_TOKEN']
|
147
|
-
end
|
148
|
-
|
149
|
-
def ci_api_v4_url
|
150
|
-
ENV['CI_API_V4_URL']
|
151
|
-
end
|
152
|
-
|
153
|
-
def ci_job_name
|
154
|
-
ENV['CI_JOB_NAME']
|
155
|
-
end
|
156
|
-
|
157
|
-
def ci_job_token
|
158
|
-
ENV['CI_JOB_TOKEN']
|
159
|
-
end
|
160
|
-
|
161
|
-
def ci_pipeline_source
|
162
|
-
ENV['CI_PIPELINE_SOURCE']
|
163
|
-
end
|
164
|
-
|
165
|
-
def ci_pipeline_url
|
166
|
-
ENV['CI_PIPELINE_URL']
|
167
|
-
end
|
168
|
-
|
169
|
-
def ci_pipeline_id
|
170
|
-
ENV['CI_PIPELINE_ID']
|
171
|
-
end
|
172
|
-
|
173
|
-
def ci_project_id
|
174
|
-
ENV['CI_PROJECT_ID']
|
175
|
-
end
|
176
|
-
|
177
|
-
def ci_commit_ref_name
|
178
|
-
ENV['CI_COMMIT_REF_NAME']
|
179
|
-
end
|
180
|
-
|
181
168
|
def pipeline_from_project_name
|
182
169
|
if ci_project_name.to_s.start_with?('gitlab-qa')
|
183
170
|
if ENV['TOP_UPSTREAM_SOURCE_JOB'].to_s.start_with?('https://ops.gitlab.net')
|
@@ -198,22 +185,10 @@ module Gitlab
|
|
198
185
|
env_value_if_defined('GITLAB_QA_DEV_ACCESS_TOKEN')
|
199
186
|
end
|
200
187
|
|
201
|
-
def qa_dev_access_token
|
202
|
-
ENV['GITLAB_QA_DEV_ACCESS_TOKEN']
|
203
|
-
end
|
204
|
-
|
205
188
|
def initial_root_password
|
206
189
|
ENV['GITLAB_INITIAL_ROOT_PASSWORD'] || '5iveL!fe'
|
207
190
|
end
|
208
191
|
|
209
|
-
def qa_container_registry_access_token
|
210
|
-
ENV['GITLAB_QA_CONTAINER_REGISTRY_ACCESS_TOKEN']
|
211
|
-
end
|
212
|
-
|
213
|
-
def qa_issue_url
|
214
|
-
ENV['GITLAB_QA_ISSUE_URL']
|
215
|
-
end
|
216
|
-
|
217
192
|
def deploy_environment
|
218
193
|
ENV['DEPLOY_ENVIRONMENT'] || pipeline_from_project_name
|
219
194
|
end
|
@@ -226,35 +201,6 @@ module Gitlab
|
|
226
201
|
ENV['ELASTIC_VERSION'] || '6.4.2'.freeze
|
227
202
|
end
|
228
203
|
|
229
|
-
def aws_s3_region
|
230
|
-
ENV['AWS_S3_REGION']
|
231
|
-
end
|
232
|
-
|
233
|
-
def aws_s3_key_id
|
234
|
-
ENV['AWS_S3_KEY_ID']
|
235
|
-
end
|
236
|
-
|
237
|
-
def aws_s3_access_key
|
238
|
-
ENV['AWS_S3_ACCESS_KEY']
|
239
|
-
end
|
240
|
-
|
241
|
-
def aws_s3_bucket_name
|
242
|
-
ENV['AWS_S3_BUCKET_NAME']
|
243
|
-
end
|
244
|
-
|
245
|
-
def variables
|
246
|
-
vars = {}
|
247
|
-
|
248
|
-
ENV_VARIABLES.each do |name, attribute|
|
249
|
-
# Variables that are overridden in the environment take precedence
|
250
|
-
# over the defaults specified by the QA runtime.
|
251
|
-
value = env_value_if_defined(name) || send(attribute) # rubocop:disable GitlabSecurity/PublicSend
|
252
|
-
vars[name] = value if value
|
253
|
-
end
|
254
|
-
|
255
|
-
vars
|
256
|
-
end
|
257
|
-
|
258
204
|
def require_license!
|
259
205
|
return if ENV.include?('EE_LICENSE')
|
260
206
|
|
@@ -293,31 +239,42 @@ module Gitlab
|
|
293
239
|
|
294
240
|
def require_kubernetes_environment!
|
295
241
|
%w[GCLOUD_ACCOUNT_EMAIL GCLOUD_ACCOUNT_KEY CLOUDSDK_CORE_PROJECT].each do |env_key|
|
296
|
-
|
242
|
+
unless ENV.key?(env_key)
|
243
|
+
raise ArgumentError, "Environment variable #{env_key} must be set to run kubernetes specs"
|
244
|
+
end
|
297
245
|
end
|
298
246
|
end
|
299
247
|
|
300
248
|
def require_aws_s3_environment!
|
301
249
|
%w[AWS_S3_REGION AWS_S3_KEY_ID AWS_S3_ACCESS_KEY AWS_S3_BUCKET_NAME].each do |env_key|
|
302
|
-
|
250
|
+
unless ENV.key?(env_key)
|
251
|
+
raise ArgumentError, "Environment variable #{env_key} must be set to run AWS S3 object storage specs"
|
252
|
+
end
|
303
253
|
end
|
304
254
|
end
|
305
255
|
|
306
256
|
def require_gcs_environment!
|
307
257
|
%w[GOOGLE_PROJECT GOOGLE_CLIENT_EMAIL GOOGLE_JSON_KEY GCS_BUCKET_NAME].each do |env_key|
|
308
|
-
|
258
|
+
unless ENV.key?(env_key)
|
259
|
+
raise ArgumentError, "Environment variable #{env_key} must be set to run GCS object storage specs"
|
260
|
+
end
|
309
261
|
end
|
310
262
|
end
|
311
263
|
|
312
264
|
def require_initial_password!
|
313
265
|
return unless ENV['GITLAB_INITIAL_ROOT_PASSWORD'].to_s.strip.empty?
|
314
266
|
|
315
|
-
raise
|
267
|
+
raise(
|
268
|
+
ArgumentError,
|
269
|
+
"Environment variable GITLAB_INITIAL_ROOT_PASSWORD must be provided to set an initial root password."
|
270
|
+
)
|
316
271
|
end
|
317
272
|
|
318
273
|
def require_ssh_tunnel!
|
319
274
|
%w[TUNNEL_SSH_PRIVATE_KEY TUNNEL_SERVER_HOSTNAME TUNNEL_SSH_USER].each do |env_key|
|
320
|
-
|
275
|
+
unless ENV.key?(env_key)
|
276
|
+
raise ArgumentError, "Environment variable #{env_key} must be set to run tunnel specs"
|
277
|
+
end
|
321
278
|
end
|
322
279
|
end
|
323
280
|
|
@@ -12,7 +12,6 @@ module Gitlab
|
|
12
12
|
@tag = 'client_ssl'
|
13
13
|
end
|
14
14
|
|
15
|
-
# rubocop:disable Metrics/AbcSize
|
16
15
|
def perform(release, *rspec_args)
|
17
16
|
Component::Gitlab.perform do |gitlab|
|
18
17
|
gitlab.release = QA::Release.new(release)
|
@@ -42,7 +41,6 @@ module Gitlab
|
|
42
41
|
end
|
43
42
|
end
|
44
43
|
end
|
45
|
-
# rubocop:enable Metrics/AbcSize
|
46
44
|
|
47
45
|
def gitlab_omnibus
|
48
46
|
<<~OMNIBUS
|
@@ -53,7 +51,7 @@ module Gitlab
|
|
53
51
|
nginx['ssl_certificate_key'] = '/etc/gitlab/ssl/gitlab.test.key';
|
54
52
|
|
55
53
|
nginx['ssl_verify_client'] = 'on';
|
56
|
-
nginx['ssl_client_certificate'] = '/etc/gitlab/
|
54
|
+
nginx['ssl_client_certificate'] = '/etc/gitlab/trusted-certs/ca.pem';
|
57
55
|
nginx['ssl_verify_depth'] = '2';
|
58
56
|
OMNIBUS
|
59
57
|
end
|
@@ -19,7 +19,6 @@ module Gitlab
|
|
19
19
|
@tag = 'gitaly_cluster'
|
20
20
|
end
|
21
21
|
|
22
|
-
# rubocop:disable Metrics/AbcSize
|
23
22
|
def perform(release, *rspec_args)
|
24
23
|
gitaly_primary_node = gitaly(@primary_node_name, release)
|
25
24
|
gitaly_secondary_node = gitaly(@secondary_node_name, release)
|
@@ -74,7 +73,6 @@ module Gitlab
|
|
74
73
|
gitaly_secondary_node&.teardown
|
75
74
|
gitaly_tertiary_node&.teardown
|
76
75
|
end
|
77
|
-
# rubocop:enable Metrics/AbcSize
|
78
76
|
|
79
77
|
private
|
80
78
|
|
@@ -6,7 +6,6 @@ module Gitlab
|
|
6
6
|
module Test
|
7
7
|
module Integration
|
8
8
|
class Kubernetes < Scenario::Template
|
9
|
-
# rubocop:disable Metrics/AbcSize
|
10
9
|
def perform(release, *rspec_args)
|
11
10
|
Runtime::Env.require_kubernetes_environment!
|
12
11
|
|
@@ -47,7 +46,6 @@ module Gitlab
|
|
47
46
|
end
|
48
47
|
end
|
49
48
|
end
|
50
|
-
# rubocop:enable Metrics/AbcSize
|
51
49
|
end
|
52
50
|
end
|
53
51
|
end
|
@@ -13,7 +13,6 @@ module Gitlab
|
|
13
13
|
@tag = 'mtls'
|
14
14
|
end
|
15
15
|
|
16
|
-
# rubocop:disable Metrics/AbcSize
|
17
16
|
def perform(release, *rspec_args)
|
18
17
|
Component::Gitlab.perform do |gitaly|
|
19
18
|
gitaly.release = QA::Release.new(release)
|
@@ -53,7 +52,6 @@ module Gitlab
|
|
53
52
|
end
|
54
53
|
end
|
55
54
|
end
|
56
|
-
# rubocop:enable Metrics/AbcSize
|
57
55
|
|
58
56
|
def gitlab_omnibus
|
59
57
|
<<~OMNIBUS
|
@@ -6,7 +6,6 @@ module Gitlab
|
|
6
6
|
module Test
|
7
7
|
module Integration
|
8
8
|
class SSHTunnel < Scenario::Template
|
9
|
-
# rubocop:disable Metrics/AbcSize
|
10
9
|
def perform(release, *rspec_args)
|
11
10
|
Runtime::Env.override_default_password!
|
12
11
|
Runtime::Env.require_ssh_tunnel!
|
@@ -49,7 +48,6 @@ module Gitlab
|
|
49
48
|
end
|
50
49
|
end
|
51
50
|
end
|
52
|
-
# rubocop:enable Metrics/AbcSize
|
53
51
|
end
|
54
52
|
end
|
55
53
|
end
|
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.
|
4
|
+
version: 7.10.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-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 6.2.1
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 6.2.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pry
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '13.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '13.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,34 +80,6 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '3.7'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rubocop
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: 0.82.0
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: 0.82.0
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rubocop-rspec
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '1.36'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '1.36'
|
111
83
|
- !ruby/object:Gem::Dependency
|
112
84
|
name: solargraph
|
113
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +114,14 @@ dependencies:
|
|
142
114
|
requirements:
|
143
115
|
- - "~>"
|
144
116
|
- !ruby/object:Gem::Version
|
145
|
-
version: 6.
|
117
|
+
version: '6.1'
|
146
118
|
type: :runtime
|
147
119
|
prerelease: false
|
148
120
|
version_requirements: !ruby/object:Gem::Requirement
|
149
121
|
requirements:
|
150
122
|
- - "~>"
|
151
123
|
- !ruby/object:Gem::Version
|
152
|
-
version: 6.
|
124
|
+
version: '6.1'
|
153
125
|
- !ruby/object:Gem::Dependency
|
154
126
|
name: gitlab
|
155
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -168,16 +140,16 @@ dependencies:
|
|
168
140
|
name: http
|
169
141
|
requirement: !ruby/object:Gem::Requirement
|
170
142
|
requirements:
|
171
|
-
- -
|
143
|
+
- - "~>"
|
172
144
|
- !ruby/object:Gem::Version
|
173
|
-
version:
|
145
|
+
version: '5.0'
|
174
146
|
type: :runtime
|
175
147
|
prerelease: false
|
176
148
|
version_requirements: !ruby/object:Gem::Requirement
|
177
149
|
requirements:
|
178
|
-
- -
|
150
|
+
- - "~>"
|
179
151
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
152
|
+
version: '5.0'
|
181
153
|
- !ruby/object:Gem::Dependency
|
182
154
|
name: nokogiri
|
183
155
|
requirement: !ruby/object:Gem::Requirement
|