gitlab-qa 2.11.0 → 2.12.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbdc07d475c334682d19f722cc53a23ecc9e701e0faf1e44d17d6177649ea97a
4
- data.tar.gz: 3d6dd8396cae8b7ed3ebe0a54143b024651baf8eb2e9c3664607933a33bf9299
3
+ metadata.gz: 0fbcfe2effed0e891ccaa98dab7238ee078727e01348f8f4669a6b9ed62cd8c1
4
+ data.tar.gz: '0271782dcad8bae1da2894d3490eb9ed38a1f6912e8b6036d72b164c455c0bba'
5
5
  SHA512:
6
- metadata.gz: b3f1b8e302f00c3f01d7d0aa98d8b2ede1e35205b3e7ee30db30defbe5d2dee8f9e43d1123a0bf8a54300ddfc14ab5f260ae7e0354dbf309ff94ccc90b4bf108
7
- data.tar.gz: 578b24ccbc63f39637a7b00d26ba05bd5de70bc48516253d9e195bfa43c1d6b1be1e913b3aa2f67d6b7bf63168b8c67a3e669e681875ca450c73a523f48ab6c1
6
+ metadata.gz: 9fd00c0536cc2e88b1d90f1004499f80155666cc0bef534e3674ca6e5a8f448ada0630f853d4461a22fddcc935ba4616649f8d0da5db8f8a1fdb6ddca01e0e24
7
+ data.tar.gz: ee77ef08427d485c0770882bf44319dcad5a06ec8af8b90009a355dc0836945fb7dc89af7e5bb947856ff30f100603c9755c47026ea62a401b9d5bd47b861bda
data/.gitlab-ci.yml CHANGED
@@ -92,6 +92,14 @@ ce:instance:
92
92
  <<: *high-capacity
93
93
  <<: *ce-qa
94
94
 
95
+ ce:instance-quarantine:
96
+ allow_failure: true
97
+ script:
98
+ - bin/qa Test::Instance::Image ${RELEASE:=CE} --tag quarantine --tag ~orchestrated
99
+ <<: *test
100
+ <<: *high-capacity
101
+ <<: *ce-qa
102
+
95
103
  ee:instance:
96
104
  script:
97
105
  - bin/qa Test::Instance::Image ${RELEASE:=EE}
@@ -99,6 +107,14 @@ ee:instance:
99
107
  <<: *high-capacity
100
108
  <<: *ee-qa
101
109
 
110
+ ee:instance-quarantine:
111
+ allow_failure: true
112
+ script:
113
+ - bin/qa Test::Instance::Image ${RELEASE:=EE} --tag quarantine --tag ~orchestrated
114
+ <<: *test
115
+ <<: *high-capacity
116
+ <<: *ee-qa
117
+
102
118
  ce:relative_url:
103
119
  script:
104
120
  - bin/qa Test::Instance::RelativeUrl ${RELEASE:=CE}
@@ -181,6 +197,14 @@ ce:ldap_no_tls:
181
197
  <<: *high-capacity
182
198
  <<: *ce-qa
183
199
 
200
+ ce:ldap_no_tls-quarantine:
201
+ allow_failure: true
202
+ script:
203
+ - bin/qa Test::Integration::LDAPNoTLS ${RELEASE:=CE} --tag quarantine
204
+ <<: *test
205
+ <<: *high-capacity
206
+ <<: *ce-qa
207
+
184
208
  ee:ldap_no_tls:
185
209
  script:
186
210
  - bin/qa Test::Integration::LDAPNoTLS ${RELEASE:=EE}
@@ -188,6 +212,14 @@ ee:ldap_no_tls:
188
212
  <<: *high-capacity
189
213
  <<: *ee-qa
190
214
 
215
+ ee:ldap_no_tls-quarantine:
216
+ allow_failure: true
217
+ script:
218
+ - bin/qa Test::Integration::LDAPNoTLS ${RELEASE:=EE} --tag quarantine
219
+ <<: *test
220
+ <<: *high-capacity
221
+ <<: *ee-qa
222
+
191
223
  ce:ldap_tls:
192
224
  script:
193
225
  - bin/qa Test::Integration::LDAPTLS ${RELEASE:=CE}
@@ -195,6 +227,14 @@ ce:ldap_tls:
195
227
  <<: *high-capacity
196
228
  <<: *ce-qa
197
229
 
230
+ ce:ldap_tls-quarantine:
231
+ allow_failure: true
232
+ script:
233
+ - bin/qa Test::Integration::LDAPTLS ${RELEASE:=CE} --tag quarantine
234
+ <<: *test
235
+ <<: *high-capacity
236
+ <<: *ce-qa
237
+
198
238
  ee:ldap_tls:
199
239
  script:
200
240
  - bin/qa Test::Integration::LDAPTLS ${RELEASE:=EE}
@@ -202,6 +242,14 @@ ee:ldap_tls:
202
242
  <<: *high-capacity
203
243
  <<: *ee-qa
204
244
 
245
+ ee:ldap_tls-quarantine:
246
+ allow_failure: true
247
+ script:
248
+ - bin/qa Test::Integration::LDAPTLS ${RELEASE:=EE} --tag quarantine
249
+ <<: *test
250
+ <<: *high-capacity
251
+ <<: *ee-qa
252
+
205
253
  ce:instance_saml:
206
254
  script:
207
255
  - bin/qa Test::Integration::InstanceSAML ${RELEASE:=CE}
@@ -230,6 +278,14 @@ ce:kubernetes:
230
278
  <<: *high-capacity
231
279
  <<: *ce-qa
232
280
 
281
+ ce:kubernetes-quarantine:
282
+ allow_failure: true
283
+ script:
284
+ - bin/qa Test::Integration::Kubernetes ${RELEASE:=CE} --tag quarantine
285
+ <<: *test
286
+ <<: *high-capacity
287
+ <<: *ce-qa
288
+
233
289
  ee:kubernetes:
234
290
  script:
235
291
  - bin/qa Test::Integration::Kubernetes ${RELEASE:=EE}
@@ -237,6 +293,14 @@ ee:kubernetes:
237
293
  <<: *high-capacity
238
294
  <<: *ee-qa
239
295
 
296
+ ee:kubernetes-quarantine:
297
+ allow_failure: true
298
+ script:
299
+ - bin/qa Test::Integration::Kubernetes ${RELEASE:=EE} --tag quarantine
300
+ <<: *test
301
+ <<: *high-capacity
302
+ <<: *ee-qa
303
+
240
304
  ce:object_storage:
241
305
  script:
242
306
  - bin/qa Test::Integration::ObjectStorage ${RELEASE:=CE}
@@ -251,6 +315,20 @@ ee:object_storage:
251
315
  <<: *high-capacity
252
316
  <<: *ee-qa
253
317
 
318
+ ce:oauth:
319
+ script:
320
+ - bin/qa Test::Integration::OAuth ${RELEASE:=CE}
321
+ <<: *test
322
+ <<: *high-capacity
323
+ <<: *ce-qa
324
+
325
+ ee:oauth:
326
+ script:
327
+ - bin/qa Test::Integration::OAuth ${RELEASE:=EE}
328
+ <<: *test
329
+ <<: *high-capacity
330
+ <<: *ee-qa
331
+
254
332
  .notify_upstream_commit: &notify_upstream_commit
255
333
  stage: notify
256
334
  image: $TEST_IMAGE
@@ -50,6 +50,10 @@ For more details on the internals, please read the
50
50
  * `QA_DEBUG` - set to `true` to verbosely log page object actions. Note: if enabled be aware that sensitive data might be logged. If an input element has a QA selector with `password` in the name, data entered into the input element will be masked. If the element doesn't have `password` in its name it won't be masked.
51
51
  * `QA_LOG_PATH` - path to output debug logging to. If not set logging will be output to STDOUT
52
52
  * `QA_CAN_TEST_GIT_PROTOCOL_V2` - set to `false` to skip tests that require Git protocol v2 if your environment doesn't support it.
53
+ * `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.
54
+ * `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.
55
+ * `GITHUB_USERNAME` - Username for authenticating with GitHub.
56
+ * `GITHUB_PASSWORD` - Password for authenticating with GitHub.
53
57
 
54
58
  ## [Supported Remote Grid environment variables](./running_against_remote_grid.md)
55
59
 
@@ -290,6 +294,41 @@ $ export EE_LICENSE=$(cat /path/to/Geo.gitlab_license)
290
294
  $ gitlab-qa Test::Integration::InstanceSAML EE
291
295
  ```
292
296
 
297
+ ### `Test::Integration::OAuth CE|EE|<full image address>`
298
+
299
+ This tests that users can sign in to GitLab instance using external OAuth services.
300
+
301
+ The tests currently integrate with the following OAuth service providers:
302
+ * GitHub
303
+
304
+ To run tests against the GitLab containers, a GitLab QA (`gitlab/gitlab-qa`)
305
+ container is spun up and tests are run from it by running the
306
+ `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).
307
+
308
+ **Required environment variables:**
309
+
310
+ - [For EE only] `EE_LICENSE`: A valid EE license.
311
+ - `GITHUB_OAUTH_APP_ID`: Client ID for GitHub OAuth app. This can be found in the shared 1Password vault.
312
+ - `GITHUB_OAUTH_APP_SECRET`: Client Secret for GitHub OAuth app. This can be found in the shared 1Password vault.
313
+ - `GITHUB_USERNAME`: Username for authenticating with GitHub. This can be found in the shared 1Password vault.
314
+ - `GITHUB_PASSWORD`: Password for authenticating with GitHub. This can be found in the shared 1Password vault.
315
+
316
+ Example:
317
+
318
+ ```
319
+ $ export GITHUB_OAUTH_APP_ID=your_github_oauth_client_id
320
+ $ export GITHUB_OAUTH_APP_SECRET=your_github_oauth_client_secret
321
+ $ export GITHUB_USERNAME=your_github_username
322
+ $ export GITHUB_PASSWORD=your_github_password
323
+
324
+ $ gitlab-qa Test::Integration::OAuth CE
325
+
326
+ # For EE
327
+ $ export EE_LICENSE=$(cat /path/to/gitlab_license)
328
+
329
+ $ gitlab-qa Test::Integration::OAuth EE
330
+ ```
331
+
293
332
  ### `Test::Integration::Mattermost CE|EE|<full image address>`
294
333
 
295
334
  This tests that a GitLab instance works as expected when enabling the embedded
data/lib/gitlab/qa.rb CHANGED
@@ -39,6 +39,7 @@ module Gitlab
39
39
  autoload :Mattermost, 'qa/scenario/test/integration/mattermost'
40
40
  autoload :Kubernetes, 'qa/scenario/test/integration/kubernetes'
41
41
  autoload :ObjectStorage, 'qa/scenario/test/integration/object_storage'
42
+ autoload :OAuth, 'qa/scenario/test/integration/oauth'
42
43
  end
43
44
 
44
45
  module Sanity
@@ -40,7 +40,11 @@ module Gitlab
40
40
  'GITLAB_QA_USERNAME_1' => :gitlab_qa_username_1,
41
41
  'GITLAB_QA_PASSWORD_1' => :gitlab_qa_password_1,
42
42
  'GITLAB_QA_USERNAME_2' => :gitlab_qa_username_2,
43
- 'GITLAB_QA_PASSWORD_2' => :gitlab_qa_password_2
43
+ 'GITLAB_QA_PASSWORD_2' => :gitlab_qa_password_2,
44
+ 'GITHUB_OAUTH_APP_ID' => :github_oauth_app_id,
45
+ 'GITHUB_OAUTH_APP_SECRET' => :github_oauth_app_secret,
46
+ 'GITHUB_USERNAME' => :github_username,
47
+ 'GITHUB_PASSWORD' => :github_password
44
48
  }.freeze
45
49
 
46
50
  ENV_VARIABLES.each_value do |accessor|
@@ -94,6 +98,12 @@ module Gitlab
94
98
  raise ArgumentError, "Please provide GITLAB_QA_ACCESS_TOKEN"
95
99
  end
96
100
 
101
+ def require_oauth_environment!
102
+ %w[GITHUB_OAUTH_APP_ID GITHUB_OAUTH_APP_SECRET GITHUB_USERNAME GITHUB_PASSWORD].each do |env_key|
103
+ raise ArgumentError, "Environment variable #{env_key} must be set to run OAuth specs" unless ENV.key?(env_key)
104
+ end
105
+ end
106
+
97
107
  def require_kubernetes_environment!
98
108
  %w[GCLOUD_ACCOUNT_EMAIL GCLOUD_ACCOUNT_KEY CLOUDSDK_CORE_PROJECT GCLOUD_ZONE].each do |env_key|
99
109
  raise ArgumentError, "Environment variable #{env_key} must be set to run kubernetes specs" unless ENV.key?(env_key)
@@ -7,7 +7,7 @@ module Gitlab
7
7
  module Integration
8
8
  class Kubernetes < Scenario::Template
9
9
  # rubocop:disable Metrics/AbcSize
10
- def perform(release)
10
+ def perform(release, *rspec_args)
11
11
  Runtime::Env.require_kubernetes_environment!
12
12
 
13
13
  Component::Gitlab.perform do |gitlab|
@@ -38,7 +38,7 @@ module Gitlab
38
38
  specs.suite = 'Test::Integration::Kubernetes'
39
39
  specs.release = gitlab.release
40
40
  specs.network = gitlab.network
41
- specs.args = [tunnel_gitlab.url]
41
+ specs.args = [tunnel_gitlab.url, *rspec_args]
42
42
  end
43
43
  end
44
44
  end
@@ -13,7 +13,7 @@ module Gitlab
13
13
  end
14
14
 
15
15
  # rubocop:disable Metrics/AbcSize
16
- def perform(release)
16
+ def perform(release, *rspec_args)
17
17
  Component::Gitlab.perform do |gitlab|
18
18
  gitlab.release = release
19
19
  gitlab.name = gitlab_name
@@ -36,7 +36,7 @@ module Gitlab
36
36
  specs.suite = spec_suite
37
37
  specs.release = gitlab.release
38
38
  specs.network = gitlab.network
39
- specs.args = [gitlab.address]
39
+ specs.args = [gitlab.address, *rspec_args]
40
40
  end
41
41
  end
42
42
  end
@@ -0,0 +1,57 @@
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: '#{ENV['GITHUB_OAUTH_APP_ID']}',
32
+ app_secret: '#{ENV['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
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module QA
3
- VERSION = '2.11.0'.freeze
3
+ VERSION = '2.12.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: 2.11.0
4
+ version: 2.12.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: 2019-01-10 00:00:00.000000000 Z
11
+ date: 2019-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -179,6 +179,7 @@ files:
179
179
  - lib/gitlab/qa/scenario/test/integration/ldap_no_tls.rb
180
180
  - lib/gitlab/qa/scenario/test/integration/ldap_tls.rb
181
181
  - lib/gitlab/qa/scenario/test/integration/mattermost.rb
182
+ - lib/gitlab/qa/scenario/test/integration/oauth.rb
182
183
  - lib/gitlab/qa/scenario/test/integration/object_storage.rb
183
184
  - lib/gitlab/qa/scenario/test/integration/saml.rb
184
185
  - lib/gitlab/qa/scenario/test/omnibus/image.rb
@@ -207,8 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
208
  - !ruby/object:Gem::Version
208
209
  version: '0'
209
210
  requirements: []
210
- rubyforge_project:
211
- rubygems_version: 2.7.6
211
+ rubygems_version: 3.0.2
212
212
  signing_key:
213
213
  specification_version: 4
214
214
  summary: Integration tests for GitLab