
* updating ChefSpec -> 3.0.2 * updating Foodcritic -> 3.0.3 * updating Berkshelf -> 2.0.10 Change-Id: If02a149ed353227d49ffc9860b0b2fad7fb77955
25 lines
765 B
Ruby
25 lines
765 B
Ruby
require_relative "spec_helper"
|
|
|
|
describe "openstack-common::default" do
|
|
describe "ubuntu" do
|
|
before do
|
|
opts = ::UBUNTU_OPTS.merge :step_into => ["apt_repository"]
|
|
@chef_run = ::ChefSpec::Runner.new(opts) do |n|
|
|
n.set["lsb"]["codename"] = "precise"
|
|
end
|
|
@chef_run.converge "openstack-common::default"
|
|
end
|
|
|
|
it "installs ubuntu-cloud-keyring package" do
|
|
expect(@chef_run).to install_package "ubuntu-cloud-keyring"
|
|
end
|
|
|
|
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/havana main"
|
|
|
|
expect(@chef_run).to render_file(file).with_content(expected)
|
|
end
|
|
end
|
|
end
|