gitlab-qa 5.6.0 → 5.6.1

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: 6dadc43941496ac21420fd5fd18374a72a360ff06c1d34e67717232de4125fca
4
- data.tar.gz: 9f077c485987efd4609d1c1c126a45d6961bdc77062afe99a368f0b2ddb66339
3
+ metadata.gz: 6984d203f3ceeb325d63acaa8be8f5e07192f11369ff61302d0f34bdd4cd64d5
4
+ data.tar.gz: 8473367878aa9805d10329cf632ceec4b64dd63c0bc7386ed685cdaff0a9a8a7
5
5
  SHA512:
6
- metadata.gz: 47f96a6b986d312ec419ac645063ab1009868acb1640a8f9936ede35b69c45ecb036526486dc92cc3bebe49bc5edcd75c6dee7141f3171f333ab8c4599014692
7
- data.tar.gz: cb2a2fcc6f2f8f11c8df3dc616528634d8cf9f17bbed53f0c0c6fd04a9bc0ebba676612047db50dcf94a0bfbf0d5043cea492fef2c1a86e6b770ceb131fd6cfc
6
+ metadata.gz: 52ecbf75f72fb4b068bfcdc1522b1d5342f864277c2b52c42f608e54a5c9220f556694a92605faf1a78cdd11869747a04c53c07e9dbfd8f11849300b988a9754
7
+ data.tar.gz: 700321489bd2cadfb5ef5fcf0138813e4a68093c427955df4071b48b7bc9f07149b236e35881938483b9043fc2313b103e02ab5ac9d7d4e873df04ec5113c215
@@ -4,53 +4,93 @@ module Gitlab
4
4
  module Test
5
5
  module Integration
6
6
  class Praefect < Scenario::Template
7
+ # rubocop:disable Metrics/AbcSize
7
8
  def perform(release, *rspec_args)
8
- Component::Gitlab.perform do |gitlab|
9
- gitlab.release = Release.new(release)
10
- gitlab.name = 'gitlab'
11
- gitlab.network = 'test'
12
- gitlab.omnibus_config = <<~OMNIBUS
13
- gitaly['enable'] = true;
14
- gitaly['auth_token'] = 'praefect-gitaly-token';
15
- gitaly['storage'] = [
16
- {
17
- 'name' => 'praefect-gitaly-0',
18
- 'path' => '/var/opt/gitlab/git-data/repositories'
19
- }
20
- ];
21
- praefect['enable'] = true;
22
- praefect['listen_addr'] = '0.0.0.0:2305';
23
- praefect['auth_token'] = 'praefect-token';
24
- praefect['virtual_storages'] = {
25
- 'default' => {
26
- 'praefect-gitaly-0' => {
27
- 'address' => 'unix:/var/opt/gitlab/gitaly/gitaly.socket',
28
- 'token' => 'praefect-gitaly-token',
29
- 'primary' => true
30
- }
31
- }
32
- };
33
- gitlab_rails['gitaly_token'] = 'praefect-token';
34
- git_data_dirs({
35
- 'default' => {
36
- 'gitaly_address' => 'tcp://localhost:2305'
37
- }
38
- });
39
- OMNIBUS
40
-
41
- gitlab.instance do
42
- puts "Running Praefect specs!"
43
-
44
- Component::Specs.perform do |specs|
45
- specs.suite = 'Test::Instance::All'
46
- specs.release = gitlab.release
47
- specs.network = gitlab.network
48
- specs.args = [gitlab.address, *rspec_args]
49
- specs.env = { QA_PRAEFECT_REPOSITORY_STORAGE: 'default' }
9
+ Docker::Volumes.new.with_temporary_volumes do |volumes|
10
+ # Create the Praefect database before enabling Praefect
11
+ Component::Gitlab.perform do |gitlab|
12
+ gitlab.release = Release.new(release)
13
+ gitlab.name = 'gitlab'
14
+ gitlab.network = 'test'
15
+ gitlab.volumes = volumes
16
+ gitlab.exec_commands = ['gitlab-psql -d template1 -c "CREATE DATABASE praefect_production OWNER gitlab"']
17
+
18
+ gitlab.act(omnibus_config_with_praefect) do |new_config|
19
+ prepare
20
+ start
21
+ reconfigure
22
+ process_exec_commands
23
+ wait
24
+ teardown
25
+ end
26
+ end
27
+
28
+ # Restart GitLab with Praefect enabled and then run the tests
29
+ Component::Gitlab.perform do |gitlab|
30
+ gitlab.release = Release.new(release)
31
+ gitlab.name = 'gitlab'
32
+ gitlab.network = 'test'
33
+ gitlab.volumes = volumes
34
+ gitlab.omnibus_config = omnibus_config_with_praefect
35
+
36
+ gitlab.act do
37
+ start
38
+ reconfigure
39
+ wait
40
+
41
+ puts "Running Praefect specs!"
42
+
43
+ Component::Specs.perform do |specs|
44
+ specs.suite = 'Test::Instance::All'
45
+ specs.release = gitlab.release
46
+ specs.network = gitlab.network
47
+ specs.args = [gitlab.address, *rspec_args]
48
+ specs.env = { QA_PRAEFECT_REPOSITORY_STORAGE: 'default' }
49
+ end
50
+
51
+ teardown
50
52
  end
51
53
  end
52
54
  end
53
55
  end
56
+ # rubocop:enable Metrics/AbcSize
57
+
58
+ private
59
+
60
+ def omnibus_config_with_praefect
61
+ <<~OMNIBUS
62
+ gitaly['enable'] = true;
63
+ gitaly['auth_token'] = 'praefect-gitaly-token';
64
+ gitaly['storage'] = [
65
+ {
66
+ 'name' => 'praefect-gitaly-0',
67
+ 'path' => '/var/opt/gitlab/git-data/repositories'
68
+ }
69
+ ];
70
+ praefect['enable'] = true;
71
+ praefect['listen_addr'] = '0.0.0.0:2305';
72
+ praefect['auth_token'] = 'praefect-token';
73
+ praefect['virtual_storages'] = {
74
+ 'default' => {
75
+ 'praefect-gitaly-0' => {
76
+ 'address' => 'unix:/var/opt/gitlab/gitaly/gitaly.socket',
77
+ 'token' => 'praefect-gitaly-token',
78
+ 'primary' => true
79
+ }
80
+ }
81
+ };
82
+ praefect['database_host'] = '/var/opt/gitlab/postgresql';
83
+ praefect['database_user'] = 'gitlab';
84
+ praefect['database_dbname'] = 'praefect_production';
85
+ praefect['postgres_queue_enabled'] = true;
86
+ gitlab_rails['gitaly_token'] = 'praefect-token';
87
+ git_data_dirs({
88
+ 'default' => {
89
+ 'gitaly_address' => 'tcp://localhost:2305'
90
+ }
91
+ });
92
+ OMNIBUS
93
+ end
54
94
  end
55
95
  end
56
96
  end
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module QA
3
- VERSION = '5.6.0'.freeze
3
+ VERSION = '5.6.1'.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.6.0
4
+ version: 5.6.1
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-04-21 00:00:00.000000000 Z
11
+ date: 2020-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control