gitlab-qa 5.17.1 → 6.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +8 -6
- data/docs/what_tests_can_be_run.md +6 -2
- data/lib/gitlab/qa.rb +3 -0
- data/lib/gitlab/qa/component/base.rb +12 -12
- data/lib/gitlab/qa/report/json_test_results.rb +21 -0
- data/lib/gitlab/qa/report/junit_test_results.rb +21 -0
- data/lib/gitlab/qa/report/results_in_issues.rb +32 -17
- data/lib/gitlab/qa/report/test_result.rb +64 -0
- data/lib/gitlab/qa/runtime/env.rb +2 -1
- data/lib/gitlab/qa/scenario/test/integration/gitaly_cluster.rb +9 -6
- data/lib/gitlab/qa/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52046fa3ef635b05a1b01e3c4d4ec0b3b0cad5abdbdcc52b2d54e07f6b0e19fe
|
4
|
+
data.tar.gz: 6107e5c74d71e9ef3d9c423168676ce877b1745de1e8ba7d7570a2ac001b9c57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3161f3b19e78dffc3baa9baf1b104d925eaf5d3cd091ab28b58d9718ffc3fc5432d53b58b8b2559c0a46a78ac2d852ee28f99a8d5117f882e0cbf8a1e4b5e7c
|
7
|
+
data.tar.gz: 89cad7516fedeb377c8720a00a49553778d6cd6f0075471fd6f44c53bfec6714dbf3a510f5bd3239ae1082f5cca006a911d2758744d885b38e4bfc025ea747f8
|
data/.gitlab-ci.yml
CHANGED
@@ -94,7 +94,7 @@ release:
|
|
94
94
|
- exe/gitlab-qa ${QA_SCENARIO:=Test::Instance::Image} ${RELEASE:=$DEFAULT_RELEASE} -- $QA_TESTS $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
95
95
|
- exe/gitlab-qa-report --update-screenshot-path "gitlab-qa-run-*/**/rspec-*.xml"
|
96
96
|
- export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
|
97
|
-
- if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ]; then
|
97
|
+
- if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ] || [[ "$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
|
98
98
|
- exit $test_run_exit_code
|
99
99
|
|
100
100
|
.ce-qa:
|
@@ -143,7 +143,7 @@ release:
|
|
143
143
|
.rspec-report-opts:
|
144
144
|
variables:
|
145
145
|
FILE_SAFE_JOB_NAME: $(echo $CI_JOB_NAME | sed 's/[ /]/_/g')
|
146
|
-
RSPEC_REPORT_OPTS: "--format RspecJunitFormatter --out \"tmp/rspec-${CI_JOB_ID}.xml\" --format html --out \"tmp/rspec-${FILE_SAFE_JOB_NAME}.htm\" --color --format documentation"
|
146
|
+
RSPEC_REPORT_OPTS: "--format QA::Support::JsonFormatter --out \"tmp/rspec-${CI_JOB_ID}.json\" --format RspecJunitFormatter --out \"tmp/rspec-${CI_JOB_ID}.xml\" --format html --out \"tmp/rspec-${FILE_SAFE_JOB_NAME}.htm\" --color --format documentation"
|
147
147
|
|
148
148
|
.quarantine:
|
149
149
|
allow_failure: true
|
@@ -370,7 +370,7 @@ ce:update:
|
|
370
370
|
script:
|
371
371
|
- exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=CE} ${RELEASE:=CE} -- $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
372
372
|
- export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
|
373
|
-
- if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.
|
373
|
+
- if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ] || [[ "$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
374
|
- exit $test_run_exit_code
|
375
375
|
extends:
|
376
376
|
- .test
|
@@ -384,7 +384,7 @@ ce:update-quarantine:
|
|
384
384
|
script:
|
385
385
|
- exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=CE} ${RELEASE:=CE} -- --tag quarantine --tag ~orchestrated $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
386
386
|
- export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
|
387
|
-
- if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.
|
387
|
+
- if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ] || [[ "$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
388
|
- exit $test_run_exit_code
|
389
389
|
extends:
|
390
390
|
- .test
|
@@ -397,7 +397,7 @@ ee:update:
|
|
397
397
|
script:
|
398
398
|
- exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=EE} ${RELEASE:=EE} -- $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
399
399
|
- export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
|
400
|
-
- if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.
|
400
|
+
- if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ] || [[ "$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
|
401
401
|
- exit $test_run_exit_code
|
402
402
|
extends:
|
403
403
|
- .test
|
@@ -411,7 +411,7 @@ ee:update-quarantine:
|
|
411
411
|
script:
|
412
412
|
- exe/gitlab-qa Test::Omnibus::Update ${RELEASE:=EE} ${RELEASE:=EE} -- --tag quarantine --tag ~orchestrated $RSPEC_REPORT_OPTS || test_run_exit_code=$?
|
413
413
|
- export GITLAB_QA_ACCESS_TOKEN="$GITLAB_QA_PRODUCTION_ACCESS_TOKEN"
|
414
|
-
- if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ]; then exe/gitlab-qa-report --report-in-issues "gitlab-qa-run-*/**/rspec-*.
|
414
|
+
- if [ "$TOP_UPSTREAM_SOURCE_REF" == "master" ] || [[ "$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
|
415
415
|
- exit $test_run_exit_code
|
416
416
|
extends:
|
417
417
|
- .test
|
@@ -676,6 +676,7 @@ ce:kubernetes:
|
|
676
676
|
- .high-capacity
|
677
677
|
- .ce-qa
|
678
678
|
- .rspec-report-opts
|
679
|
+
allow_failure: true
|
679
680
|
variables:
|
680
681
|
QA_SCENARIO: "Test::Integration::Kubernetes"
|
681
682
|
|
@@ -695,6 +696,7 @@ ee:kubernetes:
|
|
695
696
|
- .high-capacity
|
696
697
|
- .ee-qa
|
697
698
|
- .rspec-report-opts
|
699
|
+
allow_failure: true
|
698
700
|
variables:
|
699
701
|
QA_SCENARIO: "Test::Integration::Kubernetes"
|
700
702
|
|
@@ -82,6 +82,7 @@ All environment variables used by GitLab QA should be defined in [`lib/gitlab/qa
|
|
82
82
|
| `GEO_MAX_DB_REPLICATION_TIME` | `120` | Maximum time that a test will wait for database data to appear on a Geo secondary node. | No|
|
83
83
|
| `JIRA_ADMIN_USERNAME` |- | Username for authenticating with Jira server as admin. | No|
|
84
84
|
| `JIRA_ADMIN_PASSWORD` |- | Password for authenticating with Jira server as admin. | No|
|
85
|
+
| `CACHE_NAMESPACE_NAME` | `true` | Cache namespace name for groups. | No|
|
85
86
|
|
86
87
|
## [Supported Remote Grid environment variables](./running_against_remote_grid.md)
|
87
88
|
|
@@ -135,6 +136,10 @@ For example, the following command would use the image named `gitlab/gitlab-ee:n
|
|
135
136
|
$ gitlab-qa Test::Instance::Image EE
|
136
137
|
```
|
137
138
|
|
139
|
+
To run EE tests, the `EE_LICENSE` environment variable needs to be set:
|
140
|
+
|
141
|
+
`$ export EE_LICENSE=$(cat /path/to/GitLab.gitlab_license)`
|
142
|
+
|
138
143
|
## Examples
|
139
144
|
|
140
145
|
### `Test::Instance::Image CE|EE|<full image address>`
|
@@ -251,8 +256,7 @@ of a Gitaly Cluster.
|
|
251
256
|
|
252
257
|
To run tests against the GitLab container, a GitLab QA (`gitlab/gitlab-qa`)
|
253
258
|
container is spun up and tests are run from it by running the
|
254
|
-
`Test::
|
255
|
-
specifically to test Gitaly Cluster features.
|
259
|
+
`Test::Instance::All` scenario with the `:gitaly_cluster` tag.
|
256
260
|
|
257
261
|
Example:
|
258
262
|
|
data/lib/gitlab/qa.rb
CHANGED
@@ -97,9 +97,12 @@ module Gitlab
|
|
97
97
|
end
|
98
98
|
|
99
99
|
module Report
|
100
|
+
autoload :JsonTestResults, 'gitlab/qa/report/json_test_results'
|
101
|
+
autoload :JUnitTestResults, 'gitlab/qa/report/junit_test_results'
|
100
102
|
autoload :PrepareStageReports, 'gitlab/qa/report/prepare_stage_reports'
|
101
103
|
autoload :ResultsInIssues, 'gitlab/qa/report/results_in_issues'
|
102
104
|
autoload :SummaryTable, 'gitlab/qa/report/summary_table'
|
105
|
+
autoload :TestResult, 'gitlab/qa/report/test_result'
|
103
106
|
autoload :UpdateScreenshotPath, 'gitlab/qa/report/update_screenshot_path'
|
104
107
|
end
|
105
108
|
|
@@ -41,26 +41,16 @@ module Gitlab
|
|
41
41
|
raise NotImplementedError, "#{self.class.name} must specify a docker image tag as DOCKER_IMAGE_TAG"
|
42
42
|
end
|
43
43
|
|
44
|
-
def instance
|
44
|
+
def instance(skip_teardown: false)
|
45
45
|
instance_no_teardown do
|
46
46
|
yield self if block_given?
|
47
47
|
end
|
48
48
|
ensure
|
49
|
-
teardown
|
49
|
+
teardown unless skip_teardown
|
50
50
|
end
|
51
51
|
|
52
52
|
alias_method :launch_and_teardown_instance, :instance
|
53
53
|
|
54
|
-
def instance_no_teardown
|
55
|
-
prepare
|
56
|
-
start
|
57
|
-
reconfigure
|
58
|
-
wait_until_ready
|
59
|
-
process_exec_commands
|
60
|
-
|
61
|
-
yield self if block_given?
|
62
|
-
end
|
63
|
-
|
64
54
|
def prepare
|
65
55
|
prepare_docker_image
|
66
56
|
prepare_network
|
@@ -147,6 +137,16 @@ module Gitlab
|
|
147
137
|
raise 'Invalid instance name!' unless name
|
148
138
|
end
|
149
139
|
|
140
|
+
def instance_no_teardown
|
141
|
+
prepare
|
142
|
+
start
|
143
|
+
reconfigure
|
144
|
+
wait_until_ready
|
145
|
+
process_exec_commands
|
146
|
+
|
147
|
+
yield self if block_given?
|
148
|
+
end
|
149
|
+
|
150
150
|
def teardown?
|
151
151
|
!Runtime::Scenario.attributes.include?(:teardown) || Runtime::Scenario.teardown
|
152
152
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'json'
|
4
|
+
|
5
|
+
module Gitlab
|
6
|
+
module QA
|
7
|
+
module Report
|
8
|
+
class JsonTestResults
|
9
|
+
include Enumerable
|
10
|
+
|
11
|
+
def initialize(file)
|
12
|
+
@testcases = JSON.parse(File.read(file))['examples'].map { |test| TestResult.from_json(test) }
|
13
|
+
end
|
14
|
+
|
15
|
+
def each(&block)
|
16
|
+
@testcases.each(&block)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'nokogiri'
|
4
|
+
|
5
|
+
module Gitlab
|
6
|
+
module QA
|
7
|
+
module Report
|
8
|
+
class JUnitTestResults
|
9
|
+
include Enumerable
|
10
|
+
|
11
|
+
def initialize(file)
|
12
|
+
@testcases = Nokogiri::XML(File.read(file)).xpath('//testcase').map { |test| TestResult.from_junit(test) }
|
13
|
+
end
|
14
|
+
|
15
|
+
def each(&block)
|
16
|
+
@testcases.each(&block)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -46,7 +46,18 @@ module Gitlab
|
|
46
46
|
|
47
47
|
Dir.glob(files).each do |file|
|
48
48
|
puts "Reporting tests in #{file}"
|
49
|
-
|
49
|
+
extension = File.extname(file)
|
50
|
+
|
51
|
+
case extension
|
52
|
+
when '.json'
|
53
|
+
test_results = Report::JsonTestResults.new(file)
|
54
|
+
when '.xml'
|
55
|
+
test_results = Report::JUnitTestResults.new(file)
|
56
|
+
else
|
57
|
+
raise "Unknown extension #{extension}"
|
58
|
+
end
|
59
|
+
|
60
|
+
test_results.each do |test|
|
50
61
|
report_test(test)
|
51
62
|
end
|
52
63
|
end
|
@@ -99,9 +110,9 @@ module Gitlab
|
|
99
110
|
end
|
100
111
|
|
101
112
|
def report_test(test)
|
102
|
-
return if test.
|
113
|
+
return if test.skipped
|
103
114
|
|
104
|
-
puts "Reporting test: #{test
|
115
|
+
puts "Reporting test: #{test.file} | #{test.name}"
|
105
116
|
|
106
117
|
issue = find_issue(test)
|
107
118
|
if issue
|
@@ -124,29 +135,37 @@ module Gitlab
|
|
124
135
|
Gitlab.create_issue(
|
125
136
|
project,
|
126
137
|
title_from_test(test),
|
127
|
-
{ description: "### Full description\n\n#{search_safe(test
|
138
|
+
{ description: "### Full description\n\n#{search_safe(test.name)}\n\n### File path\n\n#{test.file}", labels: 'status::automated' }
|
128
139
|
)
|
129
140
|
end
|
130
141
|
end
|
131
142
|
|
143
|
+
# rubocop:disable Metrics/AbcSize
|
132
144
|
def find_issue(test)
|
133
145
|
handle_gitlab_client_exceptions do
|
146
|
+
return Gitlab.issue(project, id_from_testcase_url(test.testcase)) if test.testcase
|
147
|
+
|
134
148
|
issues = Gitlab.issues(project, { search: search_term(test) })
|
135
149
|
.auto_paginate
|
136
150
|
.select { |issue| issue.state == 'opened' && issue.title.strip == title_from_test(test) }
|
137
151
|
|
138
|
-
warn(%(Too many issues found with the file path "#{test
|
152
|
+
warn(%(Too many issues found with the file path "#{test.file}" and name "#{test.name}")) if issues.many?
|
139
153
|
|
140
154
|
issues.first
|
141
155
|
end
|
142
156
|
end
|
157
|
+
# rubocop:enable Metrics/AbcSize
|
158
|
+
|
159
|
+
def id_from_testcase_url(url)
|
160
|
+
url.split('/').last.to_i
|
161
|
+
end
|
143
162
|
|
144
163
|
def search_term(test)
|
145
|
-
%("#{test
|
164
|
+
%("#{test.file}" "#{search_safe(test.name)}")
|
146
165
|
end
|
147
166
|
|
148
167
|
def title_from_test(test)
|
149
|
-
title = "#{partial_file_path(test
|
168
|
+
title = "#{partial_file_path(test.file)} | #{search_safe(test.name)}".strip
|
150
169
|
|
151
170
|
return title unless title.length > MAX_TITLE_LENGTH
|
152
171
|
|
@@ -162,7 +181,7 @@ module Gitlab
|
|
162
181
|
end
|
163
182
|
|
164
183
|
def note_status(issue, test)
|
165
|
-
return if
|
184
|
+
return if test.failures.empty?
|
166
185
|
|
167
186
|
note = note_content(test)
|
168
187
|
|
@@ -176,7 +195,7 @@ module Gitlab
|
|
176
195
|
end
|
177
196
|
|
178
197
|
def note_content(test)
|
179
|
-
errors =
|
198
|
+
errors = test.failures.each_with_object([]) do |failure, text|
|
180
199
|
text << <<~TEXT
|
181
200
|
Error:
|
182
201
|
```
|
@@ -185,7 +204,7 @@ module Gitlab
|
|
185
204
|
|
186
205
|
Stacktrace:
|
187
206
|
```
|
188
|
-
#{failure
|
207
|
+
#{failure['stacktrace']}
|
189
208
|
```
|
190
209
|
TEXT
|
191
210
|
end.join("\n\n")
|
@@ -231,7 +250,7 @@ module Gitlab
|
|
231
250
|
def update_labels(issue, test)
|
232
251
|
labels = issue.labels
|
233
252
|
labels.delete_if { |label| label.start_with?("#{pipeline}::") }
|
234
|
-
labels << (
|
253
|
+
labels << (test.failures.empty? ? "#{pipeline}::passed" : "#{pipeline}::failed")
|
235
254
|
labels << "Enterprise Edition" if ee_test?(test)
|
236
255
|
quarantine_job? ? labels << "quarantine" : labels.delete("quarantine")
|
237
256
|
|
@@ -242,11 +261,7 @@ module Gitlab
|
|
242
261
|
# rubocop:enable Metrics/AbcSize
|
243
262
|
|
244
263
|
def ee_test?(test)
|
245
|
-
test
|
246
|
-
end
|
247
|
-
|
248
|
-
def failures(test)
|
249
|
-
test.search('failure')
|
264
|
+
test.file =~ %r{features/ee/(api|browser_ui)}
|
250
265
|
end
|
251
266
|
|
252
267
|
def pipeline
|
@@ -271,7 +286,7 @@ module Gitlab
|
|
271
286
|
# This error could be raised in assert_user_permission!
|
272
287
|
# If so, we want it to terminate at that point
|
273
288
|
raise
|
274
|
-
rescue SystemCallError, OpenSSL::SSL::SSLError, Net::ReadTimeout, Gitlab::Error::Parsing => e
|
289
|
+
rescue SystemCallError, OpenSSL::SSL::SSLError, Net::OpenTimeout, Net::ReadTimeout, Gitlab::Error::InternalServerError, Gitlab::Error::Parsing => e
|
275
290
|
@retry_backoff += RETRY_BACK_OFF_DELAY
|
276
291
|
|
277
292
|
raise if @retry_backoff > RETRY_BACK_OFF_DELAY * MAX_RETRY_ATTEMPTS
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Gitlab
|
4
|
+
module QA
|
5
|
+
module Report
|
6
|
+
class TestResult
|
7
|
+
attr_accessor :name, :file, :skipped, :failures, :testcase
|
8
|
+
|
9
|
+
def self.from_json(test)
|
10
|
+
new.tap do |test_result|
|
11
|
+
test_result.name = test['full_description']
|
12
|
+
test_result.file = test['file_path']
|
13
|
+
test_result.skipped = test['status'] == 'pending'
|
14
|
+
test_result.failures = failures_from_json_exceptions(test)
|
15
|
+
test_result.testcase = test['testcase']
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.from_junit(test)
|
20
|
+
new.tap do |test_result|
|
21
|
+
test_result.name = test['name']
|
22
|
+
test_result.file = test['file']
|
23
|
+
test_result.skipped = test.search('skipped').any?
|
24
|
+
test_result.failures = failures_from_junit_exceptions(test)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.failures_from_json_exceptions(test)
|
29
|
+
return [] unless test.key?('exceptions')
|
30
|
+
|
31
|
+
test['exceptions'].map do |exception|
|
32
|
+
spec_file_first_index = exception['backtrace'].rindex do |line|
|
33
|
+
line.include?(File.basename(test['file_path']))
|
34
|
+
end
|
35
|
+
|
36
|
+
{
|
37
|
+
'message' => "#{exception['class']}: #{exception['message']}",
|
38
|
+
'stacktrace' => "#{exception['message_lines'].join("\n")}\n#{exception['backtrace'].slice(0..spec_file_first_index).join("\n")}"
|
39
|
+
}
|
40
|
+
end
|
41
|
+
end
|
42
|
+
private_class_method :failures_from_json_exceptions
|
43
|
+
|
44
|
+
def self.failures_from_junit_exceptions(test)
|
45
|
+
failures = test.search('failure')
|
46
|
+
return [] if failures.empty?
|
47
|
+
|
48
|
+
failures.map do |exception|
|
49
|
+
trace = exception.content.split("\n").map(&:strip)
|
50
|
+
spec_file_first_index = trace.rindex do |line|
|
51
|
+
line.include?(File.basename(test['file']))
|
52
|
+
end
|
53
|
+
|
54
|
+
{
|
55
|
+
'message' => "#{exception['type']}: #{exception['message']}",
|
56
|
+
'stacktrace' => trace.slice(0..spec_file_first_index).join("\n")
|
57
|
+
}
|
58
|
+
end
|
59
|
+
end
|
60
|
+
private_class_method :failures_from_junit_exceptions
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -80,7 +80,8 @@ module Gitlab
|
|
80
80
|
'GEO_MAX_DB_REPLICATION_TIME' => :geo_max_db_replication_time,
|
81
81
|
'JIRA_HOSTNAME' => :jira_hostname,
|
82
82
|
'JIRA_ADMIN_USERNAME' => :jira_admin_username,
|
83
|
-
'JIRA_ADMIN_PASSWORD' => :jira_admin_password
|
83
|
+
'JIRA_ADMIN_PASSWORD' => :jira_admin_password,
|
84
|
+
'CACHE_NAMESPACE_NAME' => :cache_namespace_name
|
84
85
|
}.freeze
|
85
86
|
|
86
87
|
ENV_VARIABLES.each_value do |accessor|
|
@@ -7,13 +7,13 @@ module Gitlab
|
|
7
7
|
attr_reader :gitlab_name, :spec_suite
|
8
8
|
|
9
9
|
def initialize
|
10
|
-
@gitlab_name = 'gitlab-gitaly-
|
10
|
+
@gitlab_name = 'gitlab-gitaly-cluster'
|
11
11
|
@primary_node_name = 'gitaly1'
|
12
12
|
@secondary_node_name = 'gitaly2'
|
13
13
|
@tertiary_node_name = 'gitaly3'
|
14
14
|
@praefect_node_name = 'praefect'
|
15
15
|
@database = 'postgres'
|
16
|
-
@spec_suite = 'Test::
|
16
|
+
@spec_suite = 'Test::Instance::All'
|
17
17
|
@network = 'test'
|
18
18
|
end
|
19
19
|
|
@@ -26,7 +26,7 @@ module Gitlab
|
|
26
26
|
sql_node = Component::PostgreSQL.new.tap do |sql|
|
27
27
|
sql.name = @database
|
28
28
|
sql.network = @network
|
29
|
-
sql.
|
29
|
+
sql.instance(skip_teardown: true) do
|
30
30
|
sql.run_psql '-d template1 -c "CREATE DATABASE praefect_production OWNER postgres"'
|
31
31
|
end
|
32
32
|
end
|
@@ -39,7 +39,7 @@ module Gitlab
|
|
39
39
|
|
40
40
|
praefect.omnibus_config = praefect_omnibus_configuration
|
41
41
|
|
42
|
-
praefect.
|
42
|
+
praefect.instance(skip_teardown: true)
|
43
43
|
end
|
44
44
|
|
45
45
|
Component::Gitlab.perform do |gitlab|
|
@@ -49,7 +49,10 @@ module Gitlab
|
|
49
49
|
|
50
50
|
gitlab.omnibus_config = gitlab_omnibus_configuration
|
51
51
|
gitlab.instance do
|
52
|
-
puts "Running Gitaly
|
52
|
+
puts "Running Gitaly Cluster specs!"
|
53
|
+
|
54
|
+
rspec_args << "--" unless rspec_args.include?('--')
|
55
|
+
rspec_args << %w[--tag gitaly_cluster]
|
53
56
|
|
54
57
|
Component::Specs.perform do |specs|
|
55
58
|
specs.suite = spec_suite
|
@@ -190,7 +193,7 @@ module Gitlab
|
|
190
193
|
gitaly.network = @network
|
191
194
|
gitaly.skip_availability_check = true
|
192
195
|
gitaly.omnibus_config = gitaly_omnibus_configuration
|
193
|
-
gitaly.
|
196
|
+
gitaly.instance(skip_teardown: true)
|
194
197
|
end
|
195
198
|
end
|
196
199
|
end
|
data/lib/gitlab/qa/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-qa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grzegorz Bizon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|
@@ -257,9 +257,12 @@ files:
|
|
257
257
|
- lib/gitlab/qa/docker/shellout.rb
|
258
258
|
- lib/gitlab/qa/docker/volumes.rb
|
259
259
|
- lib/gitlab/qa/release.rb
|
260
|
+
- lib/gitlab/qa/report/json_test_results.rb
|
261
|
+
- lib/gitlab/qa/report/junit_test_results.rb
|
260
262
|
- lib/gitlab/qa/report/prepare_stage_reports.rb
|
261
263
|
- lib/gitlab/qa/report/results_in_issues.rb
|
262
264
|
- lib/gitlab/qa/report/summary_table.rb
|
265
|
+
- lib/gitlab/qa/report/test_result.rb
|
263
266
|
- lib/gitlab/qa/report/update_screenshot_path.rb
|
264
267
|
- lib/gitlab/qa/reporter.rb
|
265
268
|
- lib/gitlab/qa/runner.rb
|