From 6a29e8a637594a0ff4f63d0a91107b97cd646898 Mon Sep 17 00:00:00 2001 From: alop Date: Mon, 13 May 2013 12:34:17 -0700 Subject: [PATCH] added definition for policy.json --- spec/spec_helper.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 2823379..c57ad50 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -50,3 +50,23 @@ def expect_creates_cinder_conf service, action=:restart end end end + +def expect_creates_policy_json service, action=:restart + describe "policy.json" do + before do + @file = @chef_run.template "/etc/cinder/policy.json" + end + + it "has proper owner" do + expect(@file).to be_owned_by "cinder", "cinder" + end + + it "has proper modes" do + expect(sprintf("%o", @file.mode)).to eq "644" + end + + it "notifies nova-api-ec2 restart" do + expect(@file.to notify service, action + end + end +end