gitlab-qa 5.3.0 → 5.4.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: 7e9cf3fd69ecf574cc318f194a49e715050b7fe6708327c1555264c589722de3
4
- data.tar.gz: 695c6e1e0b2f49615b42b83765353c80c0613b832636231bad0022dbddb2efcb
3
+ metadata.gz: 6c05160ceef2a5c1f1cb655a1a0e00dafe3fc741c83cf3720cceaf5c052e99e6
4
+ data.tar.gz: c734271a54bd03542af38490299bf88d9f9feb1038862852c4b3ae9fd2bb4955
5
5
  SHA512:
6
- metadata.gz: 2cc293bccacd51527427585000e3058fc2853254c890f4965d3cb0245395b0e12455cbf57f50b1555414a7dd74b375d6f6061a2a7be24d0ecc3dc59360e732eb
7
- data.tar.gz: 4b4de8b9fdb59f1ac502a9d5c0d25184bf80121aea31a549cb8577c578ea7fbaa8166803b886872f59a5873eee430c0435a70641d4d20c87d90febca1ff372a1
6
+ metadata.gz: b71209010fc236f2907dc7cb03cccc3761ecc28b65ca698503f05f24503ac8963cb3018288c301f6e78dff1a11d41cc315600f84c6bbc74ed02ea67b13efec0f
7
+ data.tar.gz: df6c7202be25a0dc0d6e0f8c0283313d4bd38f374ad62e0e66403be5be066471e779e45481d683c76b5267eaa4bbba330ff49f38898a38d5c89aee9b59ef9eed
data/.gitlab-ci.yml CHANGED
@@ -693,44 +693,6 @@ ee:object_storage-quarantine:
693
693
  variables:
694
694
  QA_SCENARIO: "Test::Integration::ObjectStorage"
695
695
 
696
- ce:oauth:
697
- extends:
698
- - .test
699
- - .high-capacity
700
- - .ce-qa
701
- - .rspec-report-opts
702
- variables:
703
- QA_SCENARIO: "Test::Integration::OAuth"
704
-
705
- ce:oauth-quarantine:
706
- extends:
707
- - .test
708
- - .high-capacity
709
- - .ce-qa
710
- - .quarantine
711
- - .rspec-report-opts
712
- variables:
713
- QA_SCENARIO: "Test::Integration::OAuth"
714
-
715
- ee:oauth:
716
- extends:
717
- - .test
718
- - .high-capacity
719
- - .ee-qa
720
- - .rspec-report-opts
721
- variables:
722
- QA_SCENARIO: "Test::Integration::OAuth"
723
-
724
- ee:oauth-quarantine:
725
- extends:
726
- - .test
727
- - .high-capacity
728
- - .ee-qa
729
- - .quarantine
730
- - .rspec-report-opts
731
- variables:
732
- QA_SCENARIO: "Test::Integration::OAuth"
733
-
734
696
  ee:packages:
735
697
  extends:
736
698
  - .test
@@ -74,14 +74,8 @@ For more details on the internals, please read the
74
74
  * `QA_SLOW_CONNECTION_LATENCY_MS` - the additional latency (in ms) of the simulated slow connection (default 2000 ms).
75
75
  * `QA_SLOW_CONNECTION_THROUGHPUT_KBPS` - the maximum throughput (in kbps) of the simulated slow connection (default 32 kbps).
76
76
  * `QA_SKIP_PULL` - set to `true` to skip pulling docker images (e.g., to use one you built locally).
77
- * `GITHUB_OAUTH_APP_ID` - Client ID for GitHub OAuth app. See https://docs.gitlab.com/ce/integration/github.html for steps to generate this token.
78
- * `GITHUB_OAUTH_APP_SECRET` - Client Secret for GitHub OAuth app. See https://docs.gitlab.com/ce/integration/github.html for steps to generate this token.
79
77
  * `GITHUB_USERNAME` - Username for authenticating with GitHub.
80
78
  * `GITHUB_PASSWORD` - Password for authenticating with GitHub.
81
- * `GITLAB_QA_1P_EMAIL` - Email address for authenticating into 1Password
82
- * `GITLAB_QA_1P_PASSWORD` - Password for authenticating into 1Password.
83
- * `GITLAB_QA_1P_SECRET` - Secret for authenticating into 1Password.
84
- * `GITLAB_QA_1P_GITHUB_UUID` - UUID for GitHub item in GitLab-QA 1Password vault.
85
79
  * `GITLAB_QA_LOOP_RUNNER_MINUTES` - Minutes to run and repeat a spec while using the '--loop' option; default value is 1 minute.
86
80
  * `CI_SERVER_PERSONAL_ACCESS_TOKEN` - Personal access token of the server that is running the CI pipeline. This is used for pulling CI_RUNNER information in certain tests.
87
81
 
@@ -387,49 +381,6 @@ $ export EE_LICENSE=$(cat /path/to/Geo.gitlab_license)
387
381
  $ gitlab-qa Test::Integration::InstanceSAML EE
388
382
  ```
389
383
 
390
- ### `Test::Integration::OAuth CE|EE|<full image address>`
391
-
392
- This tests that users can sign in to GitLab instance using external OAuth services.
393
-
394
- The tests currently integrate with the following OAuth service providers:
395
- * GitHub
396
-
397
- To run tests against the GitLab containers, a GitLab QA (`gitlab/gitlab-qa`)
398
- container is spun up and tests are run from it by running the
399
- `Test::Integration::OAuth` scenario (located under [`gitlab-org/gitlab-ce@qa/qa/scenario/test/integration/oauth.rb`](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/qa/qa/scenario/test/integration/oauth.rb) in the GitLab CE project).
400
-
401
- **Required environment variables:**
402
-
403
- - [For EE only] `EE_LICENSE`: A valid EE license.
404
- - `GITHUB_OAUTH_APP_ID`: Client ID for GitHub OAuth app. This can be found in the shared 1Password vault.
405
- - `GITHUB_OAUTH_APP_SECRET`: Client Secret for GitHub OAuth app. This can be found in the shared 1Password vault.
406
- - `GITHUB_USERNAME`: Username for authenticating with GitHub. This can be found in the shared 1Password vault.
407
- - `GITHUB_PASSWORD`: Password for authenticating with GitHub. This can be found in the shared 1Password vault.
408
- - `GITLAB_QA_1P_EMAIL`: Email address for authenticating into 1Password for GitLab-QA vault. This can be found in the shared 1Password vault.
409
- - `GITLAB_QA_1P_PASSWORD`: Password for authenticating into 1Password for GitLab-QA vault. This can be found in the shared 1Password vault.
410
- - `GITLAB_QA_1P_SECRET`: Secret for authenticating into 1Password. This can be found in the GitLab-QA 1Password vault.
411
- - `GITLAB_QA_1P_GITHUB_UUID`: UUID for GitHub item in GitLab-QA 1Password vault. This can be found in the GitLab-QA 1Password vault.
412
-
413
- Example:
414
-
415
- ```
416
- $ export GITHUB_OAUTH_APP_ID=your_github_oauth_client_id
417
- $ export GITHUB_OAUTH_APP_SECRET=your_github_oauth_client_secret
418
- $ export GITHUB_USERNAME=your_github_username
419
- $ export GITHUB_PASSWORD=your_github_password
420
- $ export GITLAB_QA_1P_EMAIL=1password_email
421
- $ export GITLAB_QA_1P_PASSWORD=1password_password
422
- $ export GITLAB_QA_1P_SECRET=1password_secret
423
- $ export GITLAB_QA_1P_GITHUB_UUID=1password_gihub_item_uuid
424
-
425
- $ gitlab-qa Test::Integration::OAuth CE
426
-
427
- # For EE
428
- $ export EE_LICENSE=$(cat /path/to/gitlab_license)
429
-
430
- $ gitlab-qa Test::Integration::OAuth EE
431
- ```
432
-
433
384
  ### `Test::Integration::Mattermost CE|EE|<full image address>`
434
385
 
435
386
  This tests that a GitLab instance works as expected when enabling the embedded
data/lib/gitlab/qa.rb CHANGED
@@ -46,7 +46,6 @@ module Gitlab
46
46
  autoload :Mattermost, 'gitlab/qa/scenario/test/integration/mattermost'
47
47
  autoload :Kubernetes, 'gitlab/qa/scenario/test/integration/kubernetes'
48
48
  autoload :ObjectStorage, 'gitlab/qa/scenario/test/integration/object_storage'
49
- autoload :OAuth, 'gitlab/qa/scenario/test/integration/oauth'
50
49
  autoload :Packages, 'gitlab/qa/scenario/test/integration/packages'
51
50
  autoload :Praefect, 'gitlab/qa/scenario/test/integration/praefect'
52
51
  autoload :Elasticsearch, 'gitlab/qa/scenario/test/integration/elasticsearch'
@@ -177,7 +177,14 @@ module Gitlab
177
177
  end
178
178
 
179
179
  def failure_summary
180
- ":x: ~\"#{pipeline}::failed\" in job `#{Runtime::Env.ci_job_name}` in #{Runtime::Env.ci_job_url}"
180
+ summary = [":x: ~\"#{pipeline}::failed\""]
181
+ summary << "~\"quarantine\"" if quarantine_job?
182
+ summary << "in job `#{Runtime::Env.ci_job_name}` in #{Runtime::Env.ci_job_url}"
183
+ summary.join(' ')
184
+ end
185
+
186
+ def quarantine_job?
187
+ Runtime::Env.ci_job_name&.include?('quarantine')
181
188
  end
182
189
 
183
190
  def new_note_matches_discussion?(note, discussion)
@@ -196,6 +203,7 @@ module Gitlab
196
203
  labels = issue.labels
197
204
  labels.delete_if { |label| label.start_with?("#{pipeline}::") }
198
205
  labels << (failures(test).empty? ? "#{pipeline}::passed" : "#{pipeline}::failed")
206
+ quarantine_job? ? labels << "quarantine" : labels.delete("quarantine")
199
207
 
200
208
  Gitlab.edit_issue(project, issue.iid, labels: labels)
201
209
  end
@@ -51,8 +51,6 @@ module Gitlab
51
51
  'GITLAB_QA_PASSWORD_1' => :gitlab_qa_password_1,
52
52
  'GITLAB_QA_USERNAME_2' => :gitlab_qa_username_2,
53
53
  'GITLAB_QA_PASSWORD_2' => :gitlab_qa_password_2,
54
- 'GITHUB_OAUTH_APP_ID' => :github_oauth_app_id,
55
- 'GITHUB_OAUTH_APP_SECRET' => :github_oauth_app_secret,
56
54
  'GITHUB_USERNAME' => :github_username,
57
55
  'GITHUB_PASSWORD' => :github_password,
58
56
  'KNAPSACK_GENERATE_REPORT' => :knapsack_generate_report,
@@ -68,10 +66,6 @@ module Gitlab
68
66
  'GITLAB_CI' => :gitlab_ci,
69
67
  'QA_SKIP_PULL' => :qa_skip_pull,
70
68
  'ELASTIC_URL' => :elastic_url,
71
- 'GITLAB_QA_1P_EMAIL' => :gitlab_qa_1p_email,
72
- 'GITLAB_QA_1P_PASSWORD' => :gitlab_qa_1p_password,
73
- 'GITLAB_QA_1P_SECRET' => :gitlab_qa_1p_secret,
74
- 'GITLAB_QA_1P_GITHUB_UUID' => :gitlab_qa_1p_github_uuid,
75
69
  'GITLAB_QA_LOOP_RUNNER_MINUTES' => :gitlab_qa_loop_runner_minutes,
76
70
  'MAILHOG_HOSTNAME' => :mailhog_hostname,
77
71
  'SLACK_QA_CHANNEL' => :slack_qa_channel,
@@ -168,12 +162,6 @@ module Gitlab
168
162
  raise ArgumentError, "Please provide GITLAB_QA_DEV_ACCESS_TOKEN"
169
163
  end
170
164
 
171
- def require_oauth_environment!
172
- %w[GITHUB_OAUTH_APP_ID GITHUB_OAUTH_APP_SECRET GITHUB_USERNAME GITHUB_PASSWORD GITLAB_QA_1P_EMAIL GITLAB_QA_1P_PASSWORD GITLAB_QA_1P_SECRET GITLAB_QA_1P_GITHUB_UUID].each do |env_key|
173
- raise ArgumentError, "Environment variable #{env_key} must be set to run OAuth specs" unless ENV.key?(env_key)
174
- end
175
- end
176
-
177
165
  def require_slack_qa_channel!
178
166
  return unless ENV['SLACK_QA_CHANNEL'].to_s.strip.empty?
179
167
 
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module QA
3
- VERSION = '5.3.0'.freeze
3
+ VERSION = '5.4.0'.freeze
4
4
  end
5
5
  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: 5.3.0
4
+ version: 5.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grzegorz Bizon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-24 00:00:00.000000000 Z
11
+ date: 2020-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -282,7 +282,6 @@ files:
282
282
  - lib/gitlab/qa/scenario/test/integration/ldap_no_tls.rb
283
283
  - lib/gitlab/qa/scenario/test/integration/ldap_tls.rb
284
284
  - lib/gitlab/qa/scenario/test/integration/mattermost.rb
285
- - lib/gitlab/qa/scenario/test/integration/oauth.rb
286
285
  - lib/gitlab/qa/scenario/test/integration/object_storage.rb
287
286
  - lib/gitlab/qa/scenario/test/integration/packages.rb
288
287
  - lib/gitlab/qa/scenario/test/integration/praefect.rb
@@ -1,57 +0,0 @@
1
- require 'yaml'
2
-
3
- module Gitlab
4
- module QA
5
- module Scenario
6
- module Test
7
- module Integration
8
- class OAuth < Scenario::Template
9
- attr_reader :gitlab_name
10
-
11
- def initialize
12
- @gitlab_name = 'gitlab-oauth'
13
- end
14
-
15
- def perform(release, *rspec_args)
16
- Runtime::Env.require_oauth_environment!
17
- release = Release.new(release)
18
-
19
- Component::Gitlab.perform do |gitlab|
20
- gitlab.release = release
21
- gitlab.network = 'test'
22
- gitlab.name = gitlab_name
23
-
24
- gitlab.omnibus_config = <<~OMNIBUS
25
- gitlab_rails['omniauth_enabled'] = true;
26
- gitlab_rails['omniauth_allow_single_sign_on'] = ['github'];
27
- gitlab_rails['omniauth_block_auto_created_users'] = false;
28
- gitlab_rails['omniauth_providers'] = [
29
- {
30
- name: 'github',
31
- app_id: '$GITHUB_OAUTH_APP_ID',
32
- app_secret: '$GITHUB_OAUTH_APP_SECRET',
33
- url: 'https://github.com/',
34
- verify_ssl: false,
35
- args: { scope: 'user:email' }
36
- }
37
- ];
38
- OMNIBUS
39
-
40
- gitlab.instance do
41
- puts 'Running OAuth specs!'
42
-
43
- Component::Specs.perform do |specs|
44
- specs.suite = 'Test::Integration::OAuth'
45
- specs.release = release
46
- specs.network = gitlab.network
47
- specs.args = [gitlab.address, *rspec_args]
48
- end
49
- end
50
- end
51
- end
52
- end
53
- end
54
- end
55
- end
56
- end
57
- end