cookbook-openstack-common/spec/client_spec.rb
Jan Klare 83a9525fd0 install python-openstackclient from pip and not from package
* the packaged version of python-openstackclient for ubuntu and centos are quite
  old and we need the new version to completely switch all cookbook logic to the
  openstackclient
* this patch include the poise-python cookbook and uses its resources to install
  a python 2 environment and the python-openstackclient

Change-Id: I881075dcd11d06d9c1537d929c7626155c01a1d6
2016-08-05 11:55:43 +02:00

22 lines
548 B
Ruby

# encoding: UTF-8
require_relative 'spec_helper'
describe 'openstack-common::client' do
describe 'ubuntu' do
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
let(:node) { runner.node }
let(:chef_run) do
runner.converge(described_recipe)
end
it 'installs the latest python 2' do
expect(chef_run).to install_python_runtime('2')
end
it 'installs python-openstackclient 2.6' do
expect(chef_run).to install_python_package('python-openstackclient')
.with(version: '2.6')
end
end
end