gitlab-qa 0.0.1 → 0.1.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
  SHA1:
3
- metadata.gz: 55a7f55cf9ae0ed256e9471c8f0339891efd0ff8
4
- data.tar.gz: 7d0a29fc73eebbfd0664a682bfc964429fe3c25c
3
+ metadata.gz: b0ad531bf801a69e5e18a9df200d92235791d228
4
+ data.tar.gz: da43c04b1a583bede10237208f3c44df8000413a
5
5
  SHA512:
6
- metadata.gz: 83348ec223aed07efecbf57e30bb9a7987a13dcb1cc317e426c7dd0ecba303a24388e6885409d8753ff4871e21ab8a62018684035ff6c2c9f04e768209dfd66f
7
- data.tar.gz: c4b4bcdfb0c9521cae38da8a594e664e6f8d77169fe9408346c178951fe1afb0e15e4244a5a71f9204e0b6818af8c440c7396b8497a47fc3e06daaa904c39652
6
+ metadata.gz: 55271d4161762055138ace63cef2aa27d481e56017253516d1c3d2719c540d715ff32541268bbd8d6ac80ce5aca0477c2be1c496035ef909aad28c4cf05acf08
7
+ data.tar.gz: 494d2e9284a7bd9a2053482bd055ede19579be96325fa83ca011977019ff328458f55541ddb2895163de0ae74af83633144eede41c5eb80905236626e3b4748d
@@ -41,7 +41,7 @@ check:rspec:
41
41
  when: on_failure
42
42
  expire_in: 30d
43
43
  paths:
44
- - tmp/*.png
44
+ - /tmp/gitlab-qa-screenshots/*.png
45
45
 
46
46
  ce:instance:
47
47
  script: bin/qa Test::Instance::Image CE
@@ -21,10 +21,6 @@ module Gitlab
21
21
  @name = "#{name}-#{SecureRandom.hex(4)}"
22
22
  end
23
23
 
24
- def ee?
25
- @release == :ee
26
- end
27
-
28
24
  def address
29
25
  "http://#{hostname}"
30
26
  end
@@ -6,25 +6,36 @@ module Gitlab
6
6
 
7
7
  IMAGE_NAME = 'gitlab/gitlab-qa'.freeze
8
8
 
9
- attr_accessor :env
9
+ ENVS = %w(GITLAB_USERNAME GITLAB_PASSWORD
10
+ GITLAB_URL EE_LICENSE).freeze
10
11
 
11
12
  def initialize
12
13
  @docker = Docker::Engine.new
13
14
  end
14
15
 
15
- # rubocop:disable Metrics/AbcSize
16
- #
17
16
  def test(gitlab)
18
- tag = "#{gitlab.release}-#{gitlab.tag}"
19
- args = ['Test::Instance', gitlab.address]
17
+ test_address(gitlab.release, gitlab.tag, gitlab.address,
18
+ "#{gitlab.name}-specs", gitlab.network)
19
+ end
20
20
 
21
+ # rubocop:disable Metrics/MethodLength
22
+ #
23
+ def test_address(release, tag, address, name = nil, network = nil)
21
24
  puts 'Running instance test scenarios for Gitlab ' \
22
- "#{gitlab.release.upcase} at #{gitlab.address}"
25
+ "#{release.upcase} at #{address}"
26
+
27
+ args = ['Test::Instance', address]
28
+
29
+ @docker.run(IMAGE_NAME, "#{release}-#{tag}", *args) do |command|
30
+ command << %(-t --rm)
31
+ command << "--net=#{network}" if network
32
+
33
+ ENVS.each do |env|
34
+ command << %(-e #{env}="$#{env}") if ENV[env]
35
+ end
23
36
 
24
- @docker.run(IMAGE_NAME, tag, *args) do |command|
25
- command << "-t --rm --net #{gitlab.network}"
26
- command << %(-e #{env}="$#{env}") if env
27
- command << "--name #{gitlab.name}-specs"
37
+ command << '-v /tmp/gitlab-qa-screenshots:/home/qa/tmp/'
38
+ command << "--name #{name || ('gitlab-specs-' + Time.now.to_i)}"
28
39
  end
29
40
  end
30
41
  end
@@ -8,9 +8,9 @@ module Gitlab
8
8
  # including staging and on-premises installation.
9
9
  #
10
10
  class Any < Scenario::Template
11
- def perform(address)
12
- Spec::Image.perform do |specs|
13
- specs.test(address)
11
+ def perform(release, tag, address)
12
+ Docker::Specs.perform do |instance|
13
+ instance.test_address(release, tag, address)
14
14
  end
15
15
  end
16
16
  end
@@ -28,7 +28,6 @@ module Gitlab
28
28
 
29
29
  gitlab.instance do
30
30
  Docker::Specs.perform do |instance|
31
- instance.env = 'EE_LICENSE' if gitlab.ee?
32
31
  instance.test(gitlab)
33
32
  end
34
33
  end
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module QA
3
- VERSION = '0.0.1'.freeze
3
+ VERSION = '0.1.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: 0.0.1
4
+ version: 0.1.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: 2017-03-15 00:00:00.000000000 Z
11
+ date: 2017-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  version: '0'
137
137
  requirements: []
138
138
  rubyforge_project:
139
- rubygems_version: 2.5.1
139
+ rubygems_version: 2.5.2
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: Integration tests for GitLab