gitlab-qa 7.27.0 → 7.29.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6356f61652597dc3ba035658d378b9dd8567a2caad8406cecfcb333143ac8cc7
4
- data.tar.gz: 34f326e02a3934f36255509268c60ba8266d9a0e3ed2f6982a1ce1731db8f8e8
3
+ metadata.gz: 8d4ca3feba042298fe467133b5f576653b553af61ac01a0b72a1a970917e3711
4
+ data.tar.gz: 61ee29dbe4355bcbc18d8e164b97f1453c461419fcf6bd70543a659e5029d333
5
5
  SHA512:
6
- metadata.gz: fcc680812bf117752fc8e9bab1e02250b426792de13c38a674b5271fa127e8da564cf167b9b53224e4c454e3fc45aec114034a3a2b6a6f86f62149d206da552c
7
- data.tar.gz: 9a773c6483cd726f5b84010597ae8729cc514b55f52034223b40c87e01d5409a45ad8ed0674ef89078a368fb62452de4abdcfaefe67af0bd7572733189bb6f55
6
+ metadata.gz: 5ddff780b5188c489bec89ce0b475096ac707f9e2e5138cc400efeef9fbd576b4c5bebc77f43af207109503e08e1c1efaf2813e3666bd9d88d5807f7c9691891
7
+ data.tar.gz: 34b7eacbd20c81f264aaf478f35e9ed78d5c7e185b18178bd55fa1c5fc37b0053f54bd49027d994cf91d6d69120c3371fdb818727419c17ef10ea7f373a4c91d
data/.gitignore CHANGED
@@ -1,12 +1,10 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
7
6
  /pkg/
8
7
  /spec/reports/
9
- /tmp/
10
8
  /.idea
11
9
  .ruby-version
12
10
  .ruby-gemset
@@ -245,14 +245,12 @@ generate-allure-report:
245
245
  cache:
246
246
  policy: pull
247
247
  before_script:
248
- # Override allure variables for upstream triggers
249
- # Override default before script and don't push cache
250
248
  - export STORAGE_CREDENTIALS=$QA_ALLURE_REPORT_GCS_CREDENTIALS
251
249
  - export GITLAB_AUTH_TOKEN=$GITLAB_QA_MR_ALLURE_REPORT_TOKEN
252
- - export ALLURE_PROJECT_PATH=$TOP_UPSTREAM_SOURCE_PROJECT
253
- - export ALLURE_MERGE_REQUEST_IID=$TOP_UPSTREAM_MERGE_REQUEST_IID
254
- - export ALLURE_COMMIT_SHA=$TOP_UPSTREAM_SOURCE_SHA
255
- - export ALLURE_JOB_NAME="${ALLURE_JOB_NAME:-package-and-qa}"
250
+ # Set allure variables for merge request comment based on pipeline source
251
+ - export ALLURE_MERGE_REQUEST_IID=${TOP_UPSTREAM_MERGE_REQUEST_IID:-$CI_MERGE_REQUEST_IID}
252
+ - export ALLURE_PROJECT_PATH=${TOP_UPSTREAM_SOURCE_PROJECT:-$CI_MERGE_REQUEST_PROJECT_PATH}
253
+ - export ALLURE_COMMIT_SHA=${TOP_UPSTREAM_SOURCE_SHA:-$CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}
256
254
  rules:
257
255
  # Don't run report generation on release pipelines
258
256
  - if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_PATH == "gitlab-org/gitlab-qa" && $RELEASE == null'
@@ -260,11 +258,7 @@ generate-allure-report:
260
258
  when: never
261
259
  - if: '$CI_COMMIT_TAG'
262
260
  when: never
263
- - if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "parent_pipeline" || ($CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH)'
264
- variables:
265
- ALLURE_JOB_NAME: gitlab-qa
266
- when: always
267
- - if: '$TOP_UPSTREAM_SOURCE_PROJECT != null && $TOP_UPSTREAM_SOURCE_PROJECT != "" && $TOP_UPSTREAM_SOURCE_SHA != null && $TOP_UPSTREAM_SOURCE_SHA != ""'
261
+ - if: '$ALLURE_JOB_NAME'
268
262
  when: always
269
263
 
270
264
  generate-knapsack-report:
@@ -0,0 +1,25 @@
1
+ ce:ci_decomposition:
2
+ extends:
3
+ - .rules:ce-never-when-triggered-by-feature-flag-definition-change
4
+ - .rules:ce-never-when-qa-tests-specified
5
+ - .test
6
+ - .high-capacity
7
+ - .ce-variables
8
+ - .rspec-report-opts
9
+ - .combined-gitlab-qa-options-script
10
+ parallel: 5
11
+ variables:
12
+ GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config ci_decomposition"
13
+
14
+ ee:ci_decomposition:
15
+ extends:
16
+ - .rules:ee-never-when-triggered-by-feature-flag-definition-change
17
+ - .rules:ee-never-when-qa-tests-specified
18
+ - .test
19
+ - .ee-variables
20
+ - .high-capacity
21
+ - .rspec-report-opts
22
+ - .combined-gitlab-qa-options-script
23
+ parallel: 5
24
+ variables:
25
+ GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config ci_decomposition"
@@ -7,7 +7,6 @@ ce:gitaly-cluster:
7
7
  - .rspec-report-opts
8
8
  variables:
9
9
  QA_SCENARIO: "Test::Integration::GitalyCluster"
10
- QA_LOG_PATH: "tmp/gitaly_cluster.log"
11
10
 
12
11
  ce:gitaly-cluster-quarantine:
13
12
  extends:
@@ -19,7 +18,6 @@ ce:gitaly-cluster-quarantine:
19
18
  - .rspec-report-opts
20
19
  variables:
21
20
  QA_SCENARIO: "Test::Integration::GitalyCluster"
22
- QA_LOG_PATH: "tmp/gitaly_cluster.log"
23
21
 
24
22
  ee:gitaly-cluster:
25
23
  extends:
@@ -30,7 +28,6 @@ ee:gitaly-cluster:
30
28
  - .rspec-report-opts
31
29
  variables:
32
30
  QA_SCENARIO: "Test::Integration::GitalyCluster"
33
- QA_LOG_PATH: "tmp/gitaly_cluster.log"
34
31
 
35
32
  ee:gitaly-cluster-quarantine:
36
33
  extends:
@@ -42,4 +39,3 @@ ee:gitaly-cluster-quarantine:
42
39
  - .rspec-report-opts
43
40
  variables:
44
41
  QA_SCENARIO: "Test::Integration::GitalyCluster"
45
- QA_LOG_PATH: "tmp/gitaly_cluster.log"
data/.gitlab-ci.yml CHANGED
@@ -25,12 +25,18 @@ workflow:
25
25
  rules:
26
26
  # For merge requests, create a pipeline.
27
27
  - if: '$CI_MERGE_REQUEST_IID'
28
+ variables:
29
+ ALLURE_JOB_NAME: gitlab-qa
28
30
  # For the default branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
29
31
  - if: '$CI_COMMIT_BRANCH == "master"'
30
- # For tags, create a pipeline.
31
- - if: '$CI_COMMIT_TAG'
32
+ variables:
33
+ ALLURE_JOB_NAME: gitlab-qa
32
34
  # For triggers from GitLab MR pipelines (and pipelines from other projects), create a pipeline
33
35
  - if: '$CI_PIPELINE_SOURCE == "pipeline"'
36
+ variables:
37
+ ALLURE_JOB_NAME: package-and-qa
38
+ # For tags, create a pipeline.
39
+ - if: '$CI_COMMIT_TAG'
34
40
  # When using Run pipeline button in the GitLab UI, from the project’s CI/CD > Pipelines section, create a pipeline.
35
41
  - if: '$CI_PIPELINE_SOURCE == "web"'
36
42
 
@@ -94,7 +100,6 @@ generate-jobs:
94
100
  - bundle exec bin/qa Test::Instance::All http://dummy.test --count-examples-only -- $QA_TESTS --tag repository_storage
95
101
  - bundle exec bin/qa Test::Instance::All http://dummy.test --count-examples-only -- $QA_TESTS --tag packages
96
102
  - bundle exec bin/qa Test::Instance::All http://dummy.test --count-examples-only -- $QA_TESTS --tag integrations
97
- - bundle exec bin/qa Test::Instance::All http://dummy.test --count-examples-only -- $QA_TESTS --tag actioncable
98
103
  - bundle exec bin/qa Test::Instance::All http://dummy.test --count-examples-only -- $QA_TESTS --tag mtls
99
104
  - bundle exec bin/qa Test::Instance::All http://dummy.test --count-examples-only -- $QA_TESTS --tag jira
100
105
  - bundle exec bin/qa Test::Instance::All http://dummy.test --count-examples-only -- $QA_TESTS --tag can_use_large_setup
data/Gemfile.lock ADDED
@@ -0,0 +1,248 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ gitlab-qa (7.29.0)
5
+ activesupport (~> 6.1)
6
+ gitlab (~> 4.18.0)
7
+ http (~> 5.0)
8
+ nokogiri (~> 1.10)
9
+ rainbow (~> 3.0.0)
10
+ table_print (= 1.5.7)
11
+
12
+ GEM
13
+ remote: https://rubygems.org/
14
+ specs:
15
+ activesupport (6.1.6)
16
+ concurrent-ruby (~> 1.0, >= 1.0.2)
17
+ i18n (>= 1.6, < 2)
18
+ minitest (>= 5.1)
19
+ tzinfo (~> 2.0)
20
+ zeitwerk (~> 2.3)
21
+ addressable (2.8.0)
22
+ public_suffix (>= 2.0.2, < 5.0)
23
+ ast (2.4.2)
24
+ backport (1.2.0)
25
+ benchmark (0.2.0)
26
+ claide (1.1.0)
27
+ claide-plugins (0.9.2)
28
+ cork
29
+ nap
30
+ open4 (~> 1.3)
31
+ climate_control (1.0.1)
32
+ coderay (1.1.3)
33
+ colored2 (3.1.2)
34
+ concurrent-ruby (1.1.10)
35
+ cork (0.3.0)
36
+ colored2 (~> 3.1)
37
+ crack (0.4.5)
38
+ rexml
39
+ danger (8.6.1)
40
+ claide (~> 1.0)
41
+ claide-plugins (>= 0.9.2)
42
+ colored2 (~> 3.1)
43
+ cork (~> 0.1)
44
+ faraday (>= 0.9.0, < 2.0)
45
+ faraday-http-cache (~> 2.0)
46
+ git (~> 1.7)
47
+ kramdown (~> 2.3)
48
+ kramdown-parser-gfm (~> 1.0)
49
+ no_proxy_fix
50
+ octokit (~> 4.7)
51
+ terminal-table (>= 1, < 4)
52
+ danger-gitlab (8.0.0)
53
+ danger
54
+ gitlab (~> 4.2, >= 4.2.0)
55
+ diff-lcs (1.5.0)
56
+ domain_name (0.5.20190701)
57
+ unf (>= 0.0.5, < 1.0.0)
58
+ e2mmap (0.1.0)
59
+ faraday (1.10.0)
60
+ faraday-em_http (~> 1.0)
61
+ faraday-em_synchrony (~> 1.0)
62
+ faraday-excon (~> 1.1)
63
+ faraday-httpclient (~> 1.0)
64
+ faraday-multipart (~> 1.0)
65
+ faraday-net_http (~> 1.0)
66
+ faraday-net_http_persistent (~> 1.0)
67
+ faraday-patron (~> 1.0)
68
+ faraday-rack (~> 1.0)
69
+ faraday-retry (~> 1.0)
70
+ ruby2_keywords (>= 0.0.4)
71
+ faraday-em_http (1.0.0)
72
+ faraday-em_synchrony (1.0.0)
73
+ faraday-excon (1.1.0)
74
+ faraday-http-cache (2.2.0)
75
+ faraday (>= 0.8)
76
+ faraday-httpclient (1.0.1)
77
+ faraday-multipart (1.0.3)
78
+ multipart-post (>= 1.2, < 3)
79
+ faraday-net_http (1.0.1)
80
+ faraday-net_http_persistent (1.2.0)
81
+ faraday-patron (1.0.0)
82
+ faraday-rack (1.0.0)
83
+ faraday-retry (1.0.3)
84
+ ffi (1.15.5)
85
+ ffi-compiler (1.0.1)
86
+ ffi (>= 1.0.0)
87
+ rake
88
+ git (1.11.0)
89
+ rchardet (~> 1.8)
90
+ gitlab (4.18.0)
91
+ httparty (~> 0.18)
92
+ terminal-table (>= 1.5.1)
93
+ gitlab-dangerfiles (2.11.0)
94
+ danger (>= 8.4.5)
95
+ danger-gitlab (>= 8.0.0)
96
+ gitlab-styles (6.2.1)
97
+ rubocop (~> 0.91, >= 0.91.1)
98
+ rubocop-gitlab-security (~> 0.1.1)
99
+ rubocop-performance (~> 1.9.2)
100
+ rubocop-rails (~> 2.9)
101
+ rubocop-rspec (~> 1.44)
102
+ hashdiff (1.0.1)
103
+ http (5.0.4)
104
+ addressable (~> 2.8)
105
+ http-cookie (~> 1.0)
106
+ http-form_data (~> 2.2)
107
+ llhttp-ffi (~> 0.4.0)
108
+ http-cookie (1.0.5)
109
+ domain_name (~> 0.5)
110
+ http-form_data (2.3.0)
111
+ httparty (0.20.0)
112
+ mime-types (~> 3.0)
113
+ multi_xml (>= 0.5.2)
114
+ i18n (1.10.0)
115
+ concurrent-ruby (~> 1.0)
116
+ jaro_winkler (1.5.4)
117
+ kramdown (2.4.0)
118
+ rexml
119
+ kramdown-parser-gfm (1.1.0)
120
+ kramdown (~> 2.0)
121
+ llhttp-ffi (0.4.0)
122
+ ffi-compiler (~> 1.0)
123
+ rake (~> 13.0)
124
+ method_source (1.0.0)
125
+ mime-types (3.4.1)
126
+ mime-types-data (~> 3.2015)
127
+ mime-types-data (3.2022.0105)
128
+ mini_portile2 (2.8.0)
129
+ minitest (5.15.0)
130
+ multi_xml (0.6.0)
131
+ multipart-post (2.1.1)
132
+ nap (1.1.0)
133
+ no_proxy_fix (0.1.2)
134
+ nokogiri (1.13.6)
135
+ mini_portile2 (~> 2.8.0)
136
+ racc (~> 1.4)
137
+ octokit (4.22.0)
138
+ faraday (>= 0.9)
139
+ sawyer (~> 0.8.0, >= 0.5.3)
140
+ open4 (1.3.4)
141
+ parallel (1.22.1)
142
+ parser (3.1.2.0)
143
+ ast (~> 2.4.1)
144
+ pry (0.14.1)
145
+ coderay (~> 1.1)
146
+ method_source (~> 1.0)
147
+ public_suffix (4.0.7)
148
+ racc (1.6.0)
149
+ rack (2.2.3)
150
+ rainbow (3.0.0)
151
+ rake (13.0.6)
152
+ rchardet (1.8.0)
153
+ regexp_parser (2.4.0)
154
+ reverse_markdown (2.1.1)
155
+ nokogiri
156
+ rexml (3.2.5)
157
+ rspec (3.11.0)
158
+ rspec-core (~> 3.11.0)
159
+ rspec-expectations (~> 3.11.0)
160
+ rspec-mocks (~> 3.11.0)
161
+ rspec-core (3.11.0)
162
+ rspec-support (~> 3.11.0)
163
+ rspec-expectations (3.11.0)
164
+ diff-lcs (>= 1.2.0, < 2.0)
165
+ rspec-support (~> 3.11.0)
166
+ rspec-mocks (3.11.1)
167
+ diff-lcs (>= 1.2.0, < 2.0)
168
+ rspec-support (~> 3.11.0)
169
+ rspec-support (3.11.0)
170
+ rubocop (0.93.1)
171
+ parallel (~> 1.10)
172
+ parser (>= 2.7.1.5)
173
+ rainbow (>= 2.2.2, < 4.0)
174
+ regexp_parser (>= 1.8)
175
+ rexml
176
+ rubocop-ast (>= 0.6.0)
177
+ ruby-progressbar (~> 1.7)
178
+ unicode-display_width (>= 1.4.0, < 2.0)
179
+ rubocop-ast (1.18.0)
180
+ parser (>= 3.1.1.0)
181
+ rubocop-gitlab-security (0.1.1)
182
+ rubocop (>= 0.51)
183
+ rubocop-performance (1.9.2)
184
+ rubocop (>= 0.90.0, < 2.0)
185
+ rubocop-ast (>= 0.4.0)
186
+ rubocop-rails (2.9.1)
187
+ activesupport (>= 4.2.0)
188
+ rack (>= 1.1)
189
+ rubocop (>= 0.90.0, < 2.0)
190
+ rubocop-rspec (1.44.1)
191
+ rubocop (~> 0.87)
192
+ rubocop-ast (>= 0.7.1)
193
+ ruby-progressbar (1.11.0)
194
+ ruby2_keywords (0.0.5)
195
+ sawyer (0.8.2)
196
+ addressable (>= 2.3.5)
197
+ faraday (> 0.8, < 2.0)
198
+ solargraph (0.45.0)
199
+ backport (~> 1.2)
200
+ benchmark
201
+ bundler (>= 1.17.2)
202
+ diff-lcs (~> 1.4)
203
+ e2mmap
204
+ jaro_winkler (~> 1.5)
205
+ kramdown (~> 2.3)
206
+ kramdown-parser-gfm (~> 1.1)
207
+ parser (~> 3.0)
208
+ reverse_markdown (>= 1.0.5, < 3)
209
+ rubocop (>= 0.52)
210
+ thor (~> 1.0)
211
+ tilt (~> 2.0)
212
+ yard (~> 0.9, >= 0.9.24)
213
+ table_print (1.5.7)
214
+ terminal-table (3.0.2)
215
+ unicode-display_width (>= 1.1.1, < 3)
216
+ thor (1.2.1)
217
+ tilt (2.0.10)
218
+ tzinfo (2.0.4)
219
+ concurrent-ruby (~> 1.0)
220
+ unf (0.1.4)
221
+ unf_ext
222
+ unf_ext (0.0.8.1)
223
+ unicode-display_width (1.8.0)
224
+ webmock (3.7.0)
225
+ addressable (>= 2.3.6)
226
+ crack (>= 0.3.2)
227
+ hashdiff (>= 0.4.0, < 2.0.0)
228
+ webrick (1.7.0)
229
+ yard (0.9.27)
230
+ webrick (~> 1.7.0)
231
+ zeitwerk (2.5.4)
232
+
233
+ PLATFORMS
234
+ ruby
235
+
236
+ DEPENDENCIES
237
+ climate_control (~> 1.0.1)
238
+ gitlab-dangerfiles (~> 2.11)
239
+ gitlab-qa!
240
+ gitlab-styles (~> 6.2.1)
241
+ pry (~> 0.11)
242
+ rake (~> 13.0)
243
+ rspec (~> 3.7)
244
+ solargraph (~> 0.41)
245
+ webmock (= 3.7.0)
246
+
247
+ BUNDLED WITH
248
+ 2.2.33
@@ -106,7 +106,7 @@ Multiple Configurators may be specified and the order will be preserved in which
106
106
 
107
107
  E.g., given the arguments:
108
108
 
109
- ```
109
+ ```ruby
110
110
  exe/gitlab-qa Test::Instance::Image EE --omnibus-config packages,registry
111
111
  # or
112
112
  exe/gitlab-qa Test::Instance::Image EE --omnibus-config packages --omnibus-config registry
@@ -136,7 +136,7 @@ Component::Gitlab.perform do |primary|
136
136
  primary.omnibus_configuration << <<~OMNIBUS
137
137
  geo_primary_role['enable'] = true
138
138
  OMNIBUS
139
-
139
+
140
140
  primary.instance do
141
141
  Component::Gitlab.perform do |secondary|
142
142
  secondary.omnibus_configuration << <<~OMNIBUS
@@ -181,10 +181,10 @@ one Omnibus configuration that might be unneccesary or Invalid for the Second In
181
181
 
182
182
  1. `Runtime::OmnibusConfigurations::Default`
183
183
  1. `Runtime::OmnibusConfigurations::[A,B,...]` where `A` and `B` are Configurators specified through the positional arguments `--a --b`
184
- 1. Custom written `Scenario::Template` (such as `Test::Integation::Geo`)
184
+ 1. Custom written `Scenario::Template` (such as `Test::Integration::Geo`)
185
185
  1. `lib/gitlab/qa/component/gitlab.rb`
186
186
 
187
- From top to bottom, configurations will be loaded and any configurations that are superceded, will take precedence over the one before it, and so on.
187
+ From top to bottom, configurations will be loaded and any configurations that are superseded, will take precedence over the one before it, and so on.
188
188
 
189
189
  ### Executing arbitrary shell commands within the GitLab Instance
190
190
 
@@ -68,7 +68,7 @@ All environment variables used by GitLab QA should be defined in [`lib/gitlab/qa
68
68
  | `QA_PRAEFECT_REPOSITORY_STORAGE` |- | The name of repository storage using Praefect. Note: Admin access is required to change repository storage. | No|
69
69
  | `QA_COOKIES` |- | Optionally set to "cookie1=value;cookie2=value" in order to add a cookie to every request. This can be used to set the canary cookie by setting it to "gitlab_canary=true". | No|
70
70
  | `QA_DEBUG` |- | Set to `true` to verbosely log page object actions. Note: if enabled be aware that sensitive data might be logged. If an input element has a QA selector with `password` in the name, data entered into the input element will be masked. If the element doesn't have `password` in its name it won't be masked. | No|
71
- | `QA_LOG_PATH` |- | Path to output debug logging to. If not set logging will be output to STDOUT. | No|
71
+ | `QA_LOG_PATH` |- | Path to output debug logging to. By default `QA_ARTIFACTS_DIR` is used | No|
72
72
  | `QA_CAN_TEST_GIT_PROTOCOL_V2` | `true` | Set to `false` to skip tests that require Git protocol v2 if your environment doesn't support it. | No|
73
73
  | `QA_CAN_TEST_ADMIN_FEATURES` | `true` | Set to `false` to skip tests that require admin access. | No|
74
74
  | `QA_CAN_TEST_PRAEFECT` | `true` | Set to `false` to skip tests that require Praefect to be running. | No|
@@ -651,23 +651,6 @@ $ export EE_LICENSE=$(cat /path/to/GitLab.gitlab_license)
651
651
  $ gitlab-qa Test::Integration::Jira EE
652
652
  ```
653
653
 
654
- ### `Test::Integration::Actioncable CE|EE|<full image address>`
655
-
656
- This tests the real-time assignees feature by setting
657
- `actioncable['enable'] = true` in the Omnibus configuration
658
- before starting the GitLab container.
659
-
660
- To run tests against the GitLab container, a GitLab QA (`gitlab/gitlab-qa`)
661
- container is spun up and tests are run from it by running the
662
- `Test::Instance::All` scenario with the `--tag actioncable` RSpec parameter,
663
- which runs only the tests with `:actioncable` metadata.
664
-
665
- Example:
666
-
667
- ```
668
- $ gitlab-qa Test::Integration::Actioncable CE
669
- ```
670
-
671
654
  ### `Test::Integration::Integrations CE|<full image address>`
672
655
 
673
656
  This scenario is intended to test the different integrations that a GitLab instance can offer, such as WebHooks to an external service, Jenkins, etc.
@@ -944,6 +927,14 @@ This scenario is a composition of two orchestrated scenarios. It tests the conta
944
927
  GITLAB_TLS_CERTIFICATE=$(cat /path/to/certificate.crt) gitlab-qa Test::Integration::RegistryTLS EE --omnibus-config object_storage_aws
945
928
  ```
946
929
 
930
+ ### Test::Instance::Image EE --omnibus-config ci_decomposition
931
+
932
+ This scenario is to run tests against GitLab instance with [decomposed database](https://gitlab.com/groups/gitlab-org/-/epics/6160) on a single Postgres:
933
+
934
+ ```ruby
935
+ gitlab-qa Test::Instance::Image EE --omnibus-config ci_decomposition
936
+ ```
937
+
947
938
  ### `Test::Instance::Geo EE|<full image address>:nightly|latest|any_tag http://geo-primary.gitlab http://geo-secondary.gitlab`
948
939
 
949
940
  This scenario will run tests tagged `:geo` against a live Geo deployment, by spinning up a GitLab QA (`gitlab/gitlab-qa`)
@@ -15,8 +15,7 @@ module Gitlab
15
15
  @environment = {}
16
16
  @volumes = {}
17
17
  @network_aliases = []
18
-
19
- self.exec_commands = []
18
+ @exec_commands = []
20
19
  end
21
20
 
22
21
  def add_network_alias(name)
@@ -22,6 +22,7 @@ module Gitlab
22
22
 
23
23
  command.env("discovery.type", "single-node")
24
24
  command.env("ES_JAVA_OPTS", "-Xms512m -Xmx512m")
25
+ command.env("xpack.security.enabled", "false")
25
26
  end
26
27
  end
27
28
  end
@@ -155,7 +155,6 @@ module Gitlab
155
155
  setup_omnibus
156
156
 
157
157
  @docker.attach(name) do |line, wait|
158
- puts line
159
158
  # TODO, workaround which allows to detach from the container
160
159
  break if /gitlab Reconfigured!/.match?(line)
161
160
  end
@@ -174,11 +173,15 @@ module Gitlab
174
173
  def process_exec_commands
175
174
  @docker.copy(name, DATA_SEED_PATH, DATA_PATH) if seed_admin_token || seed_db
176
175
 
177
- self.exec_commands += seed_admin_token_command if seed_admin_token
178
- self.exec_commands += seed_test_data_command if seed_db
176
+ exec_commands << seed_admin_token_command if seed_admin_token
177
+ exec_commands << seed_test_data_command if seed_db
178
+ exec_commands << Runtime::Scenario.omnibus_exec_commands
179
+
180
+ commands = exec_commands.flatten.uniq
181
+ return if commands.empty?
179
182
 
180
183
  Runtime::Logger.info("Running exec_commands...")
181
- exec_commands.flatten.uniq.each { |command| @docker.exec(name, command) }
184
+ commands.each { |command| @docker.exec(name, command) }
182
185
  end
183
186
 
184
187
  def sha_version
@@ -15,8 +15,13 @@ module Gitlab
15
15
  Docker::Command.execute(%(login --username "#{username}" --password "#{password}" #{registry}), mask_secrets: password)
16
16
  end
17
17
 
18
- def pull(image:, tag: nil)
19
- Docker::Command.execute("pull #{full_image_name(image, tag)}")
18
+ def pull(image:, tag: nil, quiet: true)
19
+ Docker::Command.new("pull").tap do |command|
20
+ command << "-q" if quiet
21
+ command << full_image_name(image, tag)
22
+
23
+ command.execute!
24
+ end
20
25
  end
21
26
 
22
27
  def run(image:, tag: nil, args: [])
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'open3'
2
4
  require 'rainbow/refinement'
3
5
 
@@ -6,35 +8,42 @@ module Gitlab
6
8
  module Docker
7
9
  class Shellout
8
10
  using Rainbow
11
+
9
12
  StatusError = Class.new(StandardError)
10
13
 
11
14
  def initialize(command)
12
15
  @command = command
13
16
  @output = []
14
-
15
- Rainbow.enabled = Runtime::Env.colorized_logs?
16
- Runtime::Logger.info("Docker shell command: `#{@command.mask_secrets}`".cyan)
17
+ @logger = Runtime::Logger.logger
17
18
  end
18
19
 
19
20
  def execute! # rubocop:disable Metrics/AbcSize
20
21
  raise StatusError, 'Command already executed' if @output.any?
21
22
 
23
+ @logger.info("Docker shell command: `#{@command.mask_secrets}`".cyan)
24
+
22
25
  Open3.popen2e(@command.to_s) do |_in, out, wait|
23
26
  out.each do |line|
24
27
  @output.push(line)
25
-
26
- if block_given?
27
- yield line, wait
28
- else
29
- puts line
30
- end
28
+ print "." unless Runtime::Env.ci # indicate progress for local run
29
+ yield line, wait if block_given?
31
30
  end
31
+ puts unless Runtime::Env.ci # add newline after progress dots
32
32
 
33
- if wait.value.exited? && wait.value.exitstatus.nonzero? # rubocop:disable Style/IfUnlessModifier
33
+ if wait.value.exited? && wait.value.exitstatus.nonzero?
34
+ @logger.error("Docker shell command output:\n#{output}")
34
35
  raise StatusError, "Docker command `#{@command.mask_secrets}` failed! ✘"
35
36
  end
37
+
38
+ @logger.debug("Docker shell command output:\n#{output}") unless output.empty?
36
39
  end
37
40
 
41
+ output
42
+ end
43
+
44
+ private
45
+
46
+ def output
38
47
  @output.join.chomp
39
48
  end
40
49
  end
@@ -114,6 +114,9 @@ module Gitlab
114
114
  line.include?(File.basename(report['file_path']))
115
115
  end
116
116
 
117
+ exception['message'].gsub!(/(private_token=)[\w-]+/, '********')
118
+ exception['message_lines'].each { |line| line.gsub!(/(private_token=)([\w-]+)/, '********') }
119
+
117
120
  {
118
121
  'message' => "#{exception['class']}: #{exception['message']}",
119
122
  'message_lines' => exception['message_lines'],
@@ -145,6 +148,7 @@ module Gitlab
145
148
 
146
149
  private
147
150
 
151
+ # rubocop:disable Metrics/AbcSize
148
152
  def failures_from_exceptions
149
153
  failures = report.search('failure')
150
154
  return [] if failures.empty?
@@ -155,12 +159,15 @@ module Gitlab
155
159
  line.include?(File.basename(report['file']))
156
160
  end
157
161
 
162
+ exception['message'].gsub!(/(private_token=)[\w-]+/, '********')
163
+
158
164
  {
159
165
  'message' => "#{exception['type']}: #{exception['message']}",
160
166
  'stacktrace' => trace.slice(0..spec_file_first_index).join("\n")
161
167
  }
162
168
  end
163
169
  end
170
+ # rubocop:enable Metrics/AbcSize
164
171
  end
165
172
  end
166
173
  end
@@ -27,7 +27,6 @@ module Gitlab
27
27
  'QA_COOKIES' => :qa_cookie,
28
28
  'QA_DEBUG' => :qa_debug,
29
29
  'QA_DEFAULT_BRANCH' => :qa_default_branch,
30
- 'QA_LOG_PATH' => :qa_log_path,
31
30
  'QA_CAN_TEST_ADMIN_FEATURES' => :qa_can_test_admin_features,
32
31
  'QA_CAN_TEST_GIT_PROTOCOL_V2' => :qa_can_test_git_protocol_v2,
33
32
  'QA_CAN_TEST_PRAEFECT' => :qa_can_test_praefect,
@@ -168,6 +167,14 @@ module Gitlab
168
167
  enabled?(ENV['QA_DEBUG'], default: true)
169
168
  end
170
169
 
170
+ def log_level
171
+ env_var_value_if_defined('QA_LOG_LEVEL')&.upcase || 'INFO'
172
+ end
173
+
174
+ def log_path
175
+ env_var_value_if_defined('QA_LOG_PATH') || host_artifacts_dir
176
+ end
177
+
171
178
  def default_branch
172
179
  env_var_value_if_defined('QA_DEFAULT_BRANCH') || 'main'
173
180
  end
@@ -11,7 +11,15 @@ module Gitlab
11
11
  def_delegators :logger, :debug, :info, :warn, :error, :fatal, :unknown
12
12
 
13
13
  def self.logger
14
- @logger ||= QA::TestLogger.logger(level: Runtime::Env.debug? ? ::Logger::DEBUG : ::Logger::INFO)
14
+ @logger ||= begin
15
+ log_path = Runtime::Env.log_path
16
+ FileUtils.mkdir_p(log_path) unless File.exist?(log_path)
17
+
18
+ QA::TestLogger.logger(
19
+ level: Runtime::Env.debug? ? "DEBUG" : Runtime::Env.log_level,
20
+ path: log_path
21
+ )
22
+ end
15
23
  end
16
24
  end
17
25
  end
@@ -22,7 +22,8 @@ module Gitlab
22
22
  "gitlab-psql -c 'create database gitlabhq_production_ci owner gitlab'",
23
23
  "gitlab-psql -d gitlabhq_production_ci -c 'create extension btree_gist'",
24
24
  "gitlab-psql -d gitlabhq_production_ci -c 'create extension pg_trgm'",
25
- "gitlab-rake db:structure:load:ci"
25
+ "gitlab-rake db:structure:load:ci",
26
+ "gitlab-ctl restart"
26
27
  ].freeze
27
28
  end
28
29
  end
@@ -5,21 +5,19 @@ module Gitlab
5
5
  module Runtime
6
6
  module OmnibusConfigurations
7
7
  class ObjectStorage < Default
8
- TYPES = %w[artifacts external_diffs lfs uploads packages dependency_proxy].freeze
8
+ TYPES = %w[artifacts external_diffs lfs uploads packages dependency_proxy terraform_state pages].freeze
9
9
 
10
10
  def configuration
11
- TYPES.each_with_object(+'') do |object_type, omnibus|
11
+ config = TYPES.each_with_object(+'') do |object_type, omnibus|
12
12
  omnibus << <<~OMNIBUS
13
- gitlab_rails['#{object_type}_enabled'] = true
14
- gitlab_rails['#{object_type}_storage_path'] = '/var/opt/gitlab/gitlab-rails/shared/#{object_type}'
15
- gitlab_rails['#{object_type}_object_store_enabled'] = true
16
- gitlab_rails['#{object_type}_object_store_remote_directory'] = '#{object_type}-bucket'
17
- gitlab_rails['#{object_type}_object_store_background_upload'] = false
18
- gitlab_rails['#{object_type}_object_store_direct_upload'] = true
19
- gitlab_rails['#{object_type}_object_store_proxy_download'] = true
20
- gitlab_rails['#{object_type}_object_store_connection'] = #{minio.to_config}
13
+ gitlab_rails['object_store']['objects']['#{object_type}']['bucket'] = '#{object_type}-bucket'
21
14
  OMNIBUS
22
15
  end
16
+ config << <<~OMNIBUS
17
+ gitlab_rails['object_store']['enabled'] = true
18
+ gitlab_rails['object_store']['proxy_download'] = true
19
+ gitlab_rails['object_store']['connection'] = #{minio.to_config}
20
+ OMNIBUS
23
21
  end
24
22
 
25
23
  def prepare
@@ -13,6 +13,7 @@ module Gitlab
13
13
  gitlab.release = release
14
14
  gitlab.network = 'test'
15
15
  gitlab.name = 'gitlab'
16
+ gitlab.seed_admin_token = false
16
17
  sign_url_key_path = gitlab.copy_key_file('GOOGLE_CDN_SIGNURL_KEY')
17
18
  cdn_gcloud_path = gitlab.copy_key_file('GOOGLE_CDN_JSON_KEY')
18
19
 
@@ -1,13 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'logger'
4
3
  require 'rainbow'
4
+ require 'active_support/logger'
5
5
 
6
6
  module Gitlab
7
7
  module QA
8
8
  # Common test logger implementation
9
9
  #
10
10
  class TestLogger
11
+ TIME_FORMAT = "%Y-%m-%d %H:%M:%S"
11
12
  LEVEL_COLORS = {
12
13
  "DEBUG" => :magenta,
13
14
  "INFO" => :green,
@@ -18,17 +19,62 @@ module Gitlab
18
19
 
19
20
  Rainbow.enabled = Runtime::Env.colorized_logs?
20
21
 
21
- def self.logger(level: ::Logger::INFO, source: 'Gitlab QA')
22
- ::Logger.new($stdout).tap do |logger|
23
- logger.level = level
22
+ class << self
23
+ # Combined logger instance
24
+ #
25
+ # @param [<Symbol, String>] level
26
+ # @param [String] source
27
+ # @return [ActiveSupport::Logger]
28
+ def logger(level: :info, source: 'Gitlab QA', path: 'tmp')
29
+ console_log = console_logger(level: level, source: source)
30
+ file_log = file_logger(source: source, path: path)
24
31
 
25
- logger.formatter = proc do |severity, datetime, progname, msg|
26
- date_format = datetime.strftime("%Y-%m-%d %H:%M:%S")
27
- msg_prefix = "[date=#{date_format} from=#{source}] #{severity.ljust(5)} -- "
32
+ console_log.extend(ActiveSupport::Logger.broadcast(file_log))
33
+ end
34
+
35
+ private
36
+
37
+ # Console logger instance
38
+ #
39
+ # @param [<Symbol, String>] level
40
+ # @param [String] source
41
+ # @return [ActiveSupport::Logger]
42
+ def console_logger(level:, source:)
43
+ ActiveSupport::Logger.new($stdout, level: level, datetime_format: TIME_FORMAT).tap do |logger|
44
+ logger.formatter = proc do |severity, datetime, progname, msg|
45
+ msg_prefix = message_prefix(datetime, source, severity)
46
+
47
+ Rainbow(msg_prefix).public_send(LEVEL_COLORS.fetch(severity, :silver)) + "#{msg}\n" # rubocop:disable GitlabSecurity/PublicSend
48
+ end
49
+ end
50
+ end
51
+
52
+ # File logger
53
+ #
54
+ # @param [String] source
55
+ # @param [String] path
56
+ # @return [ActiveSupport::Logger]
57
+ def file_logger(source:, path:)
58
+ log_file = "#{path}/#{source.downcase.tr(' ', '-')}.log"
59
+
60
+ ActiveSupport::Logger.new(log_file, level: :debug, datetime_format: TIME_FORMAT).tap do |logger|
61
+ logger.formatter = proc do |severity, datetime, progname, msg|
62
+ msg_prefix = message_prefix(datetime, source, severity)
28
63
 
29
- Rainbow(msg_prefix).public_send(LEVEL_COLORS.fetch(severity, :silver)) + "#{msg}\n" # rubocop:disable GitlabSecurity/PublicSend
64
+ "#{msg_prefix}#{msg}\n"
65
+ end
30
66
  end
31
67
  end
68
+
69
+ # Log message prefix
70
+ #
71
+ # @param [DateTime] date
72
+ # @param [String] source
73
+ # @param [String] severity
74
+ # @return [String]
75
+ def message_prefix(date, source, severity)
76
+ "[date=#{date} from=#{source}] #{severity.ljust(5)} -- "
77
+ end
32
78
  end
33
79
  end
34
80
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '7.27.0'
5
+ VERSION = '7.29.0'
6
6
  end
7
7
  end
data/lib/gitlab/qa.rb CHANGED
@@ -55,7 +55,6 @@ module Gitlab
55
55
  end
56
56
 
57
57
  module Integration
58
- autoload :Actioncable, 'gitlab/qa/scenario/test/integration/actioncable'
59
58
  autoload :Geo, 'gitlab/qa/scenario/test/integration/geo'
60
59
  autoload :LDAP, 'gitlab/qa/scenario/test/integration/ldap'
61
60
  autoload :LDAPNoTLS, 'gitlab/qa/scenario/test/integration/ldap_no_tls'
@@ -15,6 +15,7 @@ class GenerateQAJobs
15
15
  jobs.concat(load_yml_contents('custom_parallel'))
16
16
  jobs.concat(load_yml_contents('instance')) if should_run?('test_instance_all')
17
17
  jobs.concat(load_yml_contents('relative_url')) if should_run?('test_instance_all')
18
+ jobs.concat(load_yml_contents('ci_decomposition')) if should_run?('test_instance_all')
18
19
  jobs.concat(load_yml_contents('repository_storage')) if should_run?('test_instance_all_repository_storage')
19
20
  jobs.concat(load_yml_contents('omnibus_image'))
20
21
  jobs.concat(load_yml_contents('update')) if should_run?('test_instance_all')
@@ -33,7 +34,6 @@ class GenerateQAJobs
33
34
  jobs.concat(load_yml_contents('object_storage_registry_tls')) if should_run?('test_integration_registrytls')
34
35
  jobs.concat(load_yml_contents('registry')) if should_run?('test_integration_registry')
35
36
  jobs.concat(load_yml_contents('packages')) if should_run?('test_instance_all_packages')
36
- jobs.concat(load_yml_contents('actioncable')) if should_run?('test_instance_all_actioncable')
37
37
  jobs.concat(load_yml_contents('elasticsearch')) if should_run?('test_integration_elasticsearch')
38
38
  jobs.concat(load_yml_contents('praefect')) if should_run?('test_instance_all')
39
39
  jobs.concat(load_yml_contents('gitaly_cluster')) if should_run?('test_instance_all')
data/tmp/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ **
2
+
3
+ !.gitignore
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.27.0
4
+ version: 7.29.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-05-17 00:00:00.000000000 Z
11
+ date: 2022-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -218,8 +218,8 @@ files:
218
218
  - ".dockerignore"
219
219
  - ".gitignore"
220
220
  - ".gitlab-ci.yml"
221
- - ".gitlab/ci/jobs/actioncable.gitlab-ci.yml"
222
221
  - ".gitlab/ci/jobs/base.gitlab-ci.yml"
222
+ - ".gitlab/ci/jobs/ci_decomposition.gitlab-ci.yml"
223
223
  - ".gitlab/ci/jobs/cloud_activation.gitlab-ci.yml"
224
224
  - ".gitlab/ci/jobs/custom_parallel.gitlab-ci.yml"
225
225
  - ".gitlab/ci/jobs/ee_previous_to_ce_update.gitlab-ci.yml"
@@ -264,6 +264,7 @@ files:
264
264
  - CONTRIBUTING.md
265
265
  - Dangerfile
266
266
  - Gemfile
267
+ - Gemfile.lock
267
268
  - LICENSE
268
269
  - README.md
269
270
  - Rakefile
@@ -363,7 +364,6 @@ files:
363
364
  - lib/gitlab/qa/scenario/test/instance/staging_geo.rb
364
365
  - lib/gitlab/qa/scenario/test/instance/staging_ref.rb
365
366
  - lib/gitlab/qa/scenario/test/instance/staging_ref_geo.rb
366
- - lib/gitlab/qa/scenario/test/integration/actioncable.rb
367
367
  - lib/gitlab/qa/scenario/test/integration/client_ssl.rb
368
368
  - lib/gitlab/qa/scenario/test/integration/elasticsearch.rb
369
369
  - lib/gitlab/qa/scenario/test/integration/geo.rb
@@ -410,6 +410,7 @@ files:
410
410
  - tls_certificates/gitlab/gitlab.test.crt
411
411
  - tls_certificates/gitlab/gitlab.test.csr
412
412
  - tls_certificates/gitlab/gitlab.test.key
413
+ - tmp/.gitignore
413
414
  homepage: http://about.gitlab.com/
414
415
  licenses:
415
416
  - MIT
@@ -1,41 +0,0 @@
1
- ce:actioncable:
2
- extends:
3
- - .rules:ce-never-when-triggered-by-feature-flag-definition-change
4
- - .test
5
- - .high-capacity
6
- - .ce-variables
7
- - .rspec-report-opts
8
- variables:
9
- QA_SCENARIO: "Test::Integration::Actioncable"
10
-
11
- ce:actioncable-quarantine:
12
- extends:
13
- - .rules:ce-never-when-triggered-by-feature-flag-definition-change
14
- - .test
15
- - .high-capacity
16
- - .ce-variables
17
- - .quarantine
18
- - .rspec-report-opts
19
- variables:
20
- QA_SCENARIO: "Test::Integration::Actioncable"
21
-
22
- ee:actioncable:
23
- extends:
24
- - .rules:ee-never-when-triggered-by-feature-flag-definition-change
25
- - .test
26
- - .high-capacity
27
- - .ee-variables
28
- - .rspec-report-opts
29
- variables:
30
- QA_SCENARIO: "Test::Integration::Actioncable"
31
-
32
- ee:actioncable-quarantine:
33
- extends:
34
- - .rules:ee-never-when-triggered-by-feature-flag-definition-change
35
- - .test
36
- - .high-capacity
37
- - .ee-variables
38
- - .quarantine
39
- - .rspec-report-opts
40
- variables:
41
- QA_SCENARIO: "Test::Integration::Actioncable"
@@ -1,34 +0,0 @@
1
- module Gitlab
2
- module QA
3
- module Scenario
4
- module Test
5
- module Integration
6
- class Actioncable < Scenario::Template
7
- def perform(release, *rspec_args)
8
- Component::Gitlab.perform do |gitlab|
9
- gitlab.release = QA::Release.new(release)
10
- gitlab.name = 'gitlab-actioncable'
11
- gitlab.network = 'test'
12
- gitlab.omnibus_configuration << "actioncable['enable'] = true"
13
-
14
- gitlab.instance do
15
- Runtime::Logger.info('Running actioncable specs!')
16
-
17
- rspec_args << "--" unless rspec_args.include?('--')
18
- rspec_args << %w[--tag actioncable]
19
-
20
- Component::Specs.perform do |specs|
21
- specs.suite = 'Test::Instance::All'
22
- specs.release = gitlab.release
23
- specs.network = gitlab.network
24
- specs.args = [gitlab.address, *rspec_args]
25
- end
26
- end
27
- end
28
- end
29
- end
30
- end
31
- end
32
- end
33
- end
34
- end