Refactored tests

* Tests are now passing
* Removed chef-solo conditional from #memcached_server
* All tests should log if fatal encountered, this cleans up stdout
* #db_create_with_user test had a test which wouldn't occur, b/c
  the attributes have a default value
* Added a couple pending tests for the database LWRPs
This commit is contained in:
John Dewey
2013-05-06 19:05:22 -07:00
parent 852a8e679d
commit 5df85f3706
13 changed files with 196 additions and 149 deletions

42
spec/logging_spec.rb Normal file
View File

@@ -0,0 +1,42 @@
require "spec_helper"
describe "openstack-common::logging" do
describe "ubuntu" do
before do
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "openstack-common::logging"
end
describe "/etc/openstack" do
before do
@dir = @chef_run.directory "/etc/openstack"
end
it "has proper owner" do
expect(@dir).to be_owned_by "root", "root"
end
it "has proper modes" do
expect(sprintf("%o", @dir.mode)).to eq "755"
end
end
describe "logging.conf" do
before do
@file = @chef_run.template "/etc/openstack/logging.conf"
end
it "has proper owner" do
expect(@file).to be_owned_by "root", "root"
end
it "has proper modes" do
expect(sprintf("%o", @file.mode)).to eq "644"
end
it "template contents" do
pending "TODO: implement"
end
end
end
end