Browse Source

update cookbook dependencies for next release

Depends-On: Ib256c315d5439beb8d4ec83c5cc7d7c9b182378a
Change-Id: I50df0befac140660d58eccb939d33a83edbb441c
Jan Klare 2 years ago
parent
commit
c07b0f75fa
3 changed files with 23 additions and 6 deletions
  1. 5
    5
      metadata.rb
  2. 17
    0
      spec/mysql-server_spec.rb
  3. 1
    1
      spec/spec_helper.rb

+ 5
- 5
metadata.rb View File

@@ -21,10 +21,10 @@ recipe 'openstack-db', 'Creates necessary tables, users, and grants for OpenStac
21 21
   supports os
22 22
 end
23 23
 
24
-depends 'mariadb', '~> 0.3.1'
24
+depends 'mariadb', '~> 0.3.3'
25 25
 depends 'percona', '~> 0.16.1'
26
-depends 'mysql', '~> 8.0'
27
-depends 'mysql2_chef_gem', '~> 1.1.0'
28
-depends 'postgresql', '~> 3.4.18'
29
-depends 'database', '~> 6.0'
26
+depends 'mysql', '~> 8.2'
27
+depends 'mysql2_chef_gem', '~> 1.1'
28
+depends 'postgresql', '~> 5.1'
29
+depends 'database', '~> 6.1'
30 30
 depends 'openstack-common', '>= 14.0.0'

+ 17
- 0
spec/mysql-server_spec.rb View File

@@ -24,6 +24,23 @@ describe 'openstack-ops-database::mysql-server' do
24 24
       )
25 25
     end
26 26
 
27
+    describe 'creates mysql service with different values' do
28
+      before do
29
+        node.set['openstack']['mysql']['data_dir'] = '/other-dir'
30
+        node.set['openstack']['mysql']['version'] = '5.7'
31
+      end
32
+      it do
33
+        expect(chef_run).to create_mysql_service('default').with(
34
+          version: '5.7',
35
+          data_dir: '/other-dir',
36
+          initial_root_password: 'abc123',
37
+          bind_address: '127.0.0.1',
38
+          port: '3306',
39
+          action: [:create, :start]
40
+        )
41
+      end
42
+    end
43
+
27 44
     describe 'openstack.cnf' do
28 45
       let(:file) { '/etc/mysql/conf.d/openstack.cnf' }
29 46
 

+ 1
- 1
spec/spec_helper.rb View File

@@ -24,7 +24,7 @@ shared_context 'database-stubs' do
24 24
     stub_command("\"/usr/bin/mysql\" -u root -e 'show databases;'")
25 25
     stub_command("mysqladmin --user=root --password='' version")
26 26
     # for postgresql
27
-    stub_command('ls /var/lib/postgresql/9.3/main/recovery.conf')
27
+    stub_command('ls /var/lib/postgresql/9.5/main/recovery.conf')
28 28
     stub_search('node', "recipes:\"percona\\:\\:cluster\"").and_return([])
29 29
 
30 30
     allow_any_instance_of(Chef::Recipe).to receive(:address_for)

Loading…
Cancel
Save