Files
cookbook-openstack-block-st…/spec/db_spec.rb
Matt Ray e37be72e3d rename cookbook from 'cinder' to 'openstack-block-storage' and attributes accordingly.
Change-Id: I5f797567d110281b4698cbc6dbae5b76b03bdf67
2013-05-18 18:22:48 -05:00

25 lines
619 B
Ruby

require "spec_helper"
describe "openstack-block-storage::db" do
it "installs mysql packages" do
@chef_run = converge
expect(@chef_run).to include_recipe "mysql::client"
expect(@chef_run).to include_recipe "mysql::ruby"
end
it "creates database and user" do
::Chef::Recipe.any_instance.should_receive(:db_create_with_user).
with "volume", "cinder", "test-pass"
converge
end
def converge
::Chef::Recipe.any_instance.stub(:db_password).with("cinder").
and_return "test-pass"
::ChefSpec::ChefRunner.new(::UBUNTU_OPTS).converge "openstack-block-storage::db"
end
end