cookbook-openstack-compute/spec/db_spec.rb
John Dewey a1acd590a0 Changed cookbook name to openstack-compute
Changed the cookbook name to openstack-compute, fixed all tests, and
addressed attributes. Also addressed calls to external services,
primarily keystone -> openstack-identity.

All tests pass.

Change-Id: Ic567a33cefd78cc3b2217986d3ff7475bc93f874
2013-05-16 17:59:06 -07:00

25 lines
604 B
Ruby

require "spec_helper"
describe "openstack-compute::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 "compute", "nova", "test-pass"
converge
end
def converge
::Chef::Recipe.any_instance.stub(:db_password).with("nova").
and_return "test-pass"
::ChefSpec::ChefRunner.new(::UBUNTU_OPTS).converge "openstack-compute::db"
end
end