gitlab-qa 12.5.0 → 13.0.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 +4 -4
- data/.gitlab/merge_request_templates/Release.md +2 -2
- data/Gemfile.lock +1 -1
- data/docs/what_tests_can_be_run.md +6 -2
- data/lib/gitlab/qa/runner.rb +1 -1
- data/lib/gitlab/qa/runtime/env.rb +6 -0
- data/lib/gitlab/qa/runtime/omnibus_configurations/facebook_oauth.rb +6 -6
- data/lib/gitlab/qa/scenario/test/instance/image.rb +2 -0
- data/lib/gitlab/qa/support/http_request.rb +1 -1
- data/lib/gitlab/qa/version.rb +1 -1
- metadata +2 -3
- data/lib/gitlab/qa/scenario/test/integration/oauth.rb +0 -77
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1b0faca28f971a96c2dbbb66253bb39575c8113f5106ee5845bd7d18a49ad14
|
4
|
+
data.tar.gz: 8d3d7ec33d579c662b765beb542c60912997a7a71711eb6b38c4fdbc8fa3580f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 420a71805ccb95a567440373e42592588437b479bcb60d1ad0158e71620d95e679b7f01339a505c626e44c1b262096bfbd0b2b4a9c3eb2011175589de265b1af
|
7
|
+
data.tar.gz: 566711df162bd8506cabc16ffcfc66764d692c86058c5a482343412fd90a75dee821fa086df4459dd0d07abb3f03e6150d9f536afc96c15710a7b7b157b94289
|
@@ -12,8 +12,8 @@ https://gitlab.com/gitlab-org/gitlab-qa/-/compare/v<PREVIOUS_VERSION>...<COMMIT_
|
|
12
12
|
|
13
13
|
## Post-merge checklist
|
14
14
|
|
15
|
-
- [ ] In the `pipeline-common` project, [update the GITLAB_QA_VERSION](https://gitlab.com/gitlab-org/quality/pipeline-common/-/blob/master/ci/base.gitlab-ci.yml) and [create a release](https://gitlab.com/gitlab-org/quality/pipeline-common#release-process).
|
16
|
-
- [ ]
|
15
|
+
- [ ] In the `pipeline-common` project, [update the GITLAB_QA_VERSION](https://gitlab.com/gitlab-org/quality/pipeline-common/-/blob/master/ci/base.gitlab-ci.yml) (make sure to add a `Changelog:` trailer to the commit) and [create a release](https://gitlab.com/gitlab-org/quality/pipeline-common#release-process).
|
16
|
+
- [ ] Unless already done by [`renovate-gitlab-bot`](https://gitlab.com/dashboard/merge_requests?scope=all&state=opened&author_username=gitlab-dependency-update-bot&label_name[]=Engineering%20Productivity), in the GitLab project, update the ref for `pipeline-common` in [`.gitlab/ci/qa-common/main.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/qa-common/main.gitlab-ci.yml).
|
17
17
|
- [ ] Unless already done by [`renovate-gitlab-bot`](https://gitlab.com/dashboard/merge_requests?scope=all&state=opened&author_username=gitlab-dependency-update-bot&label_name[]=Quality), or if you need it sooner, in the GitLab project, update the `gitlab-qa` gem version in [`qa/Gemfile`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/Gemfile) and [`qa/Gemfile.lock`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/Gemfile.lock) (for an example, see: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117054).
|
18
18
|
|
19
19
|
/label ~Quality ~"type::maintenance" ~"maintenance::dependency" ~Quality
|
data/Gemfile.lock
CHANGED
@@ -120,6 +120,8 @@ All environment variables used by GitLab QA should be defined in [`lib/gitlab/qa
|
|
120
120
|
| `WORKSPACES_DOMAIN_KEY` | - | The privkey.pem SSL Certificates for the `WORKSPACES_PROXY_DOMAIN`. See https://gitlab.com/gitlab-org/remote-development/gitlab-workspaces-proxy for instructions. | No |
|
121
121
|
| `WORKSPACES_WILDCARD_CERT` | - | The fullchain.pem SSL Certificates for the Wildcard `WORKSPACES_PROXY_DOMAIN`. See https://gitlab.com/gitlab-org/remote-development/gitlab-workspaces-proxy for instructions.| No |
|
122
122
|
| `WORKSPACES_WILDCARD_KEY` | - | The privkey.pem SSL Certificates for the Wildcard `WORKSPACES_PROXY_DOMAIN`. See https://gitlab.com/gitlab-org/remote-development/gitlab-workspaces-proxy for instructions. | No |
|
123
|
+
| `QA_GITLAB_HOSTNAME` | `"gitlab-#{edition}-#{SecureRandom.hex(4)}"` | A host name for the GitLab instance setup with Test::Instance::Image. | No |
|
124
|
+
| `QA_GITLAB_USE_TLS` | false | Specify if GitLab instance setup with Test::Instance::Image should use TLS | No |
|
123
125
|
|
124
126
|
## [Supported Remote Grid environment variables](./running_against_remote_grid.md)
|
125
127
|
|
@@ -571,7 +573,7 @@ $ export EE_LICENSE=$(cat /path/to/Geo.gitlab_license)
|
|
571
573
|
$ gitlab-qa Test::Integration::InstanceSAML EE
|
572
574
|
```
|
573
575
|
|
574
|
-
### `Test::
|
576
|
+
### `Test::Instance::Image CE|EE|<full image address> --omnibus-config oauth`
|
575
577
|
|
576
578
|
This tests that users can sign in to a GitLab instance using external OAuth services.
|
577
579
|
|
@@ -579,7 +581,7 @@ The tests currently integrate with the following OAuth service providers:
|
|
579
581
|
* GitHub
|
580
582
|
|
581
583
|
To run tests against the GitLab containers, a GitLab QA (`gitlab/gitlab-qa`)
|
582
|
-
container is spun up and tests are run from it by running the `Test::
|
584
|
+
container is spun up and tests are run from it by running the `Test::Instance::All` scenario
|
583
585
|
|
584
586
|
**Required environment variables:**
|
585
587
|
|
@@ -592,6 +594,8 @@ container is spun up and tests are run from it by running the `Test::Integration
|
|
592
594
|
- `QA_1P_PASSWORD`: Password for authenticating into 1Password for GitLab-QA vault. This can be found in the shared 1Password vault.
|
593
595
|
- `QA_1P_SECRET`: Secret for authenticating into 1Password. This can be found in the GitLab-QA 1Password vault.
|
594
596
|
- `QA_1P_GITHUB_UUID`: UUID for GitHub item in GitLab-QA 1Password vault. This can be found in the GitLab-QA 1Password vault.
|
597
|
+
- `QA_GITLAB_HOSTNAME`: Hostname set for GitLab instance. This must be set to `gitlab` as the external OAuth applications have been setup to use this.
|
598
|
+
- `QA_GITLAB_USE_TLS`: Use TLS for setting up GitLab instance. This must be set to `true` as since some external OAuth applications require the client to use TLS.
|
595
599
|
|
596
600
|
Example:
|
597
601
|
|
data/lib/gitlab/qa/runner.rb
CHANGED
@@ -156,7 +156,7 @@ module Gitlab
|
|
156
156
|
Runtime::Scenario.omnibus_exec_commands << configurator.exec_commands
|
157
157
|
|
158
158
|
# Load the configuration
|
159
|
-
|
159
|
+
Runtime::Scenario.omnibus_configuration << configurator.configuration
|
160
160
|
end
|
161
161
|
rescue NameError
|
162
162
|
raise <<~ERROR
|
@@ -81,6 +81,8 @@ module Gitlab
|
|
81
81
|
'QA_GITHUB_PASSWORD' => :qa_github_password,
|
82
82
|
'QA_FACEBOOK_USERNAME' => :qa_facebook_username,
|
83
83
|
'QA_FACEBOOK_PASSWORD' => :qa_facebook_password,
|
84
|
+
'QA_GITLAB_HOSTNAME' => :qa_gitlab_hostname,
|
85
|
+
'QA_GITLAB_USE_TLS' => :qa_gitlab_use_tls,
|
84
86
|
'KNAPSACK_GENERATE_REPORT' => :knapsack_generate_report,
|
85
87
|
'KNAPSACK_REPORT_PATH' => :knapsack_report_path,
|
86
88
|
'KNAPSACK_TEST_FILE_PATTERN' => :knapsack_test_file_pattern,
|
@@ -345,6 +347,10 @@ module Gitlab
|
|
345
347
|
enabled?(env_var_value_if_defined('QA_SKIP_PULL'), default: false)
|
346
348
|
end
|
347
349
|
|
350
|
+
def qa_gitlab_use_tls?
|
351
|
+
enabled?(env_var_value_if_defined('QA_GITLAB_USE_TLS'), default: false)
|
352
|
+
end
|
353
|
+
|
348
354
|
def geo_failover?
|
349
355
|
enabled?(env_var_value_if_defined('GEO_FAILOVER'), default: false)
|
350
356
|
end
|
@@ -6,12 +6,12 @@ module Gitlab
|
|
6
6
|
module OmnibusConfigurations
|
7
7
|
class FacebookOauth < Default
|
8
8
|
def configuration
|
9
|
-
Runtime::Env.
|
9
|
+
Runtime::Env.require_facebook_environment!
|
10
10
|
|
11
11
|
<<~OMNIBUS
|
12
|
-
gitlab_rails['omniauth_enabled'] = true
|
13
|
-
gitlab_rails['omniauth_allow_single_sign_on'] = [facebook']
|
14
|
-
gitlab_rails['omniauth_block_auto_created_users'] = false
|
12
|
+
gitlab_rails['omniauth_enabled'] = true
|
13
|
+
gitlab_rails['omniauth_allow_single_sign_on'] = ['facebook']
|
14
|
+
gitlab_rails['omniauth_block_auto_created_users'] = false
|
15
15
|
gitlab_rails['omniauth_providers'] = [
|
16
16
|
{
|
17
17
|
name: 'facebook',
|
@@ -20,8 +20,8 @@ module Gitlab
|
|
20
20
|
verify_ssl: false
|
21
21
|
}
|
22
22
|
];
|
23
|
-
letsencrypt['enable'] = false
|
24
|
-
external_url '<%= gitlab.address %>'
|
23
|
+
letsencrypt['enable'] = false
|
24
|
+
external_url '<%= gitlab.address %>'
|
25
25
|
OMNIBUS
|
26
26
|
end
|
27
27
|
end
|
@@ -18,7 +18,9 @@ module Gitlab
|
|
18
18
|
gitlab.release = release
|
19
19
|
gitlab.volumes = @volumes
|
20
20
|
gitlab.network = 'test'
|
21
|
+
gitlab.name = Runtime::Env.qa_gitlab_hostname
|
21
22
|
gitlab.seed_admin_token = @seed_admin_token
|
23
|
+
gitlab.tls = Runtime::Env.qa_gitlab_use_tls?
|
22
24
|
|
23
25
|
gitlab.instance do
|
24
26
|
Component::Specs.perform do |specs|
|
@@ -8,7 +8,7 @@ module Gitlab
|
|
8
8
|
module Support
|
9
9
|
class HttpRequest
|
10
10
|
# rubocop:disable Metrics/AbcSize
|
11
|
-
def self.make_http_request(method: 'get', url: nil, params:
|
11
|
+
def self.make_http_request(method: 'get', url: nil, params: nil, headers: {}, show_response: false, fail_on_error: true)
|
12
12
|
raise "URL not defined for making request. Exiting..." unless url
|
13
13
|
|
14
14
|
res = HTTP.follow.method(method).call(url, json: params, headers: headers)
|
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: 13.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: 2023-
|
11
|
+
date: 2023-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|
@@ -462,7 +462,6 @@ files:
|
|
462
462
|
- lib/gitlab/qa/scenario/test/integration/mattermost.rb
|
463
463
|
- lib/gitlab/qa/scenario/test/integration/metrics.rb
|
464
464
|
- lib/gitlab/qa/scenario/test/integration/mtls.rb
|
465
|
-
- lib/gitlab/qa/scenario/test/integration/oauth.rb
|
466
465
|
- lib/gitlab/qa/scenario/test/integration/opensearch.rb
|
467
466
|
- lib/gitlab/qa/scenario/test/integration/praefect.rb
|
468
467
|
- lib/gitlab/qa/scenario/test/integration/registry.rb
|
@@ -1,77 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'yaml'
|
4
|
-
|
5
|
-
module Gitlab
|
6
|
-
module QA
|
7
|
-
module Scenario
|
8
|
-
module Test
|
9
|
-
module Integration
|
10
|
-
class OAuth < Scenario::Template
|
11
|
-
attr_reader :gitlab_name
|
12
|
-
|
13
|
-
def initialize
|
14
|
-
@gitlab_name = 'gitlab'
|
15
|
-
end
|
16
|
-
|
17
|
-
def perform(release, *rspec_args)
|
18
|
-
Runtime::Env.require_oauth_environment!
|
19
|
-
|
20
|
-
release = Release.new(release)
|
21
|
-
|
22
|
-
Component::Gitlab.perform do |gitlab|
|
23
|
-
gitlab.release = release
|
24
|
-
gitlab.network = 'test'
|
25
|
-
gitlab.name = gitlab_name
|
26
|
-
gitlab.tls = true
|
27
|
-
|
28
|
-
gitlab.omnibus_configuration << gitlab_omnibus_configuration(gitlab.address)
|
29
|
-
|
30
|
-
gitlab.instance do
|
31
|
-
Runtime::Logger.info('Running OAuth specs!')
|
32
|
-
|
33
|
-
Component::Specs.perform do |specs|
|
34
|
-
rspec_args << '--' unless rspec_args.include?('--')
|
35
|
-
rspec_args << %w[--tag oauth]
|
36
|
-
specs.suite = 'Test::Instance::All'
|
37
|
-
specs.release = release
|
38
|
-
specs.network = gitlab.network
|
39
|
-
specs.args = [gitlab.address, *rspec_args]
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
private
|
46
|
-
|
47
|
-
def gitlab_omnibus_configuration(gitlab_address)
|
48
|
-
<<~OMNIBUS
|
49
|
-
gitlab_rails['omniauth_enabled'] = true;
|
50
|
-
gitlab_rails['omniauth_allow_single_sign_on'] = ['github', 'facebook'];
|
51
|
-
gitlab_rails['omniauth_block_auto_created_users'] = false;
|
52
|
-
gitlab_rails['omniauth_providers'] = [
|
53
|
-
{
|
54
|
-
name: 'github',
|
55
|
-
app_id: '$QA_GITHUB_OAUTH_APP_ID',
|
56
|
-
app_secret: '$QA_GITHUB_OAUTH_APP_SECRET',
|
57
|
-
url: 'https://github.com/',
|
58
|
-
verify_ssl: false,
|
59
|
-
args: { scope: 'user:email' }
|
60
|
-
},
|
61
|
-
{
|
62
|
-
name: 'facebook',
|
63
|
-
app_id: '$QA_FACEBOOK_OAUTH_APP_ID',
|
64
|
-
app_secret: '$QA_FACEBOOK_OAUTH_APP_SECRET',
|
65
|
-
verify_ssl: false
|
66
|
-
}
|
67
|
-
];
|
68
|
-
letsencrypt['enable'] = false;
|
69
|
-
external_url '#{gitlab_address}';
|
70
|
-
OMNIBUS
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|