Updating to Havana
* updating ChefSpec -> 3.0.2 * updating Foodcritic -> 3.0.3 * updating Berkshelf -> 2.0.10 Change-Id: If02a149ed353227d49ffc9860b0b2fad7fb77955
This commit is contained in:
parent
0eead56b69
commit
2201bd113f
@ -2,6 +2,13 @@
|
||||
|
||||
This file is used to list changes made in each version of cookbook-openstack-common.
|
||||
|
||||
## 8.0.0:
|
||||
* Upgrading to Havana
|
||||
* Upgrading gems
|
||||
* ChefSpec -> 3.0.2
|
||||
* Foodcritic -> 3.0.3
|
||||
* Berkshelf -> 2.0.10
|
||||
|
||||
## 0.4.7:
|
||||
### Bug
|
||||
* Change `#db_uri` to hand out UTF8 MySQL URIs; i.e. append '?charset=utf8' to mysql URIs
|
||||
|
6
Gemfile
6
Gemfile
@ -2,8 +2,8 @@ source "https://rubygems.org"
|
||||
|
||||
gem "chef", "~> 11.4.4"
|
||||
gem "json", "<= 1.7.7" # chef 11 dependency
|
||||
gem "berkshelf", "~> 1.4.5"
|
||||
gem "chefspec", "~> 1.2.0"
|
||||
gem "foodcritic"
|
||||
gem "berkshelf", "~> 2.0.10"
|
||||
gem "chefspec", "~> 3.0.2"
|
||||
gem "foodcritic", "~> 3.0.3"
|
||||
gem "strainer"
|
||||
gem "tailor"
|
||||
|
168
Gemfile.lock
168
Gemfile.lock
@ -1,33 +1,41 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
activesupport (3.2.13)
|
||||
i18n (= 0.6.1)
|
||||
activesupport (3.2.16)
|
||||
i18n (~> 0.6, >= 0.6.4)
|
||||
multi_json (~> 1.0)
|
||||
addressable (2.3.4)
|
||||
addressable (2.3.5)
|
||||
akami (1.2.0)
|
||||
gyoku (>= 0.4.0)
|
||||
nokogiri (>= 1.4.0)
|
||||
berkshelf (1.4.5)
|
||||
activesupport (>= 3.2.0)
|
||||
addressable
|
||||
celluloid (>= 0.14.0)
|
||||
berkshelf (2.0.10)
|
||||
activesupport (~> 3.2.0)
|
||||
addressable (~> 2.3.4)
|
||||
buff-shell_out (~> 0.1)
|
||||
chozo (>= 0.6.1)
|
||||
faraday (>= 0.8.5)
|
||||
hashie (>= 2.0.2)
|
||||
json (>= 1.5.0)
|
||||
minitar
|
||||
mixlib-config (~> 1.1)
|
||||
mixlib-shellout (~> 1.1)
|
||||
multi_json (~> 1.5)
|
||||
retryable
|
||||
ridley (~> 0.12.4)
|
||||
solve (>= 0.4.2)
|
||||
minitar (~> 0.5.4)
|
||||
rbzip2 (~> 0.2.0)
|
||||
retryable (~> 1.3.3)
|
||||
ridley (~> 1.5.0)
|
||||
solve (>= 0.5.0)
|
||||
thor (~> 0.18.0)
|
||||
yajl-ruby
|
||||
buff-config (0.4.0)
|
||||
buff-extensions (~> 0.3)
|
||||
varia_model (~> 0.1)
|
||||
buff-extensions (0.5.0)
|
||||
buff-ignore (1.1.1)
|
||||
buff-platform (0.1.0)
|
||||
buff-ruby_engine (0.1.0)
|
||||
buff-shell_out (0.1.1)
|
||||
buff-ruby_engine (~> 0.1.0)
|
||||
builder (3.2.2)
|
||||
celluloid (0.14.1)
|
||||
timers (>= 1.0.0)
|
||||
celluloid-io (0.14.1)
|
||||
celluloid (>= 0.14.1)
|
||||
nio4r (>= 0.4.5)
|
||||
chef (11.4.4)
|
||||
erubis
|
||||
highline (>= 1.6.9)
|
||||
@ -42,118 +50,111 @@ GEM
|
||||
ohai (>= 0.6.0)
|
||||
rest-client (>= 1.0.4, < 1.7.0)
|
||||
yajl-ruby (~> 1.1)
|
||||
chefspec (1.2.0)
|
||||
chef (>= 10.0)
|
||||
erubis
|
||||
fauxhai (>= 0.1.1, < 2.0)
|
||||
minitest-chef-handler (>= 0.6.0)
|
||||
rspec (~> 2.0)
|
||||
chefspec (3.0.2)
|
||||
chef (~> 11.0)
|
||||
fauxhai (~> 2.0)
|
||||
rspec (~> 2.14)
|
||||
chozo (0.6.1)
|
||||
activesupport (>= 3.2.0)
|
||||
hashie (>= 2.0.2)
|
||||
multi_json (>= 1.3.0)
|
||||
ci_reporter (1.8.4)
|
||||
builder (>= 2.1.2)
|
||||
diff-lcs (1.2.4)
|
||||
diff-lcs (1.2.5)
|
||||
erubis (2.7.0)
|
||||
faraday (0.8.7)
|
||||
multipart-post (~> 1.1)
|
||||
fauxhai (1.1.1)
|
||||
httparty
|
||||
faraday (0.8.8)
|
||||
multipart-post (~> 1.2.0)
|
||||
fauxhai (2.0.0)
|
||||
net-ssh
|
||||
ohai
|
||||
ffi (1.8.1)
|
||||
foodcritic (2.1.0)
|
||||
ffi (1.9.3)
|
||||
foodcritic (3.0.3)
|
||||
erubis
|
||||
gherkin (~> 2.11.7)
|
||||
nokogiri (~> 1.5.4)
|
||||
rak (~> 1.4)
|
||||
rake
|
||||
treetop (~> 1.4.10)
|
||||
yajl-ruby (~> 1.1.0)
|
||||
gherkin (2.11.8)
|
||||
multi_json (~> 1.3)
|
||||
gssapi (1.0.3)
|
||||
ffi (>= 1.0.1)
|
||||
gyoku (1.0.0)
|
||||
gyoku (1.1.0)
|
||||
builder (>= 2.1.2)
|
||||
hashie (2.0.5)
|
||||
highline (1.6.19)
|
||||
httparty (0.11.0)
|
||||
multi_json (~> 1.0)
|
||||
multi_xml (>= 0.5.2)
|
||||
httpclient (2.2.0.2)
|
||||
highline (1.6.20)
|
||||
httpclient (2.3.4.1)
|
||||
httpi (0.9.7)
|
||||
rack
|
||||
i18n (0.6.1)
|
||||
i18n (0.6.9)
|
||||
ipaddress (0.8.0)
|
||||
json (1.7.7)
|
||||
little-plugger (1.1.3)
|
||||
log_switch (0.4.0)
|
||||
logging (1.6.2)
|
||||
logging (1.8.1)
|
||||
little-plugger (>= 1.1.3)
|
||||
mime-types (1.23)
|
||||
multi_json (>= 1.3.6)
|
||||
mime-types (2.0)
|
||||
minitar (0.5.4)
|
||||
minitest (4.7.4)
|
||||
minitest-chef-handler (1.0.1)
|
||||
chef
|
||||
ci_reporter
|
||||
minitest (~> 4.7.3)
|
||||
mixlib-authentication (1.3.0)
|
||||
mixlib-log
|
||||
mixlib-cli (1.3.0)
|
||||
mixlib-config (1.1.2)
|
||||
mixlib-config (2.1.0)
|
||||
mixlib-log (1.6.0)
|
||||
mixlib-shellout (1.1.0)
|
||||
multi_json (1.7.6)
|
||||
multi_xml (0.5.4)
|
||||
mixlib-shellout (1.3.0)
|
||||
multi_json (1.8.2)
|
||||
multipart-post (1.2.0)
|
||||
net-http-persistent (2.8)
|
||||
net-ssh (2.6.7)
|
||||
net-http-persistent (2.9)
|
||||
net-ssh (2.7.0)
|
||||
net-ssh-gateway (1.2.0)
|
||||
net-ssh (>= 2.6.5)
|
||||
net-ssh-multi (1.1)
|
||||
net-ssh (>= 2.1.4)
|
||||
net-ssh-gateway (>= 0.99.0)
|
||||
nokogiri (1.5.9)
|
||||
nio4r (0.5.0)
|
||||
nokogiri (1.5.10)
|
||||
nori (1.1.5)
|
||||
ohai (6.16.0)
|
||||
ohai (6.20.0)
|
||||
ipaddress
|
||||
mixlib-cli
|
||||
mixlib-config
|
||||
mixlib-log
|
||||
mixlib-shellout
|
||||
systemu
|
||||
systemu (~> 2.5.2)
|
||||
yajl-ruby
|
||||
polyglot (0.3.3)
|
||||
rack (1.5.2)
|
||||
rak (1.4)
|
||||
rake (10.1.0)
|
||||
rbzip2 (0.2.0)
|
||||
rest-client (1.6.7)
|
||||
mime-types (>= 1.16)
|
||||
retryable (1.3.3)
|
||||
ridley (0.12.4)
|
||||
ridley (1.5.3)
|
||||
addressable
|
||||
buff-config (~> 0.2)
|
||||
buff-extensions (~> 0.3)
|
||||
buff-ignore (~> 1.1)
|
||||
buff-shell_out (~> 0.1)
|
||||
celluloid (~> 0.14.0)
|
||||
chozo (>= 0.6.0)
|
||||
celluloid-io (~> 0.14.0)
|
||||
erubis
|
||||
faraday (>= 0.8.4)
|
||||
hashie (>= 2.0.2)
|
||||
json (>= 1.7.7)
|
||||
mixlib-authentication (>= 1.3.0)
|
||||
mixlib-config (>= 1.1.0)
|
||||
mixlib-log (>= 1.3.0)
|
||||
mixlib-shellout (>= 1.1.0)
|
||||
net-http-persistent (>= 2.8)
|
||||
net-ssh
|
||||
nio4r (>= 0.5.0)
|
||||
retryable
|
||||
solve (>= 0.4.4)
|
||||
varia_model (~> 0.1)
|
||||
winrm (~> 1.1.0)
|
||||
rspec (2.13.0)
|
||||
rspec-core (~> 2.13.0)
|
||||
rspec-expectations (~> 2.13.0)
|
||||
rspec-mocks (~> 2.13.0)
|
||||
rspec-core (2.13.1)
|
||||
rspec-expectations (2.13.0)
|
||||
rspec (2.14.1)
|
||||
rspec-core (~> 2.14.0)
|
||||
rspec-expectations (~> 2.14.0)
|
||||
rspec-mocks (~> 2.14.0)
|
||||
rspec-core (2.14.7)
|
||||
rspec-expectations (2.14.4)
|
||||
diff-lcs (>= 1.1.3, < 2.0)
|
||||
rspec-mocks (2.13.1)
|
||||
rspec-mocks (2.14.4)
|
||||
rubyntlm (0.1.1)
|
||||
savon (0.9.5)
|
||||
akami (~> 1.0)
|
||||
@ -163,12 +164,12 @@ GEM
|
||||
nokogiri (>= 1.4.0)
|
||||
nori (~> 1.0)
|
||||
wasabi (~> 1.0)
|
||||
solve (0.4.4)
|
||||
json
|
||||
strainer (2.1.0)
|
||||
berkshelf (~> 1.3)
|
||||
solve (0.8.2)
|
||||
strainer (3.3.0)
|
||||
berkshelf (~> 2.0)
|
||||
buff-platform (~> 0.1)
|
||||
systemu (2.5.2)
|
||||
tailor (1.2.1)
|
||||
tailor (1.3.1)
|
||||
log_switch (>= 0.3.0)
|
||||
term-ansicolor (>= 1.0.5)
|
||||
text-table (>= 1.2.2)
|
||||
@ -177,18 +178,21 @@ GEM
|
||||
text-table (1.2.3)
|
||||
thor (0.18.1)
|
||||
timers (1.1.0)
|
||||
tins (0.8.0)
|
||||
treetop (1.4.14)
|
||||
tins (0.13.1)
|
||||
treetop (1.4.15)
|
||||
polyglot
|
||||
polyglot (>= 0.3.1)
|
||||
uuidtools (2.1.4)
|
||||
varia_model (0.2.0)
|
||||
buff-extensions (~> 0.2)
|
||||
hashie (>= 2.0.2)
|
||||
wasabi (1.0.0)
|
||||
nokogiri (>= 1.4.0)
|
||||
winrm (1.1.2)
|
||||
winrm (1.1.3)
|
||||
gssapi (~> 1.0.0)
|
||||
httpclient (~> 2.2.0.2)
|
||||
logging (~> 1.6.1)
|
||||
nokogiri (~> 1.5.0)
|
||||
httpclient (~> 2.2, >= 2.2.0.2)
|
||||
logging (~> 1.6, >= 1.6.1)
|
||||
nokogiri (~> 1.5)
|
||||
rubyntlm (~> 0.1.1)
|
||||
savon (= 0.9.5)
|
||||
uuidtools (~> 2.1.2)
|
||||
@ -198,10 +202,10 @@ PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
berkshelf (~> 1.4.5)
|
||||
berkshelf (~> 2.0.10)
|
||||
chef (~> 11.4.4)
|
||||
chefspec (~> 1.2.0)
|
||||
foodcritic
|
||||
chefspec (~> 3.0.2)
|
||||
foodcritic (~> 3.0.3)
|
||||
json (<= 1.7.7)
|
||||
strainer
|
||||
tailor
|
||||
|
@ -63,7 +63,7 @@ default["openstack"]["secret"]["user_passwords_data_bag"] = "user_passwords"
|
||||
# needs.
|
||||
|
||||
# The coordinated release of OpenStack codename
|
||||
default["openstack"]["release"] = "grizzly"
|
||||
default["openstack"]["release"] = "havana"
|
||||
|
||||
# The Ubuntu Cloud Archive has packages for multiple Ubuntu releases. For
|
||||
# more information, see: https://wiki.ubuntu.com/ServerTeam/CloudArchive.
|
||||
@ -71,7 +71,7 @@ default["openstack"]["release"] = "grizzly"
|
||||
# the node["lsb"]["codename"] Ohai value and %release% will be replaced
|
||||
# by the value of node["openstack"]["release"]
|
||||
default["openstack"]["apt"]["uri"] = "http://ubuntu-cloud.archive.canonical.com/ubuntu"
|
||||
default["openstack"]["apt"]["components"] = [ "precise-updates/grizzly", "main" ]
|
||||
default["openstack"]["apt"]["components"] = [ "precise-updates/#{node["openstack"]["release"]}", "main" ]
|
||||
# For the SRU packaging, use this:
|
||||
# default["openstack"]["apt"]["components"] = [ "%codename%-proposed/%release%", "main" ]
|
||||
|
||||
|
@ -4,7 +4,7 @@ maintainer_email "cookbooks@lists.tfoundry.com"
|
||||
license "Apache 2.0"
|
||||
description "Common OpenStack attributes, libraries and recipes."
|
||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||
version "0.4.7"
|
||||
version "8.0.0"
|
||||
|
||||
recipe "openstack-common", "Installs/Configures common recipes"
|
||||
recipe "openstack-common::set_endpoints_by_interface", "Set endpoints by interface"
|
||||
|
@ -78,11 +78,11 @@ when "suse"
|
||||
rm -f cloud.asc
|
||||
EOH
|
||||
|
||||
not_if { `rpm -qa gpg-pubkey*`.include? zypp["repo-key"].downcase }
|
||||
not_if { Mixlib::ShellOut.new("rpm -qa gpg-pubkey*").include? zypp["repo-key"].downcase }
|
||||
end
|
||||
|
||||
execute "add repository" do
|
||||
command "zypper addrepo --check #{repo_uri} #{repo_alias}"
|
||||
not_if { `zypper repos --export -`.include? repo_uri }
|
||||
not_if { Mixlib::ShellOut.new("zypper repos --export -").include? repo_uri }
|
||||
end
|
||||
end
|
||||
|
@ -3,7 +3,7 @@ require ::File.join ::File.dirname(__FILE__), "..", "libraries", "database"
|
||||
|
||||
describe ::Openstack do
|
||||
before do
|
||||
@chef_run = ::ChefSpec::ChefRunner.new ::CHEFSPEC_OPTS
|
||||
@chef_run = ::ChefSpec::Runner.new ::CHEFSPEC_OPTS
|
||||
@chef_run.converge "openstack-common::default"
|
||||
@subject = ::Object.new.extend ::Openstack
|
||||
@subject.stub :include_recipe
|
||||
|
@ -4,7 +4,7 @@ describe "openstack-common::default" do
|
||||
describe "ubuntu" do
|
||||
before do
|
||||
opts = ::UBUNTU_OPTS.merge :step_into => ["apt_repository"]
|
||||
@chef_run = ::ChefSpec::ChefRunner.new(opts) do |n|
|
||||
@chef_run = ::ChefSpec::Runner.new(opts) do |n|
|
||||
n.set["lsb"]["codename"] = "precise"
|
||||
end
|
||||
@chef_run.converge "openstack-common::default"
|
||||
@ -16,9 +16,9 @@ describe "openstack-common::default" do
|
||||
|
||||
it "configures openstack repository" do
|
||||
file = "/etc/apt/sources.list.d/openstack-ppa.list"
|
||||
expected = "deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/grizzly main"
|
||||
expected = "deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/havana main"
|
||||
|
||||
expect(@chef_run).to create_file_with_content file, expected
|
||||
expect(@chef_run).to render_file(file).with_content(expected)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -3,7 +3,7 @@ require ::File.join ::File.dirname(__FILE__), "..", "libraries", "endpoints"
|
||||
|
||||
describe ::Openstack do
|
||||
before do
|
||||
@chef_run = ::ChefSpec::ChefRunner.new ::CHEFSPEC_OPTS
|
||||
@chef_run = ::ChefSpec::Runner.new ::CHEFSPEC_OPTS
|
||||
@chef_run.converge "openstack-common::set_endpoints_by_interface"
|
||||
@subject = ::Object.new.extend ::Openstack
|
||||
end
|
||||
@ -76,7 +76,7 @@ describe ::Openstack do
|
||||
end
|
||||
it "endpoints recipe bind_interface sets host" do
|
||||
@subject.stub('address_for').and_return '10.0.0.100'
|
||||
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
|
||||
chef_run = ::ChefSpec::Runner.new ::UBUNTU_OPTS
|
||||
chef_run.node.set['openstack']['endpoints']['identity-api']['bind_interface'] = 'eth0'
|
||||
chef_run.node.set['network'] = {
|
||||
'interfaces' => {
|
||||
|
@ -3,7 +3,7 @@ require_relative "spec_helper"
|
||||
describe "openstack-common::logging" do
|
||||
describe "ubuntu" do
|
||||
before do
|
||||
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
|
||||
@chef_run = ::ChefSpec::Runner.new ::UBUNTU_OPTS
|
||||
@chef_run.converge "openstack-common::logging"
|
||||
end
|
||||
|
||||
@ -13,7 +13,8 @@ describe "openstack-common::logging" do
|
||||
end
|
||||
|
||||
it "has proper owner" do
|
||||
expect(@dir).to be_owned_by "root", "root"
|
||||
expect(@dir.owner).to eq("root")
|
||||
expect(@dir.group).to eq("root")
|
||||
end
|
||||
|
||||
it "has proper modes" do
|
||||
@ -27,7 +28,8 @@ describe "openstack-common::logging" do
|
||||
end
|
||||
|
||||
it "has proper owner" do
|
||||
expect(@chef_run.template(@file)).to be_owned_by "root", "root"
|
||||
expect(@chef_run.template(@file).owner).to eq("root")
|
||||
expect(@chef_run.template(@file).group).to eq("root")
|
||||
end
|
||||
|
||||
it "has proper modes" do
|
||||
@ -36,7 +38,7 @@ describe "openstack-common::logging" do
|
||||
end
|
||||
|
||||
it "templates openstack.logging.ignore block" do
|
||||
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
|
||||
chef_run = ::ChefSpec::Runner.new ::UBUNTU_OPTS
|
||||
chef_run.converge "openstack-common::logging"
|
||||
node = chef_run.node
|
||||
node.set["openstack"]["logging"]["ignore"] = {
|
||||
@ -49,7 +51,7 @@ describe "openstack-common::logging" do
|
||||
"handlers = prod,debug",
|
||||
"qualname = test.nova.api.openstack.wsgi"
|
||||
]
|
||||
expect(chef_run).to create_file_with_content @file, tmp.join("\n")
|
||||
expect(chef_run).to render_file(@file).with_content(tmp.join("\n"))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -3,7 +3,7 @@ require ::File.join ::File.dirname(__FILE__), "..", "libraries", "network"
|
||||
|
||||
describe ::Openstack do
|
||||
before do
|
||||
@chef_run = ::ChefSpec::ChefRunner.new(::CHEFSPEC_OPTS) do |n|
|
||||
@chef_run = ::ChefSpec::Runner.new(::CHEFSPEC_OPTS) do |n|
|
||||
n.set["network"] = {
|
||||
"interfaces" => {
|
||||
"lo" => {
|
||||
|
@ -3,14 +3,14 @@ require ::File.join ::File.dirname(__FILE__), "..", "libraries", "passwords"
|
||||
|
||||
describe ::Openstack do
|
||||
before do
|
||||
@chef_run = ::ChefSpec::ChefRunner.new ::CHEFSPEC_OPTS
|
||||
@chef_run = ::ChefSpec::Runner.new ::CHEFSPEC_OPTS
|
||||
@chef_run.converge "openstack-common::default"
|
||||
@subject = ::Object.new.extend(::Openstack)
|
||||
end
|
||||
|
||||
describe "#secret" do
|
||||
it "returns index param when developer_mode is true" do
|
||||
@chef_run = ::ChefSpec::ChefRunner.new(::CHEFSPEC_OPTS) do |n|
|
||||
@chef_run = ::ChefSpec::Runner.new(::CHEFSPEC_OPTS) do |n|
|
||||
n.set["openstack"]["developer_mode"] = true
|
||||
end
|
||||
@chef_run.converge "openstack-common::default"
|
||||
@ -30,7 +30,7 @@ describe ::Openstack do
|
||||
|
||||
describe "#service_password" do
|
||||
it "returns index param when developer_mode is true" do
|
||||
@chef_run = ::ChefSpec::ChefRunner.new(::CHEFSPEC_OPTS) do |n|
|
||||
@chef_run = ::ChefSpec::Runner.new(::CHEFSPEC_OPTS) do |n|
|
||||
n.set["openstack"]["developer_mode"] = true
|
||||
end
|
||||
@chef_run.converge "openstack-common::default"
|
||||
@ -50,7 +50,7 @@ describe ::Openstack do
|
||||
|
||||
describe "#db_password" do
|
||||
it "returns index param when developer_mode is true" do
|
||||
@chef_run = ::ChefSpec::ChefRunner.new(::CHEFSPEC_OPTS) do |n|
|
||||
@chef_run = ::ChefSpec::Runner.new(::CHEFSPEC_OPTS) do |n|
|
||||
n.set["openstack"]["developer_mode"] = true
|
||||
end
|
||||
@chef_run.converge "openstack-common::default"
|
||||
@ -70,7 +70,7 @@ describe ::Openstack do
|
||||
|
||||
describe "#user_password" do
|
||||
it "returns index param when developer_mode is true" do
|
||||
@chef_run = ::ChefSpec::ChefRunner.new(::CHEFSPEC_OPTS) do |n|
|
||||
@chef_run = ::ChefSpec::Runner.new(::CHEFSPEC_OPTS) do |n|
|
||||
n.set["openstack"]["developer_mode"] = true
|
||||
end
|
||||
@chef_run.converge "openstack-common::default"
|
||||
|
@ -3,7 +3,7 @@ require ::File.join ::File.dirname(__FILE__), "..", "libraries", "search"
|
||||
|
||||
describe ::Openstack do
|
||||
before do
|
||||
@chef_run = ::ChefSpec::ChefRunner.new(::CHEFSPEC_OPTS) do |n|
|
||||
@chef_run = ::ChefSpec::Runner.new(::CHEFSPEC_OPTS) do |n|
|
||||
n.set["openstack"]["mq"] = {
|
||||
"server_role" => "openstack-ops-mq",
|
||||
"port" => 5672
|
||||
|
@ -3,7 +3,7 @@ require_relative "spec_helper"
|
||||
describe "openstack-common::sysctl" do
|
||||
describe "ubuntu" do
|
||||
before do
|
||||
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
|
||||
@chef_run = ::ChefSpec::Runner.new ::UBUNTU_OPTS
|
||||
@chef_run.converge "openstack-common::sysctl"
|
||||
end
|
||||
|
||||
@ -13,7 +13,8 @@ describe "openstack-common::sysctl" do
|
||||
end
|
||||
|
||||
it "has proper owner" do
|
||||
expect(@file).to be_owned_by "root", "root"
|
||||
expect(@file.owner).to eq("root")
|
||||
expect(@file.group).to eq("root")
|
||||
end
|
||||
|
||||
it "has proper modes" do
|
||||
@ -21,13 +22,13 @@ describe "openstack-common::sysctl" do
|
||||
end
|
||||
|
||||
it "sets the all.rp_filter" do
|
||||
expect(@chef_run).to create_file_with_content @file.name,
|
||||
'net.ipv4.conf.all.rp_filter = 0'
|
||||
match = 'net.ipv4.conf.all.rp_filter = 0'
|
||||
expect(@chef_run).to render_file(@file.name).with_content(match)
|
||||
end
|
||||
|
||||
it "sets the default.rp_filter" do
|
||||
expect(@chef_run).to create_file_with_content @file.name,
|
||||
'net.ipv4.conf.default.rp_filter = 0'
|
||||
match = 'net.ipv4.conf.default.rp_filter = 0'
|
||||
expect(@chef_run).to render_file(@file.name).with_content(match)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user