gitlab-qa 7.1.1 → 7.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +43 -3
- data/docs/what_tests_can_be_run.md +1 -1
- data/lib/gitlab/qa.rb +2 -2
- data/lib/gitlab/qa/component/gitlab.rb +1 -1
- data/lib/gitlab/qa/report/generate_test_session.rb +3 -1
- data/lib/gitlab/qa/runtime/env.rb +2 -1
- data/lib/gitlab/qa/runtime/omnibus_configurations/license_mode.rb +17 -0
- data/lib/gitlab/qa/scenario/test/integration/client_ssl.rb +65 -0
- data/lib/gitlab/qa/scenario/test/integration/gitaly_cluster.rb +1 -0
- data/lib/gitlab/qa/scenario/test/integration/mtls.rb +0 -2
- data/lib/gitlab/qa/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90a45272bad7c2502b55c9470d0e02410f24db1b36e8e2aec174f8dc93982775
|
4
|
+
data.tar.gz: f6bf58c6f801057533c9dc6078254134bff4087131801cfc69609391c3bba38e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0a99b85b682ac45ba5d1f7252fe61aad5156a21c7b17a7139f3ed1d7a0ff90e4252c7ccd056a6979857a663e27aa69b5167f79c9fd2ef7113311d93d283fa45
|
7
|
+
data.tar.gz: 05c9363dd2fad783a7c162bdbe21924bf763365f5665e35835b468a56400158e6e981e3a3fd0733a3a8915683798cea2c5ff5c429c2edc7fd516dafd15a11f51
|
data/.gitlab-ci.yml
CHANGED
@@ -65,7 +65,7 @@ rspec:
|
|
65
65
|
.test:
|
66
66
|
stage: test
|
67
67
|
services:
|
68
|
-
- docker:
|
68
|
+
- docker:20.10.5-dind
|
69
69
|
tags:
|
70
70
|
- gitlab-org
|
71
71
|
- docker
|
@@ -370,7 +370,7 @@ ee:update:
|
|
370
370
|
- .ee-qa
|
371
371
|
- .rspec-report-opts
|
372
372
|
- .knapsack-variables
|
373
|
-
parallel:
|
373
|
+
parallel: 10
|
374
374
|
|
375
375
|
ee:update-quarantine:
|
376
376
|
script:
|
@@ -775,6 +775,46 @@ ee:packages-quarantine:
|
|
775
775
|
GITLAB_QA_OPTS: "--omnibus-config packages"
|
776
776
|
QA_RSPEC_TAGS: "--tag quarantine --tag packages"
|
777
777
|
|
778
|
+
ce:registry:
|
779
|
+
extends:
|
780
|
+
- .test
|
781
|
+
- .high-capacity
|
782
|
+
- .ce-qa
|
783
|
+
- .rspec-report-opts
|
784
|
+
allow_failure: true
|
785
|
+
variables:
|
786
|
+
QA_SCENARIO: "Test::Integration::Registry"
|
787
|
+
|
788
|
+
ce:registry-quarantine:
|
789
|
+
extends:
|
790
|
+
- .test
|
791
|
+
- .high-capacity
|
792
|
+
- .ce-qa
|
793
|
+
- .quarantine
|
794
|
+
- .rspec-report-opts
|
795
|
+
variables:
|
796
|
+
QA_SCENARIO: "Test::Integration::Registry"
|
797
|
+
|
798
|
+
ee:registry:
|
799
|
+
extends:
|
800
|
+
- .test
|
801
|
+
- .high-capacity
|
802
|
+
- .ee-qa
|
803
|
+
- .rspec-report-opts
|
804
|
+
allow_failure: true
|
805
|
+
variables:
|
806
|
+
QA_SCENARIO: "Test::Integration::Registry"
|
807
|
+
|
808
|
+
ee:registry-quarantine:
|
809
|
+
extends:
|
810
|
+
- .test
|
811
|
+
- .high-capacity
|
812
|
+
- .ee-qa
|
813
|
+
- .quarantine
|
814
|
+
- .rspec-report-opts
|
815
|
+
variables:
|
816
|
+
QA_SCENARIO: "Test::Integration::Registry"
|
817
|
+
|
778
818
|
ce:actioncable:
|
779
819
|
extends:
|
780
820
|
- .test
|
@@ -1039,7 +1079,7 @@ relate_test_failures:
|
|
1039
1079
|
|
1040
1080
|
.notify_upstream_commit:
|
1041
1081
|
stage: notify
|
1042
|
-
image: ruby:
|
1082
|
+
image: ruby:3.0-alpine
|
1043
1083
|
before_script:
|
1044
1084
|
- gem install gitlab --no-document
|
1045
1085
|
|
@@ -73,6 +73,7 @@ All environment variables used by GitLab QA should be defined in [`lib/gitlab/qa
|
|
73
73
|
| `QA_SLOW_CONNECTION_LATENCY_MS` | `2000` | The additional latency (in ms) of the simulated slow connection. | No|
|
74
74
|
| `QA_SLOW_CONNECTION_THROUGHPUT_KBPS` | `32` | The maximum throughput (in kbps) of the simulated slow connection. | No|
|
75
75
|
| `QA_SKIP_PULL` | `false` | Set to `true` to skip pulling docker images (e.g., to use one you built locally). | No|
|
76
|
+
| `QA_GENERATE_ALLURE_REPORT` | `false` | When running on CI, set to `true` to generate allure reports | No|
|
76
77
|
| `GITHUB_USERNAME` |- | Username for authenticating with GitHub. | No|
|
77
78
|
| `GITHUB_PASSWORD` |- | Password for authenticating with GitHub. | No|
|
78
79
|
| `GITLAB_QA_LOOP_RUNNER_MINUTES` | `1` | Minutes to run and repeat a spec while using the '--loop' option; default value is 1 minute. | No|
|
@@ -87,7 +88,6 @@ All environment variables used by GitLab QA should be defined in [`lib/gitlab/qa
|
|
87
88
|
| `GEO_FAILOVER` | `false` | Set to `true` when a Geo secondary site has been promoted to a Geo primary site. | No|
|
88
89
|
| `GITLAB_INITIAL_ROOT_PASSWORD` | `5iveL!fe` | Initial root password for Omnibus installations | No|
|
89
90
|
|
90
|
-
|
91
91
|
## [Supported Remote Grid environment variables](./running_against_remote_grid.md)
|
92
92
|
|
93
93
|
## Running tests with a feature flag enabled
|
data/lib/gitlab/qa.rb
CHANGED
@@ -14,6 +14,7 @@ module Gitlab
|
|
14
14
|
autoload :Default, 'gitlab/qa/runtime/omnibus_configurations/default'
|
15
15
|
autoload :Packages, 'gitlab/qa/runtime/omnibus_configurations/packages'
|
16
16
|
autoload :ObjectStorage, 'gitlab/qa/runtime/omnibus_configurations/object_storage'
|
17
|
+
autoload :LicenseMode, 'gitlab/qa/runtime/omnibus_configurations/license_mode'
|
17
18
|
end
|
18
19
|
end
|
19
20
|
|
@@ -57,8 +58,6 @@ module Gitlab
|
|
57
58
|
autoload :InstanceSAML, 'gitlab/qa/scenario/test/integration/instance_saml'
|
58
59
|
autoload :Mattermost, 'gitlab/qa/scenario/test/integration/mattermost'
|
59
60
|
autoload :Kubernetes, 'gitlab/qa/scenario/test/integration/kubernetes'
|
60
|
-
autoload :ObjectStorage, 'gitlab/qa/scenario/test/integration/object_storage'
|
61
|
-
autoload :Packages, 'gitlab/qa/scenario/test/integration/packages'
|
62
61
|
autoload :Praefect, 'gitlab/qa/scenario/test/integration/praefect'
|
63
62
|
autoload :Elasticsearch, 'gitlab/qa/scenario/test/integration/elasticsearch'
|
64
63
|
autoload :SMTP, 'gitlab/qa/scenario/test/integration/smtp'
|
@@ -66,6 +65,7 @@ module Gitlab
|
|
66
65
|
autoload :Jira, 'gitlab/qa/scenario/test/integration/jira'
|
67
66
|
autoload :SSHTunnel, 'gitlab/qa/scenario/test/integration/ssh_tunnel'
|
68
67
|
autoload :MTLS, 'gitlab/qa/scenario/test/integration/mtls'
|
68
|
+
autoload :ClientSSL, 'gitlab/qa/scenario/test/integration/client_ssl'
|
69
69
|
end
|
70
70
|
|
71
71
|
module Sanity
|
@@ -191,7 +191,9 @@ module Gitlab
|
|
191
191
|
text = tests_with_same_testcase.map(&:name).uniq.join(', ')
|
192
192
|
|
193
193
|
if testcase && !passed
|
194
|
-
|
194
|
+
# Workaround for reducing system notes on testcase issues
|
195
|
+
# The first regex extracts the link to the issues list page from a link to a single issue show page by removing the issue id.
|
196
|
+
"[#{text}](#{testcase.match(%r{[\s\S]+\/[^\/\d]+})}?state=opened&search=#{text}) (testcase_id=#{testcase.match(/\d+/)})"
|
195
197
|
else
|
196
198
|
text
|
197
199
|
end
|
@@ -54,6 +54,7 @@ module Gitlab
|
|
54
54
|
'QA_SIMULATE_SLOW_CONNECTION' => :qa_simulate_slow_connection,
|
55
55
|
'QA_SLOW_CONNECTION_LATENCY_MS' => :qa_slow_connection_latency_ms,
|
56
56
|
'QA_SLOW_CONNECTION_THROUGHPUT_KBPS' => :qa_slow_connection_throughput_kbps,
|
57
|
+
'QA_GENERATE_ALLURE_REPORT' => :generate_allure_report,
|
57
58
|
'GITLAB_QA_USERNAME_1' => :gitlab_qa_username_1,
|
58
59
|
'GITLAB_QA_PASSWORD_1' => :gitlab_qa_password_1,
|
59
60
|
'GITLAB_QA_USERNAME_2' => :gitlab_qa_username_2,
|
@@ -106,7 +107,7 @@ module Gitlab
|
|
106
107
|
end
|
107
108
|
|
108
109
|
def default_branch
|
109
|
-
ENV['QA_DEFAULT_BRANCH'] || '
|
110
|
+
ENV['QA_DEFAULT_BRANCH'] || 'main'
|
110
111
|
end
|
111
112
|
|
112
113
|
def gitlab_availability_timeout
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Gitlab
|
4
|
+
module QA
|
5
|
+
module Runtime
|
6
|
+
module OmnibusConfigurations
|
7
|
+
class LicenseMode < Default
|
8
|
+
def configuration
|
9
|
+
<<~OMNIBUS
|
10
|
+
gitlab_rails['env'] = { 'GITLAB_LICENSE_MODE' => 'test', 'CUSTOMER_PORTAL_URL' => 'https://customers.stg.gitlab.com' }
|
11
|
+
OMNIBUS
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
module Gitlab
|
2
|
+
module QA
|
3
|
+
module Scenario
|
4
|
+
module Test
|
5
|
+
module Integration
|
6
|
+
class ClientSSL < Scenario::Template
|
7
|
+
def initialize
|
8
|
+
@gitlab_name = 'gitlab'
|
9
|
+
@spec_suite = 'Test::Instance::All'
|
10
|
+
@network = 'test'
|
11
|
+
@env = {}
|
12
|
+
@tag = 'client_ssl'
|
13
|
+
end
|
14
|
+
|
15
|
+
# rubocop:disable Metrics/AbcSize
|
16
|
+
def perform(release, *rspec_args)
|
17
|
+
Component::Gitlab.perform do |gitlab|
|
18
|
+
gitlab.release = QA::Release.new(release)
|
19
|
+
gitlab.name = @gitlab_name
|
20
|
+
gitlab.network = @network
|
21
|
+
gitlab.skip_availability_check = true
|
22
|
+
|
23
|
+
gitlab.omnibus_configuration << gitlab_omnibus
|
24
|
+
|
25
|
+
gitlab.tls = true
|
26
|
+
|
27
|
+
gitlab.instance do
|
28
|
+
puts 'Running Client SSL specs!'
|
29
|
+
|
30
|
+
if @tag
|
31
|
+
rspec_args << "--" unless rspec_args.include?('--')
|
32
|
+
rspec_args << "--tag" << @tag
|
33
|
+
end
|
34
|
+
|
35
|
+
Component::Specs.perform do |specs|
|
36
|
+
specs.suite = @spec_suite
|
37
|
+
specs.release = gitlab.release
|
38
|
+
specs.network = gitlab.network
|
39
|
+
specs.args = [gitlab.address, *rspec_args]
|
40
|
+
specs.env = @env
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
# rubocop:enable Metrics/AbcSize
|
46
|
+
|
47
|
+
def gitlab_omnibus
|
48
|
+
<<~OMNIBUS
|
49
|
+
external_url 'https://#{@gitlab_name}.#{@network}';
|
50
|
+
letsencrypt['enable'] = false;
|
51
|
+
|
52
|
+
nginx['ssl_certificate'] = '/etc/gitlab/ssl/gitlab.test.crt';
|
53
|
+
nginx['ssl_certificate_key'] = '/etc/gitlab/ssl/gitlab.test.key';
|
54
|
+
|
55
|
+
nginx['ssl_verify_client'] = 'on';
|
56
|
+
nginx['ssl_client_certificate'] = '/etc/gitlab/authority/ca.pem';
|
57
|
+
nginx['ssl_verify_depth'] = '2';
|
58
|
+
OMNIBUS
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -109,6 +109,7 @@ module Gitlab
|
|
109
109
|
praefect['database_sslmode'] = 'disable';
|
110
110
|
praefect['postgres_queue_enabled'] = true;
|
111
111
|
praefect['failover_enabled'] = true;
|
112
|
+
praefect['failover_election_strategy'] = 'per_repository';
|
112
113
|
praefect['virtual_storages'] = {
|
113
114
|
'default' => {
|
114
115
|
'#{@primary_node_name}' => {
|
@@ -23,7 +23,6 @@ module Gitlab
|
|
23
23
|
|
24
24
|
gitaly.omnibus_configuration << gitaly_omnibus
|
25
25
|
gitaly.gitaly_tls
|
26
|
-
gitaly.exec_commands = ['gitlab-ctl status']
|
27
26
|
|
28
27
|
gitaly.instance do
|
29
28
|
Component::Gitlab.perform do |gitlab|
|
@@ -33,7 +32,6 @@ module Gitlab
|
|
33
32
|
|
34
33
|
gitlab.omnibus_configuration << gitlab_omnibus
|
35
34
|
gitlab.tls = true
|
36
|
-
gitlab.exec_commands = ['gitlab-ctl status']
|
37
35
|
|
38
36
|
gitlab.instance do
|
39
37
|
puts "Running mTLS specs!"
|
data/lib/gitlab/qa/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-qa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitLab Quality
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|
@@ -277,6 +277,7 @@ files:
|
|
277
277
|
- lib/gitlab/qa/runtime/env.rb
|
278
278
|
- lib/gitlab/qa/runtime/omnibus_configuration.rb
|
279
279
|
- lib/gitlab/qa/runtime/omnibus_configurations/default.rb
|
280
|
+
- lib/gitlab/qa/runtime/omnibus_configurations/license_mode.rb
|
280
281
|
- lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
|
281
282
|
- lib/gitlab/qa/runtime/omnibus_configurations/packages.rb
|
282
283
|
- lib/gitlab/qa/runtime/scenario.rb
|
@@ -298,6 +299,7 @@ files:
|
|
298
299
|
- lib/gitlab/qa/scenario/test/instance/staging.rb
|
299
300
|
- lib/gitlab/qa/scenario/test/instance/staging_geo.rb
|
300
301
|
- lib/gitlab/qa/scenario/test/integration/actioncable.rb
|
302
|
+
- lib/gitlab/qa/scenario/test/integration/client_ssl.rb
|
301
303
|
- lib/gitlab/qa/scenario/test/integration/elasticsearch.rb
|
302
304
|
- lib/gitlab/qa/scenario/test/integration/geo.rb
|
303
305
|
- lib/gitlab/qa/scenario/test/integration/gitaly_cluster.rb
|