gitlab-qa 14.21.0 → 15.0.0

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: d84483452fba7a39c684e4b5b7f772a63712c6d400027b579dca7769ce231c7e
4
- data.tar.gz: 64e52ceaa976d1dc0a3f513a26e71f4e529c5a9d9eea8c39474f683da963d718
3
+ metadata.gz: f9382f0cd194cff2449dde64bb2df1726490adedcd2092ba2dbf86f13b29cc61
4
+ data.tar.gz: 5cd6ade9b04efc469c5f150d7f6d9fb542aa176858dd24be6d5cffb54625d32a
5
5
  SHA512:
6
- metadata.gz: 8633d6f704664548214395cf5e3b8560e6776f0052d5dcf1da91d3239e5489236877495b9bc077043f4efeb588e15272c595dfda0dc147386818d2a3c505d476
7
- data.tar.gz: ca524f4c69c44fab4241cfd836bf2ed0f10047a3b030f942474ed360c8f7356a3ee678aa56dbb59a38697add270dcc8a881789a84fc3c675eb5b65f6395d0425
6
+ metadata.gz: ec4030accb53dc9962aa48df455f1f5537fdc5549b94d5c4224f223bbe27d98a1c9fcca1b4381d79053710aac1eb450298f3782c8a2b53902fba865eda4da5ef
7
+ data.tar.gz: 85f0e1f30d57a5d86f94e612cdfe0c1ccb981ea9e12db6433db433301a7ea6836cfc61a83368d7fdc3d3470b917f67e09ce51c2eb095bb39acd0aad1125a04cf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-qa (14.21.0)
4
+ gitlab-qa (15.0.0)
5
5
  activesupport (>= 6.1, < 7.2)
6
6
  ffi (~> 1.17)
7
7
  gitlab (~> 4.19)
@@ -54,11 +54,11 @@ If they do not match, a test will be signed out when it visits a page directly b
54
54
  **Note:** When you log into your GDK instance of GitLab for the first time, the root password requires a change.
55
55
  GitLab QA expects the default initial password to be used in tests; see all default values listed in
56
56
  [Supported GitLab environment variables](what_tests_can_be_run.md#supported-gitlab-environment-variables).
57
- If you have changed your root password, you must set the `GITLAB_INITIAL_ROOT_PASSWORD` environment
57
+ If you have changed your root password, you must set the `GITLAB_ADMIN_PASSWORD` environment
58
58
  variable.
59
59
 
60
60
  ```shell
61
- export GITLAB_INITIAL_ROOT_PASSWORD="<GDK root password>"
61
+ export GITLAB_ADMIN_PASSWORD="<GDK root password>"
62
62
  ```
63
63
 
64
64
  **Note**: If you encounter the following error, you can resolve it by unsetting the Docker host environment variable using the command `unset DOCKER_HOST`:
@@ -36,20 +36,8 @@ All environment variables used by GitLab QA should be defined in [`lib/gitlab/qa
36
36
  |-----------------------|-----------|-----------------------|----------|
37
37
  | `GITLAB_USERNAME` | `root` | Username to use when signing into GitLab. | Yes|
38
38
  | `GITLAB_PASSWORD` | `5iveL!fe` | Password to use when signing into GitLab. | Yes|
39
- | `GITLAB_FORKER_USERNAME`|- | Username to use for forking a project. | Yes|
40
- | `GITLAB_FORKER_PASSWORD`|- | Password to use for forking a project. | Yes|
41
39
  | `GITLAB_QA_USERNAME_1` |- | Username available in environments where signup is disabled. | No|
42
40
  | `GITLAB_QA_PASSWORD_1` |- | Password for `GITLAB_QA_USERNAME_1` available in environments where signup is disabled (e.g. staging.gitlab.com). | No|
43
- | `GITLAB_QA_USERNAME_2` |- | Another username available in environments where signup is disabled. | No|
44
- | `GITLAB_QA_PASSWORD_2` |- | Password for `GITLAB_QA_USERNAME_2` available in environments where signup is disabled (e.g. staging.gitlab.com). | No|
45
- | `GITLAB_QA_USERNAME_3` |- | Another username available in environments where signup is disabled. | No|
46
- | `GITLAB_QA_PASSWORD_3` |- | Password for `GITLAB_QA_USERNAME_3` available in environments where signup is disabled (e.g. staging.gitlab.com). | No|
47
- | `GITLAB_QA_USERNAME_4` |- | Another username available in environments where signup is disabled. | No|
48
- | `GITLAB_QA_PASSWORD_4` |- | Password for `GITLAB_QA_USERNAME_4` available in environments where signup is disabled (e.g. staging.gitlab.com). | No|
49
- | `GITLAB_QA_USERNAME_5` |- | Another username available in environments where signup is disabled. | No|
50
- | `GITLAB_QA_PASSWORD_5` |- | Password for `GITLAB_QA_USERNAME_5` available in environments where signup is disabled (e.g. staging.gitlab.com). | No|
51
- | `GITLAB_QA_USERNAME_6` |- | Another username available in environments where signup is disabled. | No|
52
- | `GITLAB_QA_PASSWORD_6` |- | Password for `GITLAB_QA_USERNAME_6` available in environments where signup is disabled (e.g. staging.gitlab.com). | No|
53
41
  | `GITLAB_LDAP_USERNAME` |- | LDAP username to use when signing into GitLab. | No|
54
42
  | `GITLAB_LDAP_PASSWORD` |- | LDAP password to use when signing into GitLab. | No|
55
43
  | `GITLAB_ADMIN_USERNAME` |- | Admin username to use when adding a license. | No|
@@ -99,7 +87,6 @@ All environment variables used by GitLab QA should be defined in [`lib/gitlab/qa
99
87
  | `DEPLOY_VERSION` |- | The version of GitLab being tested against. | No|
100
88
  | `GITLAB_QA_USER_AGENT` |- | The browser user-agent to use instead of the default Chrome user-agent. When set to the appropriate value (stored in 1Password), this allows tests to bypass certain login challenges (e.g., reCAPTCHA and ArkoseLabs). | No|
101
89
  | `GEO_FAILOVER` | `false` | Set to `true` when a Geo secondary site has been promoted to a Geo primary site. | No|
102
- | `GITLAB_INITIAL_ROOT_PASSWORD` | `5iveL!fe` | Initial root password for Omnibus installations | No|
103
90
  | `COLORIZED_LOGS` | `false` | Colors GitLab QA and test logs to improve readability | No|
104
91
  | `QA_DOCKER_ADD_HOSTS` |- | Comma separated list of hosts to add to /etc/hosts in docker container | No|
105
92
  | `FIPS` |- | Set to `1` or `true` to indicate that the test is running under FIPS mode | No|
@@ -841,10 +828,6 @@ GitLab project).
841
828
 
842
829
  - `GITLAB_ADMIN_PASSWORD`: The administrator user's password.
843
830
 
844
- - `GITLAB_QA_USERNAME_X`: The username of a pre-generated test user, where `X` is `1` to `6`.
845
-
846
- - `GITLAB_QA_PASSWORD_X`: The pre-generated test user's password.
847
-
848
831
  **Optional environment variables:**
849
832
 
850
833
  - `GITLAB_QA_DEV_ACCESS_TOKEN`: A valid personal access token for the
@@ -966,9 +949,9 @@ to the canary fleet.
966
949
 
967
950
  **Required by specific tests:**
968
951
 
969
- - `GITLAB_QA_USERNAME_X`: The username of a pre-generated test user, where `X` is `1` to `6`.
952
+ - `GITLAB_QA_USERNAME_1`: The username of a pre-generated test user.
970
953
 
971
- - `GITLAB_QA_PASSWORD_X`: The pre-generated test user's password.
954
+ - `GITLAB_QA_PASSWORD_1`: The pre-generated test user's password.
972
955
 
973
956
  **Optional environment variables:**
974
957
 
@@ -11,6 +11,8 @@ module Gitlab
11
11
  extend self
12
12
  using Rainbow
13
13
 
14
+ DEFAULT_ADMIN_PASSWORD = '5iveL!fe'
15
+
14
16
  # Variables that are used in tests and are passed through to the docker container that executes the tests.
15
17
  # These variables should be listed in /docs/what_tests_can_be_run.md#supported-gitlab-environment-variables
16
18
  # unless they're defined elsewhere (e.g.: https://docs.gitlab.com/ee/ci/variables/predefined_variables.html).
@@ -62,7 +64,6 @@ module Gitlab
62
64
  'GITLAB_ADMIN_USERNAME' => :admin_username,
63
65
  'GITLAB_FORKER_PASSWORD' => :forker_password,
64
66
  'GITLAB_FORKER_USERNAME' => :forker_username,
65
- 'GITLAB_INITIAL_ROOT_PASSWORD' => :initial_root_password,
66
67
  'GITLAB_LDAP_PASSWORD' => :ldap_password,
67
68
  'GITLAB_LDAP_USERNAME' => :ldap_username,
68
69
  'GITLAB_PASSWORD' => :user_password,
@@ -76,7 +77,6 @@ module Gitlab
76
77
  'GITLAB_QA_PASSWORD_2' => :gitlab_qa_password_2,
77
78
  'GITLAB_QA_USER_AGENT' => :gitlab_qa_user_agent,
78
79
  'GITLAB_QA_USERNAME_1' => :gitlab_qa_username_1,
79
- 'GITLAB_QA_USERNAME_2' => :gitlab_qa_username_2,
80
80
  'GITLAB_SANDBOX_NAME' => :gitlab_sandbox_name,
81
81
  'GITLAB_TLS_CERTIFICATE' => :gitlab_tls_certificate,
82
82
  'GITLAB_URL' => :gitlab_url,
@@ -187,6 +187,10 @@ module Gitlab
187
187
  qa_variables.merge(defined_variables)
188
188
  end
189
189
 
190
+ def admin_password
191
+ ENV['GITLAB_ADMIN_PASSWORD'] || DEFAULT_ADMIN_PASSWORD
192
+ end
193
+
190
194
  # Variables that should be masked
191
195
  #
192
196
  # @return [Array] the values of the variables that should be masked
@@ -231,10 +235,6 @@ module Gitlab
231
235
  env_var_name_if_defined('GITLAB_QA_DEV_ACCESS_TOKEN')
232
236
  end
233
237
 
234
- def initial_root_password
235
- env_var_value_if_defined('GITLAB_INITIAL_ROOT_PASSWORD') || '5iveL!fe'
236
- end
237
-
238
238
  def host_artifacts_dir
239
239
  @host_artifacts_dir ||= File.join(
240
240
  env_var_value_if_defined('QA_ARTIFACTS_DIR') || '/tmp/gitlab-qa', Runtime::Env.run_id
@@ -333,22 +333,6 @@ module Gitlab
333
333
  raise ArgumentError, "Please provide CLOUD_CONNECTOR_BASE_URL"
334
334
  end
335
335
 
336
- def require_initial_password!
337
- return unless env_var_value_if_defined('GITLAB_INITIAL_ROOT_PASSWORD').to_s.strip.empty?
338
-
339
- raise(
340
- ArgumentError,
341
- "Environment variable GITLAB_INITIAL_ROOT_PASSWORD must be provided to set an initial root password."
342
- )
343
- end
344
-
345
- def override_default_password!
346
- require_initial_password!
347
-
348
- ENV['GITLAB_PASSWORD'] = initial_root_password
349
- ENV['GITLAB_ADMIN_PASSWORD'] = initial_root_password
350
- end
351
-
352
336
  def skip_pull?
353
337
  enabled?(env_var_value_if_defined('QA_SKIP_PULL'), default: false)
354
338
  end
@@ -12,7 +12,7 @@ module Gitlab
12
12
  gitlab_rails['gitlab_default_theme'] = 10 # Light Red Theme
13
13
  gitlab_rails['gitlab_disable_animations'] = true # Disable animations
14
14
  gitlab_rails['application_settings_cache_seconds'] = 0 # Settings cache expiry
15
- gitlab_rails['initial_root_password'] = '#{Runtime::Env.initial_root_password}' # Initial root password
15
+ gitlab_rails['initial_root_password'] = '#{Runtime::Env.admin_password}' # Initial root password
16
16
  OMNIBUS
17
17
  end
18
18
 
@@ -10,9 +10,9 @@ module Gitlab
10
10
  attr_reader :orchestrate_mail_hog_server
11
11
 
12
12
  def initialize
13
+ super
13
14
  @spec_suite = 'Test::Integration::ImportWithSMTP'
14
15
  @orchestrate_mail_hog_server = true
15
- super
16
16
  end
17
17
 
18
18
  def configure_omnibus(gitlab, mail_hog)
@@ -16,60 +16,55 @@ module Gitlab
16
16
  end
17
17
 
18
18
  def perform(release, *rspec_args)
19
- # You can create 2 networks with the same 'human friendly' name if you run network create in parallel
20
- # However this causes 'ambiguous network' errors, so lets just create network manually earlier
21
- # see https://github.com/moby/moby/issues/18864#issuecomment-167006094
22
- # and also api docs https://github.com/moby/moby/blob/master/docs/api/v1.42.yaml#L9932-L9941
23
- docker = Docker::Engine.new
24
- docker.network_create(@network) unless docker.network_exists?(@network)
25
-
26
- gitaly_thread = Thread.new do
27
- Thread.current.abort_on_exception = true
28
- @gitaly_node = Component::Gitlab.perform do |gitaly|
29
- gitaly.release = QA::Release.new(release)
30
- gitaly.name = @gitaly_name
31
- gitaly.network = @network
32
- gitaly.skip_availability_check = true
33
- gitaly.seed_admin_token = false
34
-
35
- gitaly.omnibus_configuration << gitaly_omnibus
36
- gitaly.gitaly_tls = true
37
-
38
- gitaly.instance(skip_teardown: true)
39
- end
40
- end
19
+ gitaly_node = gitaly_node(release)
20
+ gitaly_node.instance(skip_teardown: true)
41
21
 
42
22
  Component::Gitlab.perform do |gitlab|
43
23
  gitlab.release = QA::Release.new(release)
44
24
  gitlab.name = @gitlab_name
45
25
  gitlab.network = @network
46
-
47
- gitlab.omnibus_configuration << gitlab_omnibus
26
+ gitlab.omnibus_configuration << gitlab_omnibus_config
48
27
  gitlab.tls = true
49
28
 
50
29
  gitlab.instance do
51
- gitaly_thread.join
52
30
  Runtime::Logger.info("Running mTLS specs!")
53
-
54
- if @tag
55
- rspec_args << "--" unless rspec_args.include?('--')
56
- rspec_args << "--tag" << @tag
57
- end
58
-
59
- Component::Specs.perform do |specs|
60
- specs.suite = @spec_suite
61
- specs.release = gitlab.release
62
- specs.network = gitlab.network
63
- specs.args = [gitlab.address, *rspec_args]
64
- specs.env = @env
65
- end
31
+ run_mtls_specs(gitlab, *rspec_args)
66
32
  end
67
33
  end
68
- ensure
69
- @gitaly_node&.teardown
34
+ gitaly_node.teardown
35
+ end
36
+
37
+ private
38
+
39
+ def gitaly_node(release)
40
+ Component::Gitlab.new.tap do |gitaly|
41
+ gitaly.release = QA::Release.new(release)
42
+ gitaly.name = @gitaly_name
43
+ gitaly.network = @network
44
+ gitaly.skip_availability_check = true
45
+ gitaly.seed_admin_token = false
46
+
47
+ gitaly.omnibus_configuration << gitaly_omnibus_config
48
+ gitaly.gitaly_tls = true
49
+ end
50
+ end
51
+
52
+ def run_mtls_specs(gitlab, *rspec_args)
53
+ if @tag
54
+ rspec_args << "--" unless rspec_args.include?('--')
55
+ rspec_args << "--tag" << @tag
56
+ end
57
+
58
+ Component::Specs.perform do |specs|
59
+ specs.suite = @spec_suite
60
+ specs.release = gitlab.release
61
+ specs.network = gitlab.network
62
+ specs.args = [gitlab.address, *rspec_args]
63
+ specs.env = @env
64
+ end
70
65
  end
71
66
 
72
- def gitlab_omnibus
67
+ def gitlab_omnibus_config
73
68
  <<~OMNIBUS
74
69
  gitaly['enable'] = false;
75
70
 
@@ -85,7 +80,7 @@ module Gitlab
85
80
  OMNIBUS
86
81
  end
87
82
 
88
- def gitaly_omnibus
83
+ def gitaly_omnibus_config
89
84
  <<~OMNIBUS
90
85
  gitaly['configuration'] = {
91
86
  auth: {
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '14.21.0'
5
+ VERSION = '15.0.0'
6
6
  end
7
7
  end
@@ -67,7 +67,6 @@ module RuboCop
67
67
  'GCLOUD_REGION' => :gcloud_region,
68
68
  'SIGNUP_DISABLED' => :signup_disabled,
69
69
  'GITLAB_QA_USERNAME_1' => :gitlab_qa_username_1,
70
- 'GITLAB_QA_USERNAME_2' => :gitlab_qa_username_2,
71
70
  'QA_GITHUB_USERNAME' => :qa_github_username,
72
71
  'QA_GITLAB_HOSTNAME' => :qa_gitlab_hostname,
73
72
  'QA_GITLAB_USE_TLS' => :qa_gitlab_use_tls,
@@ -107,7 +106,6 @@ module RuboCop
107
106
  'CACHE_NAMESPACE_NAME' => :cache_namespace_name,
108
107
  'GITLAB_QA_USER_AGENT' => :gitlab_qa_user_agent,
109
108
  'GEO_FAILOVER' => :geo_failover,
110
- 'GITLAB_INITIAL_ROOT_PASSWORD' => :initial_root_password,
111
109
  'GITLAB_TLS_CERTIFICATE' => :gitlab_tls_certificate,
112
110
  'AWS_S3_REGION' => :aws_s3_region,
113
111
  'AWS_S3_KEY_ID' => :aws_s3_key_id,
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: 14.21.0
4
+ version: 15.0.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: 2024-11-15 00:00:00.000000000 Z
11
+ date: 2024-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control