Added handling for db_pkg install for sqlite

* Added test case for sqlite db_type
* Added CHANGELOG.md
* Version bump to 7.0.1

Fixes bug: 1246175

Change-Id: Ieae7d5d75daaa06d65a4a38b4f5b00deb37e45f4
This commit is contained in:
galstrom21
2013-10-30 14:52:55 -05:00
parent c9a37bca9a
commit 9e178ea3e9
6 changed files with 42 additions and 4 deletions

15
CHANGELOG.md Normal file
View File

@@ -0,0 +1,15 @@
# CHANGELOG for cookbook-openstack-identity
This file is used to list changes made in each version of cookbook-openstack-identity.
## 7.0.1:
* Fixed <db_type>_python_packages issue when setting node.openstack.db.identity.db_type to sqlite.
* Added `converges when configured to use sqlite db backend` test case for this scenario.
## 7.0.0:
* Initial release of cookbook-openstack-identity.
- - -
Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.
The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.

View File

@@ -4,7 +4,7 @@ maintainer_email "matt@opscode.com"
license "Apache 2.0"
description "The OpenStack Identity service Keystone."
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "7.0.0"
version "7.0.1"
recipe "openstack-identity::server", "Installs and Configures Keystone Service"
recipe "openstack-identity::registration", "Adds user, tenant, role and endpoint records to Keystone"

View File

@@ -32,9 +32,11 @@ end
platform_options = node["openstack"]["identity"]["platform"]
db_type = node['openstack']['db']['identity']['db_type']
platform_options["#{db_type}_python_packages"].each do |pkg|
package pkg do
action :install
unless db_type == 'sqlite'
platform_options["#{db_type}_python_packages"].each do |pkg|
package pkg do
action :install
end
end
end

View File

@@ -8,6 +8,13 @@ describe "openstack-identity::server" do
@chef_run.converge "openstack-identity::server"
end
it "converges when configured to use sqlite db backend" do
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
node = chef_run.node
node.set["openstack"]["db"]["identity"]["db_type"] = "sqlite"
chef_run.converge "openstack-identity::server"
end
it "installs mysql python packages" do
expect(@chef_run).to install_package "python-mysql"
end

View File

@@ -8,6 +8,13 @@ describe "openstack-identity::server" do
@chef_run.converge "openstack-identity::server"
end
it "converges when configured to use sqlite db backend" do
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
node = chef_run.node
node.set["openstack"]["db"]["identity"]["db_type"] = "sqlite"
chef_run.converge "openstack-identity::server"
end
it "installs mysql python packages" do
expect(@chef_run).to install_package "MySQL-python"
end

View File

@@ -31,6 +31,13 @@ describe "openstack-identity::server" do
expect(chef_run).not_to include_recipe "openstack-common::logging"
end
it "converges when configured to use sqlite db backend" do
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
node = chef_run.node
node.set["openstack"]["db"]["identity"]["db_type"] = "sqlite"
chef_run.converge "openstack-identity::server"
end
it "installs mysql python packages" do
expect(@chef_run).to install_package "python-mysqldb"
end