gitlab-qa 7.8.5 → 7.9.3

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: 75ab48c7d1d2eba818e59d14fdf90a781faf6af477c5993f2ebe27296be785bd
4
- data.tar.gz: bc2614ee2f780463fc21360b2e28885227bfe251e8dd5592657feb6b605fc264
3
+ metadata.gz: 87fb79561aa8d1d600bbcc8d8bf39de04bd951450b48bc445bf9b479c31f2fc0
4
+ data.tar.gz: fd36e810543f04eb94cc8e490ec9851dc56a429a1fb5d5b496795293f9922520
5
5
  SHA512:
6
- metadata.gz: 16de17dbf4a4c463fcc185e2432297b597a1d6704f02073010be159dc9994739b20d4733038721011fd1051918589c0cd93d3922d663cc3e3c4dd81545e2e4b0
7
- data.tar.gz: 3208f2280f9d00c45e051e1bc2894dfbd9df989e7430931d5375054a79499c67c07f95b66dcee6a066ed9019c613cf6d976fa97ef35596c9e2459c43363c7023
6
+ metadata.gz: f0935847d3898e27a24fc2552040682aa1782f1da2ab83086983e7d51979468920e26e84a5bac48495d2b683c2d5f2ad869e583807b9dc3295637f2f1a1884cf
7
+ data.tar.gz: 873e3ebb9efa18b8b85a197436a10fb5411514228396158fb5dfa250bc7284afee75b01af5c97fd8d57eca2a2e0009b26fef56eae401fe33504c421927d41f6a
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
@@ -78,8 +78,31 @@ rspec:
78
78
  reports:
79
79
  junit: gitlab-qa-run-*/**/rspec-*.xml
80
80
  script:
81
- - 'echo "Running: bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS"'
82
- - bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS || test_run_exit_code=$?
81
+ - 'echo "Running: bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTIONS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS"'
82
+ - bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTIONS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS || test_run_exit_code=$?
83
+ - bundle exec exe/gitlab-qa-report --update-screenshot-path "gitlab-qa-run-*/**/rspec-*.xml"
84
+ - export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
85
+ - if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASES_REPORTING_PROJECT" || true; fi
86
+ - exit $test_run_exit_code
87
+
88
+ # For jobs that shouldn't report results in issues, e.g., manually run custom jobs
89
+ .no-issue-report-script:
90
+ script:
91
+ - 'echo "Running: bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTIONS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS"'
92
+ - bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTIONS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS
93
+
94
+ # For jobs that provide additional GITLAB_QA_OPTIONS, e.g., jobs that include --omnibus-config
95
+ .combined-gitlab-qa-options-script:
96
+ script:
97
+ - 'echo "Running: bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTIONS_COMBINED -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS"'
98
+ - bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTIONS_COMBINED -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS
99
+
100
+ # The Test::Omnibus::Update scenarios require the release to be specified twice, which can't be done dynamically using the `variables` parameter
101
+ # So instead we can use this script with two release variables
102
+ .update-scenario-script:
103
+ script:
104
+ - 'echo "Running: bundle exec exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=$DEFAULT_RELEASE} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTIONS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS"'
105
+ - bundle exec exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=$DEFAULT_RELEASE} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTIONS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS || test_run_exit_code=$?
83
106
  - bundle exec exe/gitlab-qa-report --update-screenshot-path "gitlab-qa-run-*/**/rspec-*.xml"
84
107
  - export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
85
108
  - if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASES_REPORTING_PROJECT" || true; fi
@@ -177,28 +200,23 @@ ee:sanity-framework:
177
200
  - .high-capacity
178
201
  - .ee-qa
179
202
 
180
- # The custom jobs are for manually running specific/alternative tests in MRs, so we don't report them in issues
181
203
  ce:custom-parallel:
182
- script:
183
- - 'echo "Running: bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS"'
184
- - bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS
185
204
  extends:
186
205
  - .test
187
206
  - .high-capacity
188
207
  - .ce-qa
189
208
  - .rspec-report-opts
209
+ - .no-issue-report-script
190
210
  allow_failure: true
191
211
  parallel: 10
192
212
 
193
213
  ee:custom-parallel:
194
- script:
195
- - 'echo "Running: bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS"'
196
- - bundle exec exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} $GITLAB_QA_OPTS -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS
197
214
  extends:
198
215
  - .test
199
216
  - .high-capacity
200
217
  - .ee-qa
201
218
  - .rspec-report-opts
219
+ - .no-issue-report-script
202
220
  allow_failure: true
203
221
  parallel: 10
204
222
 
@@ -337,61 +355,46 @@ ee:image:
337
355
  - .test
338
356
  - .ee-qa
339
357
 
340
- # The Test::Omnibus::Update scenarios require the release to be specified twice, which can't be done dynamically using the `variables` parameter
341
- # So instead we include the script here again, with two release variables
342
358
  ce:update:
343
- script:
344
- - bundle exec exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=CE} ${RELEASE:=CE} -- $RSPEC_REPORT_OPTS || test_run_exit_code=$?
345
- - export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
346
- - if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASES_REPORTING_PROJECT" || true; fi
347
- - exit $test_run_exit_code
348
359
  extends:
349
360
  - .test
350
361
  - .high-capacity
351
362
  - .ce-qa
352
363
  - .rspec-report-opts
353
364
  - .knapsack-variables
365
+ - .update-scenario-script
354
366
  parallel: 5
355
367
 
356
368
  ce:update-quarantine:
357
- script:
358
- - bundle exec exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=CE} ${RELEASE:=CE} -- --tag quarantine --tag ~orchestrated $RSPEC_REPORT_OPTS || test_run_exit_code=$?
359
- - export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
360
- - if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASES_REPORTING_PROJECT" || true; fi
361
- - exit $test_run_exit_code
362
369
  extends:
363
370
  - .test
364
371
  - .high-capacity
365
372
  - .ce-qa
366
373
  - .quarantine
367
374
  - .rspec-report-opts
375
+ - .update-scenario-script
376
+ variables:
377
+ QA_RSPEC_TAGS: "--tag quarantine --tag ~orchestrated"
368
378
 
369
379
  ee:update:
370
- script:
371
- - bundle exec exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=EE} ${RELEASE:=EE} -- $RSPEC_REPORT_OPTS || test_run_exit_code=$?
372
- - export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
373
- - if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASES_REPORTING_PROJECT" || true; fi
374
- - exit $test_run_exit_code
375
380
  extends:
376
381
  - .test
377
382
  - .high-capacity
378
383
  - .ee-qa
379
384
  - .rspec-report-opts
380
385
  - .knapsack-variables
386
+ - .update-scenario-script
381
387
  parallel: 10
382
388
 
383
389
  ee:update-quarantine:
384
- script:
385
- - bundle exec exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=EE} ${RELEASE:=EE} -- --tag quarantine --tag ~orchestrated $RSPEC_REPORT_OPTS || test_run_exit_code=$?
386
- - export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
387
- - if [ "$TOP_UPSTREAM_SOURCE_REF" == $TOP_UPSTREAM_DEFAULT_BRANCH ] || [[ "$TOP_UPSTREAM_SOURCE_JOB" == https://ops.gitlab.net* ]]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASES_REPORTING_PROJECT" || true; fi
388
- - exit $test_run_exit_code
389
390
  extends:
390
391
  - .test
391
392
  - .high-capacity
392
393
  - .ee-qa
393
394
  - .quarantine
394
395
  - .rspec-report-opts
396
+ variables:
397
+ QA_RSPEC_TAGS: "--tag quarantine --tag ~orchestrated"
395
398
 
396
399
  # The Test::Omnibus::Upgrade scenario isn't run on master (because it always uses the latest CE/EE image) so we don't report the test results in issues
397
400
  ce:upgrade:
@@ -648,8 +651,9 @@ ce:object_storage:
648
651
  - .high-capacity
649
652
  - .ce-qa
650
653
  - .rspec-report-opts
654
+ - .combined-gitlab-qa-options-script
651
655
  variables:
652
- GITLAB_QA_OPTS: "--omnibus-config object_storage"
656
+ GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config object_storage"
653
657
 
654
658
  ce:object_storage-quarantine:
655
659
  extends:
@@ -658,8 +662,9 @@ ce:object_storage-quarantine:
658
662
  - .ce-qa
659
663
  - .quarantine
660
664
  - .rspec-report-opts
665
+ - .combined-gitlab-qa-options-script
661
666
  variables:
662
- GITLAB_QA_OPTS: "--omnibus-config object_storage"
667
+ GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config object_storage"
663
668
 
664
669
  ee:object_storage_aws:
665
670
  extends:
@@ -667,8 +672,9 @@ ee:object_storage_aws:
667
672
  - .high-capacity
668
673
  - .ee-qa
669
674
  - .rspec-report-opts
675
+ - .combined-gitlab-qa-options-script
670
676
  variables:
671
- GITLAB_QA_OPTS: "--omnibus-config object_storage_aws"
677
+ GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config object_storage_aws"
672
678
  QA_RSPEC_TAGS: "--tag object_storage"
673
679
 
674
680
  ee:object_storage_aws-quarantine:
@@ -678,8 +684,9 @@ ee:object_storage_aws-quarantine:
678
684
  - .ee-qa
679
685
  - .quarantine
680
686
  - .rspec-report-opts
687
+ - .combined-gitlab-qa-options-script
681
688
  variables:
682
- GITLAB_QA_OPTS: "--omnibus-config object_storage_aws"
689
+ GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config object_storage_aws"
683
690
  QA_RSPEC_TAGS: "--tag quarantine --tag object_storage"
684
691
 
685
692
  ee:object_storage_gcs:
@@ -709,8 +716,9 @@ ee:object_storage:
709
716
  - .high-capacity
710
717
  - .ee-qa
711
718
  - .rspec-report-opts
719
+ - .combined-gitlab-qa-options-script
712
720
  variables:
713
- GITLAB_QA_OPTS: "--omnibus-config object_storage"
721
+ GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config object_storage"
714
722
  QA_RSPEC_TAGS: "--tag object_storage"
715
723
 
716
724
  ee:object_storage-quarantine:
@@ -720,8 +728,9 @@ ee:object_storage-quarantine:
720
728
  - .ee-qa
721
729
  - .quarantine
722
730
  - .rspec-report-opts
731
+ - .combined-gitlab-qa-options-script
723
732
  variables:
724
- GITLAB_QA_OPTS: "--omnibus-config object_storage"
733
+ GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config object_storage"
725
734
  QA_RSPEC_TAGS: "--tag quarantine --tag object_storage"
726
735
 
727
736
  ee:packages:
@@ -730,8 +739,9 @@ ee:packages:
730
739
  - .high-capacity
731
740
  - .ee-qa
732
741
  - .rspec-report-opts
742
+ - .combined-gitlab-qa-options-script
733
743
  variables:
734
- GITLAB_QA_OPTS: "--omnibus-config packages"
744
+ GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config packages"
735
745
  QA_RSPEC_TAGS: "--tag packages"
736
746
 
737
747
  ee:packages-quarantine:
@@ -741,8 +751,9 @@ ee:packages-quarantine:
741
751
  - .ee-qa
742
752
  - .quarantine
743
753
  - .rspec-report-opts
754
+ - .combined-gitlab-qa-options-script
744
755
  variables:
745
- GITLAB_QA_OPTS: "--omnibus-config packages"
756
+ GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config packages"
746
757
  QA_RSPEC_TAGS: "--tag quarantine --tag packages"
747
758
 
748
759
  ce:registry:
@@ -873,7 +884,7 @@ ee:praefect:
873
884
  - .ee-qa
874
885
  - .knapsack-variables
875
886
  - .rspec-report-opts
876
- parallel: 5
887
+ parallel: 10
877
888
  variables:
878
889
  QA_SCENARIO: "Test::Integration::Praefect"
879
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 2020-10-31 07:26:03 -0700 using RuboCop version 0.82.0.
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: 51
9
+ # Offense count: 165
10
10
  # Cop supports --auto-correct.
11
- # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
12
- # URISchemes: http, https
13
- Layout/LineLength:
14
- Max: 210
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: 93
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: 6
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
@@ -115,9 +115,23 @@ This will first disable `feature_flag_name` flag and run the tests and then enab
115
115
 
116
116
  You can pass any number of feature flag settings. The tests will run once for each setting.
117
117
 
118
- See the [QA framework documentation](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/qa/README.md#running-tests-with-a-feature-flag-enabled)
118
+ See the [QA framework documentation](https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/README.md#running-tests-with-a-feature-flag-enabled-or-disabled)
119
119
  for information on running the tests with different feature flag settings from the QA framework.
120
120
 
121
+ ## Running tests with multiple feature flags set
122
+
123
+ The options above allow you to enable or disable a single feature flag at a time. However, if you want to set more than
124
+ one feature flag at the same time you'll need to use `--set-feature-flags` instead.
125
+
126
+ The desired state must be set individually for each feature flag in a comma-separated list. For example to disable a feature flag
127
+ named `feature-one` and enable another named `feature-two`, use the following parameters:
128
+
129
+ ```shell
130
+ --set-feature-flags feature-one=disable,feature-two=enable
131
+ ```
132
+
133
+ Those parameters will instruct GitLab QA to set both feature flags before running the suite of tests.
134
+
121
135
  ## Specifying the GitLab version
122
136
 
123
137
  In each of the examples below, it is possible to test a specific version of GitLab
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', '~> 4.3.0'
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', '~> 12.2'
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.0.2'
30
+ spec.add_runtime_dependency 'activesupport', '~> 6.1'
34
31
  spec.add_runtime_dependency 'gitlab', '~> 4.16.1'
35
- spec.add_runtime_dependency 'http', '4.3.0'
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 = 'latest'.freeze
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 = { MINIO_ACCESS_KEY: AWS_ACCESS_KEY, MINIO_SECRET_KEY: AWS_SECRET_KEY }
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
@@ -16,7 +16,7 @@ module Gitlab
16
16
  @env = {}
17
17
  end
18
18
 
19
- def perform # rubocop:disable Metrics/AbcSize
19
+ def perform
20
20
  return puts "Skipping tests." if skip_tests?
21
21
 
22
22
  raise ArgumentError unless [suite, release].all?
@@ -31,15 +31,14 @@ module Gitlab
31
31
 
32
32
  feature_flag_sets = []
33
33
 
34
- # When `args` includes `[..., "--disable-feature", "a", "--enable-feature", "b", ...]`
35
- # `feature_flag_sets` will be set to `[["--disable-feature", "a"], ["--enable-feature", "b"]]`
36
- # This will result in tests running twice, once with each feature.
34
+ # When `args` includes `[..., "--disable-feature", "a", "--enable-feature", "b", "--set-feature-flags", "c=enable", ...]`
35
+ # `feature_flag_sets` will be set to `[["--disable-feature", "a"], ["--enable-feature", "b"], ["--set-feature-flags", "c=enable"]]`
36
+ # This will result in tests running three times, once with each feature flag option.
37
37
  while (index = args&.index { |x| x =~ /--.*-feature/ })
38
38
  feature_flag_sets << args.slice!(index, 2)
39
39
  end
40
40
 
41
- # When `args` do not have either "--disable-feature" or "--enable-feature", we
42
- # add [] so that test is run exactly once.
41
+ # When `args` do not have any feature flag options, we add [] so that test is run exactly once.
43
42
  feature_flag_sets << [] unless feature_flag_sets.any?
44
43
 
45
44
  feature_flag_sets.each do |feature_flag_set|
@@ -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|
@@ -18,7 +18,7 @@ module Gitlab
18
18
  @omnibus_configurations = %w[default] # always load default configuration
19
19
 
20
20
  @options = OptionParser.new do |opts|
21
- opts.banner = 'Usage: gitlab-qa [options] Scenario URL [[--] path] [rspec_options]'
21
+ opts.banner = 'Usage: gitlab-qa Scenario URL [options] [[--] path] [rspec_options]'
22
22
 
23
23
  opts.on('--no-teardown', 'Skip teardown of containers after the scenario completes.') do
24
24
  Runtime::Scenario.define(:teardown, false)
@@ -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/authority/ca.pem';
54
+ nginx['ssl_client_certificate'] = '/etc/gitlab/trusted-certs/ca.pem';
57
55
  nginx['ssl_verify_depth'] = '2';
58
56
  OMNIBUS
59
57
  end
@@ -4,10 +4,7 @@ module Gitlab
4
4
  module Test
5
5
  module Integration
6
6
  class Geo < Scenario::Template
7
- ##
8
7
  # rubocop:disable Lint/MissingCopEnableDirective
9
- # rubocop:disable Metrics/AbcSize
10
- #
11
8
  def perform(release, *rspec_args)
12
9
  release = QA::Release.new(release)
13
10
 
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module QA
3
- VERSION = '7.8.5'.freeze
3
+ VERSION = '7.9.3'.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: 7.8.5
4
+ version: 7.9.3
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-09-16 00:00:00.000000000 Z
11
+ date: 2021-09-27 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: 4.3.0
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: 4.3.0
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: '12.2'
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: '12.2'
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.0.2
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.0.2
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: 4.3.0
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: 4.3.0
152
+ version: '5.0'
181
153
  - !ruby/object:Gem::Dependency
182
154
  name: nokogiri
183
155
  requirement: !ruby/object:Gem::Requirement