gitlab-qa 12.0.0 → 12.2.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/Gemfile.lock +1 -1
- data/docs/running_against_remote_grid.md +7 -5
- data/lib/gitlab/qa/component/gitaly_cluster.rb +1 -0
- data/lib/gitlab/qa/component/gitlab.rb +19 -0
- data/lib/gitlab/qa/runtime/env.rb +6 -1
- data/lib/gitlab/qa/scenario/test/integration/oauth.rb +7 -1
- data/lib/gitlab/qa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bc6e7f6460f83e7480215fa4b9c99738237ee4e300af3ea3ae2817cc9f734f6
|
4
|
+
data.tar.gz: 0535dfb574921a9dd757ef2d628380827f856165c6921fbbfd79458a92e36ae1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6550c937cdf6c29884168e3aff9f75baaecc1e8919054a49807435f08cdb68fdbab42fb2061fe125228be2be7932cc534a303e831e023967e187add5ec53255
|
7
|
+
data.tar.gz: e6f34c0cbba1f8b35b0ad96cb92fd43234aec4931eae947ad95378f5b8c5d58c9fdaf689acd16a8968eb24c5b2a8cc86a30ca744ee2a0c7166623b51b8fe18c2
|
data/Gemfile.lock
CHANGED
@@ -9,17 +9,17 @@ I.e, if you have a Selenium server set up at http://localhost:4444 or if you hav
|
|
9
9
|
| Variable | Description | Default | Example(s) |
|
10
10
|
|---------------------------|----------------------------------------------------------------|----------|--------------------------------|
|
11
11
|
| QA_BROWSER | Browser to run against | "chrome" | "chrome" "edge" |
|
12
|
-
| QA_SELENOID_BROWSER_VERSION | Version of browser to run against | "111.0" | "latest" "111.0" "mobile-111.0"|
|
13
12
|
| QA_REMOTE_GRID_PROTOCOL | Protocol to use | "http" | "http" "https" |
|
14
13
|
| QA_REMOTE_GRID | Remote grid to run tests against | | "localhost:3000" "provider:80" "selenoid:4444" |
|
15
14
|
| QA_LAYOUT | Used with Selenoid. Tells test nav to expect collapsed menus. "phone" expects collapsed top and left nav bars, "tablet" expects collapsed left nav bar only. | | "phone", "tablet" |
|
16
15
|
| SELENOID_DIRECTORY | Used with Selenoid. Directory to save videos to | "<host_artifacts_dir>/selenoid" | |
|
17
16
|
| USE_SELENOID | Used with Selenoid. Sets up selenoid containers. | false | false, true |
|
18
17
|
| QA_RECORD_VIDEO | Used with Selenoid. Triggers video recording. | false | false, true |
|
18
|
+
| QA_SAVE_ALL_VIDEOS | Used with Selenoid. Saves video for both passed and failed tests | false | false, true |
|
19
19
|
| QA_SELENOID_BROWSER_IMAGE | Used with Selenoid. Sets the browser image to use for video recording. | "selenoid/chrome" | "selenoid/chrome", "registry.gitlab.com/gitlab-org/gitlab-qa/selenoid-chrome-gitlab" |
|
20
|
+
| QA_SELENOID_BROWSER_VERSION | Used in conjunction with QA_SELENOID_BROWSER_IMAGE. Version of browser to run against. | "111.0" | "latest" "111.0" "mobile-111.0"|
|
20
21
|
| QA_VIDEO_RECORDER_IMAGE | Used with Selenoid. Sets the video recorder image to use for video recording. | "presidenten/selenoid-manual-video-recorder" | "presidenten/selenoid-manual-video-recorder" |
|
21
22
|
| QA_VIDEO_RECORDER_VERSION | Used with Selenoid. Sets the video recorder image version to use for video recording. | "latest" | "latest" |
|
22
|
-
| QA_RECORD_VIDEO | Used with Selenoid. Triggers video recording. | false | false, true |
|
23
23
|
| QA_REMOTE_GRID_USERNAME | Used with Sauce Labs. Username to specify in the remote grid. "USERNAME@provider:80" | | "gitlab-sl" |
|
24
24
|
| QA_REMOTE_GRID_ACCESS_KEY | Used with Sauce Labs. Key/Token paired with `QA_REMOTE_GRID_USERNAME` | | |
|
25
25
|
| QA_REMOTE_TUNNEL_ID | Used with Sauce Labs. Name of the remote tunnel to use | "gitlab-sl_tunnel_id" | |
|
@@ -31,7 +31,9 @@ Running directly against an environment like staging is not recommended because
|
|
31
31
|
|
32
32
|
Available browsers are defined in [browsers.json](https://gitlab.com/gitlab-org/gitlab-qa/-/blob/master/fixtures/selenoid/browsers.json)
|
33
33
|
|
34
|
-
Failure videos are available as job artifacts in the selenoid directory.
|
34
|
+
Failure videos are available as job artifacts in the selenoid/video directory and as attachments in the Allure report.
|
35
|
+
|
36
|
+
Specs outside /browser_ui/ folder are not recorded, e.g. api specs.
|
35
37
|
|
36
38
|
### Add failure video recording to a pipeline for a non-live environment
|
37
39
|
|
@@ -56,9 +58,9 @@ QA_LAYOUT="phone"
|
|
56
58
|
QA_SELENOID_BROWSER_IMAGE="registry.gitlab.com/gitlab-org/gitlab-qa/selenoid-chrome-gitlab"
|
57
59
|
QA_SELENOID_BROWSER_VERSION=mobile-111.0
|
58
60
|
|
59
|
-
For now we
|
61
|
+
For now we have a limited number of images available for Chrome mobile browser testing, which can found in [gitlab-qa registry](https://gitlab.com/gitlab-org/gitlab-qa/container_registry/4079425)
|
60
62
|
|
61
|
-
## Testing with Sauce Labs
|
63
|
+
## Testing with Sauce Labs (deprecated)
|
62
64
|
|
63
65
|
Running directly against an environment like staging is not recommended because test logs expose credentials. Therefore, it is best practice and the default to use a tunnel.
|
64
66
|
|
@@ -256,6 +256,12 @@ module Gitlab
|
|
256
256
|
FileUtils.rm_f(path)
|
257
257
|
end
|
258
258
|
|
259
|
+
def teardown!
|
260
|
+
log_pg_stats
|
261
|
+
|
262
|
+
super
|
263
|
+
end
|
264
|
+
|
259
265
|
private
|
260
266
|
|
261
267
|
attr_reader :cert_volumes
|
@@ -308,6 +314,19 @@ module Gitlab
|
|
308
314
|
["gitlab-rails runner #{DATA_PATH}/admin_access_token_seed.rb"]
|
309
315
|
end
|
310
316
|
|
317
|
+
def log_pg_stats
|
318
|
+
Runtime::Logger.debug('Fetching pg statistics')
|
319
|
+
File.open("#{Runtime::Env.host_artifacts_dir}/pg_stats.log", 'a') do |file|
|
320
|
+
file << "#{Time.now.strftime('%Y-%m-%d %H:%M:%S')} -- #{name} -- Postgres statistics after test run:\n"
|
321
|
+
file << "Live and dead row counts:\n"
|
322
|
+
file << @docker.exec(name, %(gitlab-psql -c 'select n_live_tup, n_dead_tup, relname from pg_stat_all_tables order by n_live_tup DESC, n_dead_tup DESC;'))
|
323
|
+
file << "Cumulative user table statistics:\n"
|
324
|
+
file << @docker.exec(name, %(gitlab-psql -c 'select * from pg_stat_user_tables;'))
|
325
|
+
end
|
326
|
+
rescue StandardError => e
|
327
|
+
Runtime::Logger.error("Error getting pg statistics: #{e}")
|
328
|
+
end
|
329
|
+
|
311
330
|
class Availability
|
312
331
|
def initialize(name, relative_path: '', scheme: 'http', protocol_port: 80)
|
313
332
|
@docker = Docker::Engine.new
|
@@ -79,6 +79,8 @@ module Gitlab
|
|
79
79
|
'GITLAB_QA_PASSWORD_2' => :gitlab_qa_password_2,
|
80
80
|
'QA_GITHUB_USERNAME' => :qa_github_username,
|
81
81
|
'QA_GITHUB_PASSWORD' => :qa_github_password,
|
82
|
+
'QA_FACEBOOK_USERNAME' => :qa_facebook_username,
|
83
|
+
'QA_FACEBOOK_PASSWORD' => :qa_facebook_password,
|
82
84
|
'KNAPSACK_GENERATE_REPORT' => :knapsack_generate_report,
|
83
85
|
'KNAPSACK_REPORT_PATH' => :knapsack_report_path,
|
84
86
|
'KNAPSACK_TEST_FILE_PATTERN' => :knapsack_test_file_pattern,
|
@@ -141,6 +143,8 @@ module Gitlab
|
|
141
143
|
'JH_ENV' => :jh_env,
|
142
144
|
'QA_GITHUB_OAUTH_APP_ID' => :github_oauth_app_id,
|
143
145
|
'QA_GITHUB_OAUTH_APP_SECRET' => :github_oauth_app_secret,
|
146
|
+
'QA_FACEBOOK_OAUTH_APP_ID' => :facebook_oauth_app_id,
|
147
|
+
'QA_FACEBOOK_OAUTH_APP_SECRET' => :facebook_oauth_app_secret,
|
144
148
|
'QA_1P_EMAIL' => :qa_1p_email,
|
145
149
|
'QA_1P_PASSWORD' => :qa_1p_password,
|
146
150
|
'QA_1P_SECRET' => :qa_1p_secret,
|
@@ -284,7 +288,8 @@ module Gitlab
|
|
284
288
|
|
285
289
|
def require_oauth_environment!
|
286
290
|
%w[QA_GITHUB_OAUTH_APP_ID QA_GITHUB_OAUTH_APP_SECRET QA_GITHUB_USERNAME
|
287
|
-
QA_GITHUB_PASSWORD QA_1P_EMAIL QA_1P_PASSWORD QA_1P_SECRET QA_1P_GITHUB_UUID
|
291
|
+
QA_GITHUB_PASSWORD QA_1P_EMAIL QA_1P_PASSWORD QA_1P_SECRET QA_1P_GITHUB_UUID QA_FACEBOOK_USERNAME
|
292
|
+
QA_FACEBOOK_PASSWORD QA_FACEBOOK_OAUTH_APP_SECRET QA_FACEBOOK_OAUTH_APP_ID].each do |env_key|
|
288
293
|
unless ENV.key?(env_key)
|
289
294
|
raise ArgumentError,
|
290
295
|
"Environment variable #{env_key} must be set to run OAuth specs"
|
@@ -47,7 +47,7 @@ module Gitlab
|
|
47
47
|
def gitlab_omnibus_configuration(gitlab_address)
|
48
48
|
<<~OMNIBUS
|
49
49
|
gitlab_rails['omniauth_enabled'] = true;
|
50
|
-
gitlab_rails['omniauth_allow_single_sign_on'] = ['github'];
|
50
|
+
gitlab_rails['omniauth_allow_single_sign_on'] = ['github', 'facebook'];
|
51
51
|
gitlab_rails['omniauth_block_auto_created_users'] = false;
|
52
52
|
gitlab_rails['omniauth_providers'] = [
|
53
53
|
{
|
@@ -57,6 +57,12 @@ module Gitlab
|
|
57
57
|
url: 'https://github.com/',
|
58
58
|
verify_ssl: false,
|
59
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
|
60
66
|
}
|
61
67
|
];
|
62
68
|
letsencrypt['enable'] = false;
|
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: 12.
|
4
|
+
version: 12.2.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-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|