gitlab-qa 11.3.0 → 12.0.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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/.gitlab-ci.yml +3 -1
  4. data/.rubocop.yml +13 -2
  5. data/.rubocop_todo.yml +57 -85
  6. data/Gemfile.lock +44 -36
  7. data/gitlab-qa.gemspec +4 -2
  8. data/lib/gitlab/qa/component/base.rb +9 -9
  9. data/lib/gitlab/qa/component/gitaly.rb +2 -2
  10. data/lib/gitlab/qa/component/gitaly_cluster.rb +14 -8
  11. data/lib/gitlab/qa/component/gitlab.rb +15 -14
  12. data/lib/gitlab/qa/component/mail_hog.rb +1 -0
  13. data/lib/gitlab/qa/component/praefect.rb +2 -2
  14. data/lib/gitlab/qa/component/selenoid.rb +6 -4
  15. data/lib/gitlab/qa/component/specs.rb +5 -2
  16. data/lib/gitlab/qa/component/staging.rb +4 -4
  17. data/lib/gitlab/qa/component/telegraf.rb +2 -1
  18. data/lib/gitlab/qa/docker/engine.rb +6 -3
  19. data/lib/gitlab/qa/docker/volumes.rb +1 -1
  20. data/lib/gitlab/qa/release.rb +4 -4
  21. data/lib/gitlab/qa/runner.rb +10 -3
  22. data/lib/gitlab/qa/runtime/env.rb +16 -19
  23. data/lib/gitlab/qa/runtime/logger.rb +1 -1
  24. data/lib/gitlab/qa/runtime/omnibus_configuration.rb +1 -0
  25. data/lib/gitlab/qa/runtime/omnibus_configurations/object_storage_gcs.rb +2 -1
  26. data/lib/gitlab/qa/runtime/scenario.rb +1 -5
  27. data/lib/gitlab/qa/scenario/actable.rb +4 -4
  28. data/lib/gitlab/qa/scenario/test/instance/airgapped.rb +2 -2
  29. data/lib/gitlab/qa/scenario/test/instance/deployment_base.rb +2 -1
  30. data/lib/gitlab/qa/scenario/test/integration/group_saml.rb +1 -1
  31. data/lib/gitlab/qa/scenario/test/integration/ldap.rb +5 -6
  32. data/lib/gitlab/qa/scenario/test/integration/oauth.rb +6 -3
  33. data/lib/gitlab/qa/scenario/test/omnibus/update_from_previous.rb +1 -1
  34. data/lib/gitlab/qa/scenario/test/omnibus/upgrade.rb +1 -3
  35. data/lib/gitlab/qa/scenario/test/sanity/version.rb +1 -1
  36. data/lib/gitlab/qa/support/config_scripts.rb +1 -1
  37. data/lib/gitlab/qa/support/gitlab_version_info.rb +3 -5
  38. data/lib/gitlab/qa/support/shell_command.rb +1 -0
  39. data/lib/gitlab/qa/test_logger.rb +2 -2
  40. data/lib/gitlab/qa/version.rb +1 -1
  41. data/support/data/admin_access_token_seed.rb +1 -0
  42. data/support/data/license_usage_seed.rb +3 -1
  43. metadata +13 -8
  44. data/lib/gitlab/qa/runtime/omnibus_configurations/packages.rb +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88c544ee8f1f83271ae1d95a95b85d48bdc8d1abda530e8c63925c151972a38d
4
- data.tar.gz: 8f99edf998bf8bb342f5083f1f9bfbcd69ba64143cacf509553e0380e24acc7b
3
+ metadata.gz: 44c3f1975df510d4b2f4405391b5dc55fdbca1015e648733c9f51ed7a824579c
4
+ data.tar.gz: 79b8b01d8ec055ef029993a0c9a02730b99880f8292b5d4d00bba1d6cc68f073
5
5
  SHA512:
6
- metadata.gz: 2c3ba16fb6771ba6302e074ec9d89b3b884ddaccff171f205453d82fb5aa1fb4a9b7356397f23847f9579e0c8f1e1031fc1dded51a99d86dec13595989b7d802
7
- data.tar.gz: 998a6798f90d4b9c7ed7836d2ef82409b8fcd622dc92f23a914781e8eb21f428c8ad658b7111d8403a5d1718a176c750e71a69087c0c99cf558f52724b007570
6
+ metadata.gz: ed8cc183055d3381e0b356805680a6317df4a07a67f697fd9f8f8c3d558391602653d14b18ed648c681bbdada0dcd8b5a23d113da0115becf7b152279f407e82
7
+ data.tar.gz: 20b95e74a751ff88f871511cbf8fe30332fac52f6f80fdf59c03201bbb2bca0f50a65bed640a01f61e0cb8d8395c15359fa55906a3b6ede2a863417e17b1e810
data/.gitignore CHANGED
@@ -6,11 +6,11 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /.idea
9
+ /vendor/bundle
9
10
  .ruby-version
10
11
  .ruby-gemset
11
12
  .DS_Store
12
13
  .rakeTasks
13
14
  .tool-versions
14
-
15
15
  # ignore built gems
16
16
  *.gem
data/.gitlab-ci.yml CHANGED
@@ -20,7 +20,7 @@ stages:
20
20
  - deploy
21
21
 
22
22
  default:
23
- image: ${CI_REGISTRY}/gitlab-org/gitlab-build-images/debian-bullseye-ruby-${RUBY_VERSION}:bundler-2.3
23
+ image: ${CI_REGISTRY}/gitlab-org/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}:bundler-2.3
24
24
  tags:
25
25
  - gitlab-org
26
26
  cache:
@@ -41,6 +41,7 @@ workflow:
41
41
  - if: '$CI_PIPELINE_SOURCE == "web"'
42
42
 
43
43
  variables:
44
+ DEBIAN_VERSION: bullseye
44
45
  RUBY_VERSION: "3.0"
45
46
  BUNDLE_PATH: vendor
46
47
  BUNDLE_SILENCE_ROOT_WARNING: "true"
@@ -133,6 +134,7 @@ package-and-test:
133
134
  inherit:
134
135
  variables:
135
136
  - RUBY_VERSION
137
+ - DEBIAN_VERSION
136
138
  when: manual
137
139
  trigger:
138
140
  strategy: depend
data/.rubocop.yml CHANGED
@@ -7,6 +7,11 @@ inherit_from:
7
7
  - '.rubocop_todo.yml'
8
8
  <% end %>
9
9
 
10
+ AllCops:
11
+ NewCops: enable
12
+ SuggestExtensions: false
13
+ TargetRubyVersion: 3.0
14
+
10
15
  Lint/HashCompareByIdentity:
11
16
  Enabled: true
12
17
 
@@ -41,5 +46,11 @@ RSpec/MultipleMemoizedHelpers:
41
46
  Enabled: false
42
47
 
43
48
  CodeReuse/ActiveRecord:
44
- Exclude:
45
- - 'spec/**/*_spec.rb'
49
+ Enabled: false
50
+
51
+ Style/OperatorMethodCall:
52
+ Enabled: false
53
+
54
+ # disable for now as it might break automatic publish
55
+ Gemspec/RequireMFA:
56
+ Enabled: false
data/.rubocop_todo.yml CHANGED
@@ -1,123 +1,95 @@
1
1
  # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2022-06-21 18:16:41 UTC using RuboCop version 0.93.1.
2
+ # `rubocop --auto-gen-config --no-exclude-limit`
3
+ # on 2023-06-14 08:01:25 UTC using RuboCop version 1.43.0.
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: 199
10
- # Cop supports --auto-correct.
11
- CodeReuse/ActiveRecord:
12
- Enabled: false
13
-
14
- # Offense count: 1
15
- # Cop supports --auto-correct.
16
- Cop/LineBreakAroundConditionalBlock:
17
- Exclude:
18
- - 'lib/gitlab/qa/release.rb'
19
-
20
9
  # Offense count: 1
21
- # Configuration parameters: Include.
22
- # Include: **/*.gemspec
23
- Gemspec/RequiredRubyVersion:
10
+ Cop/AvoidReturnFromBlocks:
24
11
  Exclude:
25
- - 'gitlab-qa.gemspec'
12
+ - 'lib/gitlab/qa/scenario/template.rb'
26
13
 
27
14
  # Offense count: 1
15
+ # Configuration parameters: AllowedMethods.
16
+ # AllowedMethods: enums
28
17
  Lint/ConstantDefinitionInBlock:
29
18
  Exclude:
30
19
  - 'spec/gitlab/qa/scenario/test/instance/deployment_base_spec.rb'
31
20
 
32
21
  # Offense count: 5
33
- Lint/MixedRegexpCaptureTypes:
22
+ # Configuration parameters: AllowComments, AllowEmptyLambdas.
23
+ Lint/EmptyBlock:
34
24
  Exclude:
35
- - 'lib/gitlab/qa/release.rb'
25
+ - 'spec/gitlab/qa/component/gitlab_spec.rb'
26
+ - 'spec/gitlab/qa/docker/engine_spec.rb'
36
27
 
37
- # Offense count: 2
38
- # Cop supports --auto-correct.
39
- Lint/RedundantCopDisableDirective:
28
+ # Offense count: 3
29
+ Lint/MixedRegexpCaptureTypes:
40
30
  Exclude:
41
- - 'lib/gitlab/qa/component/staging.rb'
42
- - 'lib/gitlab/qa/runtime/scenario.rb'
31
+ - 'lib/gitlab/qa/release.rb'
43
32
 
44
- # Offense count: 21
45
- # Configuration parameters: IgnoredMethods.
33
+ # Offense count: 22
34
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes.
46
35
  Metrics/AbcSize:
47
- Max: 60
48
- IgnoredMethods:
49
- - perform
50
-
51
- # Offense count: 1
52
- # Cop supports --auto-correct.
53
- # Configuration parameters: PreferredName.
54
- Naming/RescuedExceptionsVariableName:
55
36
  Exclude:
56
- - 'lib/gitlab/qa/component/staging.rb'
37
+ - 'lib/gitlab/qa/scenario/test/instance/airgapped.rb'
38
+ - 'lib/gitlab/qa/scenario/test/instance/image.rb'
39
+ - 'lib/gitlab/qa/scenario/test/instance/relative_url.rb'
40
+ - 'lib/gitlab/qa/scenario/test/instance/repository_storage.rb'
41
+ - 'lib/gitlab/qa/scenario/test/integration/client_ssl.rb'
42
+ - 'lib/gitlab/qa/scenario/test/integration/elasticsearch.rb'
43
+ - 'lib/gitlab/qa/scenario/test/integration/geo.rb'
44
+ - 'lib/gitlab/qa/scenario/test/integration/gitaly_cluster.rb'
45
+ - 'lib/gitlab/qa/scenario/test/integration/gitlab_pages.rb'
46
+ - 'lib/gitlab/qa/scenario/test/integration/integrations.rb'
47
+ - 'lib/gitlab/qa/scenario/test/integration/jira.rb'
48
+ - 'lib/gitlab/qa/scenario/test/integration/mattermost.rb'
49
+ - 'lib/gitlab/qa/scenario/test/integration/metrics.rb'
50
+ - 'lib/gitlab/qa/scenario/test/integration/mtls.rb'
51
+ - 'lib/gitlab/qa/scenario/test/integration/oauth.rb'
52
+ - 'lib/gitlab/qa/scenario/test/integration/opensearch.rb'
53
+ - 'lib/gitlab/qa/scenario/test/integration/registry.rb'
54
+ - 'lib/gitlab/qa/scenario/test/integration/registry_tls.rb'
55
+ - 'lib/gitlab/qa/scenario/test/integration/registry_with_cdn.rb'
56
+ - 'lib/gitlab/qa/scenario/test/integration/smtp.rb'
57
+ - 'lib/gitlab/qa/scenario/test/integration/suggested_reviewer.rb'
58
+ - 'lib/gitlab/qa/scenario/test/sanity/version.rb'
57
59
 
58
- # Offense count: 4
59
- # Cop supports --auto-correct.
60
- # Configuration parameters: CustomTransform, IgnoredWords.
61
- RSpec/ExampleWording:
60
+ # Offense count: 2
61
+ # Configuration parameters: CheckIdentifiers, CheckConstants, CheckVariables, CheckStrings, CheckSymbols, CheckComments, CheckFilepaths, FlaggedTerms.
62
+ Naming/InclusiveLanguage:
62
63
  Exclude:
63
- - 'spec/gitlab/qa/component/gitlab_spec.rb'
64
+ - 'lib/gitlab/qa/scenario/test/integration/geo.rb'
64
65
 
65
66
  # Offense count: 2
66
67
  RSpec/LeakyConstantDeclaration:
67
68
  Exclude:
68
69
  - 'spec/gitlab/qa/scenario/test/instance/deployment_base_spec.rb'
69
70
 
70
- # Offense count: 1
71
- # Cop supports --auto-correct.
72
- Style/ExplicitBlockArgument:
71
+ # Offense count: 33
72
+ # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
73
+ RSpec/VerifiedDoubles:
73
74
  Exclude:
74
- - 'lib/gitlab/qa/scenario/test/integration/ldap.rb'
75
-
76
- # Offense count: 1
77
- # Cop supports --auto-correct.
78
- Style/HashTransformKeys:
79
- Exclude:
80
- - 'lib/gitlab/qa/docker/volumes.rb'
81
-
82
- # Offense count: 1
83
- # Cop supports --auto-correct.
84
- Style/HashTransformation:
85
- Exclude:
86
- - 'lib/gitlab/qa/docker/volumes.rb'
87
-
88
- # Offense count: 8
89
- # Cop supports --auto-correct.
90
- Style/IfUnlessModifier:
91
- Exclude:
92
- - 'lib/gitlab/qa/runtime/env.rb'
93
- - 'lib/gitlab/qa/runtime/scenario.rb'
94
- - 'lib/gitlab/qa/scenario/test/omnibus/upgrade.rb'
75
+ - 'spec/gitlab/qa/component/gitaly_cluster_spec.rb'
76
+ - 'spec/gitlab/qa/component/gitaly_spec.rb'
77
+ - 'spec/gitlab/qa/component/gitlab_spec.rb'
78
+ - 'spec/gitlab/qa/component/praefect_spec.rb'
79
+ - 'spec/gitlab/qa/component/selenoid_spec.rb'
80
+ - 'spec/gitlab/qa/component/specs_spec.rb'
81
+ - 'spec/gitlab/qa/docker/command_spec.rb'
82
+ - 'spec/gitlab/qa/docker/engine_spec.rb'
83
+ - 'spec/gitlab/qa/scenario/test/instance/deployment_base_spec.rb'
95
84
 
96
85
  # Offense count: 1
97
86
  Style/MissingRespondToMissing:
98
87
  Exclude:
99
88
  - 'lib/gitlab/qa/runtime/scenario.rb'
100
89
 
101
- # Offense count: 5
102
- # Cop supports --auto-correct.
103
- # Configuration parameters: EnforcedStyle.
104
- # SupportedStyles: literals, strict
105
- Style/MutableConstant:
106
- Exclude:
107
- - 'db/migrate/**/*'
108
- - 'db/post_migrate/**/*'
109
- - 'db/geo/migrate/**/*'
110
- - 'lib/gitlab/qa/release.rb'
111
-
112
- # Offense count: 9
113
- # Cop supports --auto-correct.
114
- Style/RedundantRegexpEscape:
115
- Exclude:
116
- - 'lib/gitlab/qa/release.rb'
117
-
118
- # Offense count: 191
119
- # Cop supports --auto-correct.
120
- # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
90
+ # Offense count: 24
91
+ # This cop supports safe autocorrection (--autocorrect).
92
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
121
93
  # URISchemes: http, https
122
94
  Layout/LineLength:
123
- Max: 189
95
+ Max: 172
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-qa (11.3.0)
5
- activesupport (~> 6.1)
4
+ gitlab-qa (12.0.0)
5
+ activesupport (>= 6.1, < 7.1)
6
6
  gitlab (~> 4.19)
7
7
  http (~> 5.0)
8
8
  nokogiri (~> 1.10)
@@ -14,12 +14,11 @@ PATH
14
14
  GEM
15
15
  remote: https://rubygems.org/
16
16
  specs:
17
- activesupport (6.1.7)
17
+ activesupport (7.0.5.1)
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
19
  i18n (>= 1.6, < 2)
20
20
  minitest (>= 5.1)
21
21
  tzinfo (~> 2.0)
22
- zeitwerk (~> 2.3)
23
22
  addressable (2.8.1)
24
23
  public_suffix (>= 2.0.2, < 6.0)
25
24
  ast (2.4.2)
@@ -97,12 +96,12 @@ GEM
97
96
  gitlab-dangerfiles (2.11.0)
98
97
  danger (>= 8.4.5)
99
98
  danger-gitlab (>= 8.0.0)
100
- gitlab-styles (6.2.1)
101
- rubocop (~> 0.91, >= 0.91.1)
102
- rubocop-gitlab-security (~> 0.1.1)
103
- rubocop-performance (~> 1.9.2)
104
- rubocop-rails (~> 2.9)
105
- rubocop-rspec (~> 1.44)
99
+ gitlab-styles (10.0.0)
100
+ rubocop (~> 1.43.0)
101
+ rubocop-graphql (~> 0.18)
102
+ rubocop-performance (~> 1.15)
103
+ rubocop-rails (~> 2.17)
104
+ rubocop-rspec (~> 2.18)
106
105
  hashdiff (1.0.1)
107
106
  http (5.1.1)
108
107
  addressable (~> 2.8)
@@ -118,6 +117,7 @@ GEM
118
117
  i18n (1.12.0)
119
118
  concurrent-ruby (~> 1.0)
120
119
  jaro_winkler (1.5.4)
120
+ json (2.6.3)
121
121
  kramdown (2.4.0)
122
122
  rexml
123
123
  kramdown-parser-gfm (1.1.0)
@@ -144,16 +144,17 @@ GEM
144
144
  sawyer (~> 0.9)
145
145
  open4 (1.3.4)
146
146
  parallel (1.22.1)
147
- parser (3.1.2.1)
147
+ parser (3.2.2.1)
148
148
  ast (~> 2.4.1)
149
149
  pry (0.14.1)
150
150
  coderay (~> 1.1)
151
151
  method_source (~> 1.0)
152
152
  public_suffix (5.0.0)
153
153
  racc (1.6.0)
154
- rack (3.0.1)
154
+ rack (3.0.7)
155
155
  rainbow (3.1.1)
156
156
  rake (13.0.6)
157
+ rbs (2.8.4)
157
158
  rchardet (1.8.0)
158
159
  regexp_parser (2.6.1)
159
160
  reverse_markdown (2.1.1)
@@ -172,29 +173,35 @@ GEM
172
173
  diff-lcs (>= 1.2.0, < 2.0)
173
174
  rspec-support (~> 3.12.0)
174
175
  rspec-support (3.12.0)
175
- rubocop (0.93.1)
176
+ rubocop (1.43.0)
177
+ json (~> 2.3)
176
178
  parallel (~> 1.10)
177
- parser (>= 2.7.1.5)
179
+ parser (>= 3.2.0.0)
178
180
  rainbow (>= 2.2.2, < 4.0)
179
- regexp_parser (>= 1.8)
180
- rexml
181
- rubocop-ast (>= 0.6.0)
181
+ regexp_parser (>= 1.8, < 3.0)
182
+ rexml (>= 3.2.5, < 4.0)
183
+ rubocop-ast (>= 1.24.1, < 2.0)
182
184
  ruby-progressbar (~> 1.7)
183
- unicode-display_width (>= 1.4.0, < 2.0)
184
- rubocop-ast (1.23.0)
185
- parser (>= 3.1.1.0)
186
- rubocop-gitlab-security (0.1.1)
187
- rubocop (>= 0.51)
188
- rubocop-performance (1.9.2)
189
- rubocop (>= 0.90.0, < 2.0)
185
+ unicode-display_width (>= 2.4.0, < 3.0)
186
+ rubocop-ast (1.28.1)
187
+ parser (>= 3.2.1.0)
188
+ rubocop-capybara (2.18.0)
189
+ rubocop (~> 1.41)
190
+ rubocop-factory_bot (2.23.1)
191
+ rubocop (~> 1.33)
192
+ rubocop-graphql (0.19.0)
193
+ rubocop (>= 0.87, < 2)
194
+ rubocop-performance (1.18.0)
195
+ rubocop (>= 1.7.0, < 2.0)
190
196
  rubocop-ast (>= 0.4.0)
191
- rubocop-rails (2.9.1)
197
+ rubocop-rails (2.19.1)
192
198
  activesupport (>= 4.2.0)
193
199
  rack (>= 1.1)
194
- rubocop (>= 0.90.0, < 2.0)
195
- rubocop-rspec (1.44.1)
196
- rubocop (~> 0.87)
197
- rubocop-ast (>= 0.7.1)
200
+ rubocop (>= 1.33.0, < 2.0)
201
+ rubocop-rspec (2.22.0)
202
+ rubocop (~> 1.33)
203
+ rubocop-capybara (~> 2.17)
204
+ rubocop-factory_bot (~> 2.22)
198
205
  ruby-progressbar (1.11.0)
199
206
  ruby2_keywords (0.0.5)
200
207
  sawyer (0.9.2)
@@ -209,18 +216,19 @@ GEM
209
216
  simplecov (~> 0.19)
210
217
  simplecov-html (0.12.3)
211
218
  simplecov_json_formatter (0.1.4)
212
- solargraph (0.47.2)
219
+ solargraph (0.49.0)
213
220
  backport (~> 1.2)
214
221
  benchmark
215
- bundler (>= 1.17.2)
222
+ bundler (~> 2.0)
216
223
  diff-lcs (~> 1.4)
217
224
  e2mmap
218
225
  jaro_winkler (~> 1.5)
219
226
  kramdown (~> 2.3)
220
227
  kramdown-parser-gfm (~> 1.1)
221
228
  parser (~> 3.0)
222
- reverse_markdown (>= 1.0.5, < 3)
223
- rubocop (>= 0.52)
229
+ rbs (~> 2.0)
230
+ reverse_markdown (~> 2.0)
231
+ rubocop (~> 1.38)
224
232
  thor (~> 1.0)
225
233
  tilt (~> 2.0)
226
234
  yard (~> 0.9, >= 0.9.24)
@@ -235,7 +243,7 @@ GEM
235
243
  unf (0.1.4)
236
244
  unf_ext
237
245
  unf_ext (0.0.8.2)
238
- unicode-display_width (1.8.0)
246
+ unicode-display_width (2.4.2)
239
247
  webmock (3.7.0)
240
248
  addressable (>= 2.3.6)
241
249
  crack (>= 0.3.2)
@@ -252,7 +260,7 @@ DEPENDENCIES
252
260
  climate_control (~> 1.0.1)
253
261
  gitlab-dangerfiles (~> 2.11)
254
262
  gitlab-qa!
255
- gitlab-styles (~> 6.2.1)
263
+ gitlab-styles (~> 10)
256
264
  lefthook (~> 1.2.6)
257
265
  pry (~> 0.11)
258
266
  rake (~> 13.0)
@@ -264,4 +272,4 @@ DEPENDENCIES
264
272
  webmock (= 3.7.0)
265
273
 
266
274
  BUNDLED WITH
267
- 2.4.2
275
+ 2.4.5
data/gitlab-qa.gemspec CHANGED
@@ -10,6 +10,8 @@ Gem::Specification.new do |spec|
10
10
  spec.authors = ['GitLab Quality']
11
11
  spec.email = ['gitlab-qa@gmail.com']
12
12
 
13
+ spec.required_ruby_version = ">= 3.0.0"
14
+
13
15
  spec.summary = 'Integration tests for GitLab'
14
16
  spec.homepage = 'http://about.gitlab.com/'
15
17
  spec.license = 'MIT'
@@ -22,7 +24,7 @@ Gem::Specification.new do |spec|
22
24
 
23
25
  spec.add_development_dependency 'climate_control', '~> 1.0.1'
24
26
  spec.add_development_dependency 'gitlab-dangerfiles', '~> 2.11'
25
- spec.add_development_dependency 'gitlab-styles', '~> 6.2.1'
27
+ spec.add_development_dependency 'gitlab-styles', '~> 10'
26
28
  spec.add_development_dependency 'lefthook', '~> 1.2.6'
27
29
  spec.add_development_dependency 'pry', '~> 0.11'
28
30
  spec.add_development_dependency 'rake', '~> 13.0'
@@ -33,7 +35,7 @@ Gem::Specification.new do |spec|
33
35
  spec.add_development_dependency 'timecop', '~> 0.9.5'
34
36
  spec.add_development_dependency 'webmock', '3.7.0'
35
37
 
36
- spec.add_runtime_dependency 'activesupport', '~> 6.1'
38
+ spec.add_runtime_dependency 'activesupport', '>= 6.1', '< 7.1'
37
39
  spec.add_runtime_dependency 'gitlab', '~> 4.19'
38
40
  spec.add_runtime_dependency 'http', '~> 5.0'
39
41
  spec.add_runtime_dependency 'nokogiri', '~> 1.10'
@@ -11,13 +11,13 @@ module Gitlab
11
11
  attr_reader :docker
12
12
  attr_writer :name, :exec_commands
13
13
  attr_accessor :volumes,
14
- :ports,
15
- :network,
16
- :network_aliases,
17
- :environment,
18
- :runner_network,
19
- :airgapped_network,
20
- :additional_hosts
14
+ :ports,
15
+ :network,
16
+ :network_aliases,
17
+ :environment,
18
+ :runner_network,
19
+ :airgapped_network,
20
+ :additional_hosts
21
21
 
22
22
  def initialize
23
23
  @docker = Docker::Engine.new
@@ -42,13 +42,13 @@ module Gitlab
42
42
  end
43
43
 
44
44
  def image
45
- return self.class.const_get('DOCKER_IMAGE') if self.class.const_defined?('DOCKER_IMAGE')
45
+ return self.class.const_get(:DOCKER_IMAGE) if self.class.const_defined?(:DOCKER_IMAGE)
46
46
 
47
47
  raise NotImplementedError, "#{self.class.name} must specify a docker image as DOCKER_IMAGE"
48
48
  end
49
49
 
50
50
  def tag
51
- return self.class.const_get('DOCKER_IMAGE_TAG') if self.class.const_defined?('DOCKER_IMAGE_TAG')
51
+ return self.class.const_get(:DOCKER_IMAGE_TAG) if self.class.const_defined?(:DOCKER_IMAGE_TAG)
52
52
 
53
53
  raise NotImplementedError, "#{self.class.name} must specify a docker image tag as DOCKER_IMAGE_TAG"
54
54
  end
@@ -36,9 +36,9 @@ module Gitlab
36
36
 
37
37
  def reconfigure
38
38
  setup_omnibus
39
- @docker.attach(name) do |line, wait|
39
+ @docker.attach(name) do |line, _wait|
40
40
  # TODO, workaround which allows to detach from the container
41
- break if /gitlab Reconfigured!/.match?(line)
41
+ break if line.include?('gitlab Reconfigured!')
42
42
  end
43
43
  end
44
44
 
@@ -6,11 +6,11 @@ module Gitlab
6
6
  class GitalyCluster
7
7
  class GitalyClusterConfig
8
8
  attr_accessor :gitlab_name, :network, :airgapped_network,
9
- :praefect_node_name, :praefect_port, :praefect_ip,
10
- :primary_node_name, :primary_node_port,
11
- :secondary_node_name, :secondary_node_port,
12
- :tertiary_node_name, :tertiary_node_port,
13
- :database_node_name, :database_port
9
+ :praefect_node_name, :praefect_port, :praefect_ip,
10
+ :primary_node_name, :primary_node_port,
11
+ :secondary_node_name, :secondary_node_port,
12
+ :tertiary_node_name, :tertiary_node_port,
13
+ :database_node_name, :database_port
14
14
 
15
15
  attr_reader :praefect_addr, :primary_node_addr, :secondary_node_addr, :tertiary_node_addr, :database_node_addr
16
16
 
@@ -79,9 +79,15 @@ module Gitlab
79
79
 
80
80
  if parallel_gitaly
81
81
  threads = []
82
- threads << Thread.new { @gitaly_primary_node = gitaly(config.primary_node_name, config.primary_node_port, release) }
83
- threads << Thread.new { @gitaly_secondary_node = gitaly(config.secondary_node_name, config.secondary_node_port, release) }
84
- threads << Thread.new { @gitaly_tertiary_node = gitaly(config.tertiary_node_name, config.tertiary_node_port, release) }
82
+ threads << Thread.new do
83
+ @gitaly_primary_node = gitaly(config.primary_node_name, config.primary_node_port, release)
84
+ end
85
+ threads << Thread.new do
86
+ @gitaly_secondary_node = gitaly(config.secondary_node_name, config.secondary_node_port, release)
87
+ end
88
+ threads << Thread.new do
89
+ @gitaly_tertiary_node = gitaly(config.tertiary_node_name, config.tertiary_node_port, release)
90
+ end
85
91
  threads.each(&:join)
86
92
  else
87
93
  @gitaly_primary_node = gitaly(config.primary_node_name, config.primary_node_port, release)
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  # rubocop:disable Metrics/AbcSize
3
4
 
4
5
  require 'securerandom'
@@ -17,19 +18,19 @@ module Gitlab
17
18
  using Rainbow
18
19
 
19
20
  attr_reader :release,
20
- :omnibus_configuration,
21
- :omnibus_gitlab_rails_env,
22
- :authority_volume,
23
- :ssl_volume
21
+ :omnibus_configuration,
22
+ :omnibus_gitlab_rails_env,
23
+ :authority_volume,
24
+ :ssl_volume
24
25
 
25
26
  attr_accessor :tls,
26
- :skip_availability_check,
27
- :runner_network,
28
- :seed_admin_token,
29
- :seed_db,
30
- :skip_server_hooks,
31
- :gitaly_tls,
32
- :secrets
27
+ :skip_availability_check,
28
+ :runner_network,
29
+ :seed_admin_token,
30
+ :seed_db,
31
+ :skip_server_hooks,
32
+ :gitaly_tls,
33
+ :secrets
33
34
 
34
35
  attr_writer :name, :relative_path
35
36
 
@@ -182,9 +183,9 @@ module Gitlab
182
183
  def reconfigure
183
184
  setup_omnibus
184
185
 
185
- @docker.attach(name) do |line, wait|
186
+ @docker.attach(name) do |line, _wait|
186
187
  # TODO, workaround which allows to detach from the container
187
- break if /gitlab Reconfigured!/.match?(line)
188
+ break if line.include?('gitlab Reconfigured!')
188
189
  end
189
190
  end
190
191
 
@@ -252,7 +253,7 @@ module Gitlab
252
253
  end
253
254
 
254
255
  def delete_key_file(path)
255
- File.delete(path) if File.exist?(path)
256
+ FileUtils.rm_f(path)
256
257
  end
257
258
 
258
259
  private
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  # This component sets up the MailHog (https://github.com/mailhog/MailHog)
3
4
  # image with the proper configuration for SMTP email delivery from Gitlab
4
5
 
@@ -37,7 +37,7 @@ module Gitlab
37
37
  setup_omnibus
38
38
  @docker.attach(name) do |line|
39
39
  # TODO, workaround which allows to detach from the container
40
- break if /gitlab Reconfigured!/.match?(line)
40
+ break if line.include?('gitlab Reconfigured!')
41
41
  end
42
42
  end
43
43
 
@@ -50,7 +50,7 @@ module Gitlab
50
50
  def wait_until_ready
51
51
  @docker.exec(name, 'praefect -config /var/opt/gitlab/praefect/cluster_config.toml check || true') do |resp|
52
52
  Runtime::Logger.info(resp)
53
- break if /All checks passed/.match?(line)
53
+ break if line.include?('All checks passed')
54
54
  end
55
55
  end
56
56
 
@@ -29,10 +29,12 @@ module Gitlab
29
29
  pull_images
30
30
  docker.run(image: image, tag: tag, args:
31
31
  ['-video-recorder-image',
32
- QA::Runtime::Env.video_recorder_image,
33
- '-container-network',
34
- network]
35
- ) do |command|
32
+ QA::Runtime::Env.video_recorder_image,
33
+ '-container-network',
34
+ network,
35
+ '-timeout',
36
+ '10m0s']
37
+ ) do |command|
36
38
  set_command_args(command)
37
39
  set_volumes(command)
38
40
  end
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  # rubocop:disable Metrics/CyclomaticComplexity
3
4
  # rubocop:disable Metrics/AbcSize
4
5
 
@@ -56,8 +57,10 @@ module Gitlab
56
57
 
57
58
  feature_flag_sets = []
58
59
 
59
- # When `args` includes `[..., "--disable-feature", "a", "--enable-feature", "b", "--set-feature-flags", "c=enable", ...]`
60
- # `feature_flag_sets` will be set to `[["--disable-feature", "a"], ["--enable-feature", "b"], ["--set-feature-flags", "c=enable"]]`
60
+ # When `args` includes:
61
+ # `[..., "--disable-feature", "a", "--enable-feature", "b", "--set-feature-flags", "c=enable", ...]`
62
+ # `feature_flag_sets` will be set to:
63
+ # `[["--disable-feature", "a"], ["--enable-feature", "b"], ["--set-feature-flags", "c=enable"]]`
61
64
  # This will result in tests running three times, once with each feature flag option.
62
65
  while (index = args&.index { |x| x =~ /--.*-feature/ })
63
66
  feature_flag_sets << args.slice!(index, 2)