gitlab-qa 12.0.0 → 12.1.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: 44c3f1975df510d4b2f4405391b5dc55fdbca1015e648733c9f51ed7a824579c
4
- data.tar.gz: 79b8b01d8ec055ef029993a0c9a02730b99880f8292b5d4d00bba1d6cc68f073
3
+ metadata.gz: afdb9bf3f2ac72d0c781f6d41453c850006761d74a7e3cc7a753b56e07b3bc71
4
+ data.tar.gz: 1c87b39985c2a7816f5710eaefa5721bfcf21aed14c66eddd44fa95756eed809
5
5
  SHA512:
6
- metadata.gz: ed8cc183055d3381e0b356805680a6317df4a07a67f697fd9f8f8c3d558391602653d14b18ed648c681bbdada0dcd8b5a23d113da0115becf7b152279f407e82
7
- data.tar.gz: 20b95e74a751ff88f871511cbf8fe30332fac52f6f80fdf59c03201bbb2bca0f50a65bed640a01f61e0cb8d8395c15359fa55906a3b6ede2a863417e17b1e810
6
+ metadata.gz: 7ec5fea822ba19ff238f741d8b1f9a1ad029ace4334f8dc75a0e8b89f1b231e30fec44bf9dc91c880cac048fc63ebf86b0c85223bf9245ebbcc363c8d87e61be
7
+ data.tar.gz: 9e94728737df591d9aea64471ba3d2ac0a63c25f007405441b345b87814d4d0c6db5335851406ec5a97de71e3c9ffadf6255f4dfcafccd0ff9cde6b6182db576
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-qa (12.0.0)
4
+ gitlab-qa (12.1.0)
5
5
  activesupport (>= 6.1, < 7.1)
6
6
  gitlab (~> 4.19)
7
7
  http (~> 5.0)
@@ -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 only have version 111.0 available for chrome mobile browser testing.
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].each do |env_key|
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;
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '12.0.0'
5
+ VERSION = '12.1.0'
6
6
  end
7
7
  end
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.0.0
4
+ version: 12.1.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-06-28 00:00:00.000000000 Z
11
+ date: 2023-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control