gitlab-qa 2.9.0 → 2.10.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: 812b98014a2918919fd98bdca2abee785eac4fdf2ccf19741b2780e52322782a
4
- data.tar.gz: c9026935312cd93cc4bd76e8637f5b0a721b5397e1509f01098147484e9c1e26
3
+ metadata.gz: 234f8d7e3668e3dca02e4b82a4c6eb8d094f6a724078ca81efee07b4b42cbb31
4
+ data.tar.gz: 341741ddf0c3a568dfb996be36779c518026ec140230e22ed8029de60aa264ed
5
5
  SHA512:
6
- metadata.gz: d272041877670e185298b6cef0e40e01e0b37e50e4431e98d74819a523c2139e4dcaeb48e2d5f20a8be310910ba2ad86818d99791c4e2c8448dcb2768a1d40ac
7
- data.tar.gz: c2f3bf9e671c16a136a9fefc2e306acf544fd72eacfa4fb2459bb9d58e4cb35410e7f25146f3f0c8340d4e405ca53d6c515955f13cf29f40d4cf277d264a5614
6
+ metadata.gz: ab53b41045fdf2395f3ed47e476a4ef7a265622112cebf595a281c132f4d6fada61a8cd39a235f7db24c281acf9121c3b9c8b07fec275698effbc4e7afb96542
7
+ data.tar.gz: 4e48765393874c770c58b8a6217b5f4f42c1b50cbae4ccdb5505716af02cc19e28d8ea24ba5929c85c45106689d9112850e0e0ad059d0a128766f3680624f283
data/Gemfile CHANGED
@@ -1,3 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
+
5
+ gem "ruby-debug-ide", "~> 0.6.1"
6
+ gem "debase", "~> 0.2.2"
@@ -46,6 +46,7 @@ For more details on the internals, please read the
46
46
  for failing tests will be saved (default: `/tmp/gitlab-qa`)
47
47
  * `DOCKER_HOST` - Docker host to run tests against (default: `http://localhost`)
48
48
  * `CHROME_HEADLESS` - when running locally, set to `false` to allow Chrome tests to be visible - watch your tests being run
49
+ * `QA_COOKIES` - optionally set to "cookie1=value;cookie2=value" in order to add a cookie to every request. This can be used to set the canary cookie by setting it to "gitlab_canary=true"
49
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.
50
51
  * `QA_LOG_PATH` - path to output debug logging to. If not set logging will be output to STDOUT
51
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.
@@ -376,6 +377,16 @@ $ export GITLAB_PASSWORD="$GITLAB_QA_PASSWORD"
376
377
  $ gitlab-qa Test::Instance::Staging
377
378
  ```
378
379
 
380
+ ### `Test::Instance::Production`
381
+
382
+ This scenario functions the same as `Test::Instance::Staging`
383
+ but will run tests against [`gitlab.com`](https://gitlab.com).
384
+
385
+ In release 11.6 it is possible to test against the canary stage of production
386
+ by setting `QA_COOKIES=gitlab_canary=true`. This adds a cookie
387
+ to all web requests which will result in them being routed
388
+ to the canary fleet.
389
+
379
390
  ### `Test::Instance::Smoke`
380
391
 
381
392
  This scenario will run a limited amount of tests selected from the test suite tagged by `:smoke`.
@@ -18,6 +18,7 @@ module Gitlab
18
18
  autoload :Image, 'qa/scenario/test/instance/image'
19
19
  autoload :RelativeUrl, 'qa/scenario/test/instance/relative_url'
20
20
  autoload :Staging, 'qa/scenario/test/instance/staging'
21
+ autoload :Production, 'qa/scenario/test/instance/production'
21
22
  autoload :Smoke, 'qa/scenario/test/instance/smoke'
22
23
  end
23
24
 
@@ -53,6 +54,7 @@ module Gitlab
53
54
  autoload :SAML, 'qa/component/saml'
54
55
  autoload :Specs, 'qa/component/specs'
55
56
  autoload :Staging, 'qa/component/staging'
57
+ autoload :Production, 'qa/component/production'
56
58
  autoload :Minio, 'qa/component/minio'
57
59
  end
58
60
 
@@ -0,0 +1,13 @@
1
+ require 'net/http'
2
+ require 'json'
3
+ require 'uri'
4
+
5
+ module Gitlab
6
+ module QA
7
+ module Component
8
+ class Production < Staging
9
+ ADDRESS = 'https://gitlab.com'.freeze
10
+ end
11
+ end
12
+ end
13
+ end
@@ -7,9 +7,8 @@ module Gitlab
7
7
  module Component
8
8
  class Staging
9
9
  ADDRESS = 'https://staging.gitlab.com'.freeze
10
-
11
10
  def self.release
12
- version = Version.new(ADDRESS).fetch!
11
+ version = Version.new(address).fetch!
13
12
  image =
14
13
  if Runtime::Env.dev_access_token_variable
15
14
  "dev.gitlab.org:5005/gitlab/omnibus-gitlab/gitlab-ee:#{version}"
@@ -24,6 +23,10 @@ module Gitlab
24
23
  exit 1
25
24
  end
26
25
 
26
+ def self.address
27
+ self::ADDRESS
28
+ end
29
+
27
30
  class InvalidResponseError < StandardError
28
31
  attr_reader :response
29
32
 
@@ -28,6 +28,7 @@ module Gitlab
28
28
  'CLOUDSDK_CORE_PROJECT' => :cloudsdk_core_project,
29
29
  'GCLOUD_ZONE' => :gcloud_zone,
30
30
  'SIGNUP_DISABLED' => :signup_disabled,
31
+ 'QA_COOKIES' => :qa_cookie,
31
32
  'QA_DEBUG' => :qa_debug,
32
33
  'QA_LOG_PATH' => :qa_log_path,
33
34
  'QA_CAN_TEST_GIT_PROTOCOL_V2' => :qa_can_test_git_protocol_v2,
@@ -0,0 +1,37 @@
1
+ module Gitlab
2
+ module QA
3
+ module Scenario
4
+ module Test
5
+ module Instance
6
+ ##
7
+ # Run test suite against gitlab.com
8
+ #
9
+ class Production < Scenario::Template
10
+ def perform(*rspec_args)
11
+ Runtime::Env.require_no_license!
12
+
13
+ release = Component::Production.release
14
+
15
+ if release.dev_gitlab_org?
16
+ Docker::Command.execute(
17
+ [
18
+ 'login',
19
+ '--username gitlab-qa-bot',
20
+ %(--password "#{Runtime::Env.dev_access_token_variable}"),
21
+ Release::DEV_REGISTRY
22
+ ]
23
+ )
24
+ end
25
+
26
+ Component::Specs.perform do |specs|
27
+ specs.suite = 'Test::Instance'
28
+ specs.release = release
29
+ specs.args = [Component::Production::ADDRESS, *rspec_args]
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module QA
3
- VERSION = '2.9.0'.freeze
3
+ VERSION = '2.10.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.9.0
4
+ version: 2.10.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: 2018-11-20 00:00:00.000000000 Z
11
+ date: 2018-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -151,6 +151,7 @@ files:
151
151
  - lib/gitlab/qa/component/internet_tunnel.rb
152
152
  - lib/gitlab/qa/component/ldap.rb
153
153
  - lib/gitlab/qa/component/minio.rb
154
+ - lib/gitlab/qa/component/production.rb
154
155
  - lib/gitlab/qa/component/saml.rb
155
156
  - lib/gitlab/qa/component/specs.rb
156
157
  - lib/gitlab/qa/component/staging.rb
@@ -164,6 +165,7 @@ files:
164
165
  - lib/gitlab/qa/scenario/template.rb
165
166
  - lib/gitlab/qa/scenario/test/instance/any.rb
166
167
  - lib/gitlab/qa/scenario/test/instance/image.rb
168
+ - lib/gitlab/qa/scenario/test/instance/production.rb
167
169
  - lib/gitlab/qa/scenario/test/instance/relative_url.rb
168
170
  - lib/gitlab/qa/scenario/test/instance/smoke.rb
169
171
  - lib/gitlab/qa/scenario/test/instance/staging.rb