
Per the mailing list thread, introducing Rubocop as a replacement for Tailor. Assuming Jenkins likes this, more pedantic patches will follow to make Rubocop happy. So far this is just spacing issues and adding UTF-8 headers, but more work will need to be done to remove all of the changes for the .rubocop-todo.yml Addresses: blueprint rubocop-for-block-storage Change-Id: Ibb11739e452016c101995a371d031faeeb7e7683
49 lines
1.4 KiB
Ruby
49 lines
1.4 KiB
Ruby
# encoding: UTF-8
|
|
#
|
|
# Cookbook Name:: openstack-block-storage
|
|
|
|
require_relative "spec_helper"
|
|
|
|
describe "openstack-block-storage::scheduler" do
|
|
before { block_storage_stubs }
|
|
describe "redhat" do
|
|
before do
|
|
@chef_run = ::ChefSpec::Runner.new ::REDHAT_OPTS
|
|
@chef_run.converge "openstack-block-storage::scheduler"
|
|
end
|
|
|
|
it "installs cinder scheduler packages" do
|
|
expect(@chef_run).to upgrade_package "openstack-cinder"
|
|
end
|
|
|
|
it "does not upgrade stevedore" do
|
|
chef_run = ::ChefSpec::Runner.new ::REDHAT_OPTS
|
|
chef_run.converge "openstack-block-storage::scheduler"
|
|
|
|
expect(chef_run).not_to upgrade_python_pip "stevedore"
|
|
end
|
|
|
|
it "installs mysql python packages by default" do
|
|
expect(@chef_run).to upgrade_package "MySQL-python"
|
|
end
|
|
|
|
it "installs postgresql python packages if explicitly told" do
|
|
chef_run = ::ChefSpec::Runner.new ::REDHAT_OPTS
|
|
node = chef_run.node
|
|
node.set["openstack"]["db"]["volume"]["db_type"] = "postgresql"
|
|
chef_run.converge "openstack-block-storage::scheduler"
|
|
|
|
expect(chef_run).to upgrade_package "python-psycopg2"
|
|
expect(chef_run).not_to upgrade_package "MySQL-python"
|
|
end
|
|
|
|
it "starts cinder scheduler" do
|
|
expect(@chef_run).to start_service "openstack-cinder-scheduler"
|
|
end
|
|
|
|
it "starts cinder scheduler on boot" do
|
|
expect(@chef_run).to enable_service "openstack-cinder-scheduler"
|
|
end
|
|
end
|
|
end
|