Browse Source

Increment mysql cookbook version

- Bump mysql to 7.2
- Bump mysql2_chef_gem to 1.1.0
- Work around https://github.com/chef/chef-dk/issues/966
- fixes minor bug in postgres-server_spec and server_spec

Change-Id: I6e906c5fad0360a7d9718fc5d5cda2983c3b768e
Depends-On: I07ad79a93642d0f0c934a864fcb9bcd7b764e35f
Implements: blueprint newton-xenial
Samuel Cassiba 2 years ago
parent
commit
3a0d36aa5a
4 changed files with 9 additions and 4 deletions
  1. 2
    2
      metadata.rb
  2. 5
    0
      recipes/mysql-client.rb
  3. 1
    1
      spec/postgresql-server_spec.rb
  4. 1
    1
      spec/server_spec.rb

+ 2
- 2
metadata.rb View File

@@ -23,8 +23,8 @@ end
23 23
 
24 24
 depends 'mariadb', '~> 0.3.1'
25 25
 depends 'percona', '~> 0.16.1'
26
-depends 'mysql', '~> 6.0.13'
27
-depends 'mysql2_chef_gem', '~> 1.0.1'
26
+depends 'mysql', '~> 7.2.0'
27
+depends 'mysql2_chef_gem', '~> 1.1.0'
28 28
 depends 'postgresql', '~> 3.4.18'
29 29
 depends 'database', '~> 4.0.2'
30 30
 depends 'openstack-common', '>= 14.0.0'

+ 5
- 0
recipes/mysql-client.rb View File

@@ -28,6 +28,11 @@ mysql2_chef_gem 'default' do
28 28
   action :install
29 29
 end
30 30
 
31
+# Note(frickler): Work around for https://github.com/chef/chef-dk/issues/966
32
+bash 'fix gem ext dir' do
33
+  code "rmdir ~/.chefdk/gem/ruby/2.1.0/extensions && ln -s /opt/chefdk/embedded/lib/ruby/gems/2.1.0/extensions ~/.chefdk/gem/ruby/2.1.0/extensions || true"
34
+end
35
+
31 36
 node['openstack']['db']['python_packages']['mysql'].each do |pkg|
32 37
   package pkg
33 38
 end

+ 1
- 1
spec/postgresql-server_spec.rb View File

@@ -12,7 +12,7 @@ describe 'openstack-ops-database::postgresql-server' do
12 12
       # The postgresql cookbook will raise an 'uninitialized constant
13 13
       # Chef::Application' error without this attribute when running
14 14
       # the tests
15
-      node.set_unless['postgresql']['password']['postgres'] = ''
15
+      node.set['postgresql']['password']['postgres'] = 'postgres_password'
16 16
 
17 17
       runner.converge(described_recipe)
18 18
     end

+ 1
- 1
spec/server_spec.rb View File

@@ -18,7 +18,7 @@ describe 'openstack-ops-database::server' do
18 18
       # The postgresql cookbook will raise an 'uninitialized constant
19 19
       # Chef::Application' error without this attribute when running
20 20
       # the tests
21
-      node.set_unless['postgresql']['password']['postgres'] = ''
21
+      node.set['postgresql']['password']['postgres'] = 'postgres_password'
22 22
 
23 23
       expect(chef_run).to include_recipe(
24 24
         'openstack-ops-database::postgresql-server')

Loading…
Cancel
Save