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 +4 -4
- data/lib/gitlab/qa/scenario/test/integration/praefect.rb +82 -42
- data/lib/gitlab/qa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6984d203f3ceeb325d63acaa8be8f5e07192f11369ff61302d0f34bdd4cd64d5
|
4
|
+
data.tar.gz: 8473367878aa9805d10329cf632ceec4b64dd63c0bc7386ed685cdaff0a9a8a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
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
|
data/lib/gitlab/qa/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2020-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|