cookbook-openstack-dashboard/spec/neutron-fwaas-dashboard_spec.rb
Lance Albertson 71b91f5553 Improve ChefSpec test speed by enabling caching
This updates all references of let(:chef_run) to cached(:chef_run) to
speed up tests. By doing this, we have to create a new cached(:chef_run)
block whenever we need to adjust node attributes for testing.

Speed was improved from 56 minutes 34 seconds to 8 minutes 43 seconds

Change-Id: Ic7cf02200cf9d09beb66f6aa0d27cadffa65f7c9
2020-01-07 16:29:16 -08:00

24 lines
577 B
Ruby

# encoding: UTF-8
require_relative 'spec_helper'
describe 'openstack-dashboard::neutron-fwaas-dashboard' do
describe 'ubuntu' do
cached(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
cached(:node) { runner.node }
cached(:chef_run) do
runner.converge(described_recipe)
end
include_context 'non_redhat_stubs'
include_context 'dashboard_stubs'
it do
expect(chef_run).to include_recipe('openstack-dashboard::horizon')
end
it do
expect(chef_run).to install_package('python3-neutron-fwaas-dashboard')
end
end
end