Commit 9a6a578d authored by Tim Smith's avatar Tim Smith
Browse files

Fix failing specs


Signed-off-by: default avatarTim Smith <tsmith@chef.io>
parent 57c301ef
require 'spec_helper'
describe 'erlang::esl' do
describe 'Debian Platform Family' do
cached(:chef_run_debian) do
ChefSpec::SoloRunner.new(platform: 'ubuntu', version: '16.04')
.converge('erlang::esl')
end
it 'converges successfully' do
expect { :chef_run_debian }.to_not raise_error
end
context 'Debian Platform Family' do
platform 'ubuntu'
it 'adds the erlang_solutions_repo apt repository' do
expect(chef_run_debian).to add_apt_repository('erlang_solutions_repo')
is_expected.to add_apt_repository('erlang_solutions_repo')
end
it 'installs the esl-erlang package' do
expect(chef_run_debian).to install_package('esl-erlang')
is_expected.to install_package('esl-erlang')
end
end
describe 'RHEL Platform Family' do
cached(:chef_run_rhel) do
ChefSpec::SoloRunner.new(platform: 'centos', version: '7.3.1611')
.converge('erlang::esl')
end
it 'converges successfully' do
expect { :chef_run_rhel }.to_not raise_error
end
context 'RHEL Platform Family' do
platform 'centos'
it 'includes the yum-erlang_solutions recipe' do
expect(chef_run_rhel).to include_recipe('yum-erlang_solutions')
is_expected.to include_recipe('yum-erlang_solutions')
end
end
end
require 'spec_helper'
describe 'erlang::package' do
describe 'Debian Platform Family' do
let(:chef_run_debian) do
ChefSpec::SoloRunner.new(platform: 'ubuntu', version: '16.04')
end
let(:debian_converged) { chef_run_debian.converge('erlang::package') }
it 'converges successfully' do
expect { :debian_converged }.to_not raise_error
end
context 'Debian Platform Family' do
platform 'ubuntu'
it 'installs the erlang.dev package' do
expect(debian_converged).to install_package('erlang-dev')
end
describe 'GUI Tools' do
context 'gui_tools is false' do
it 'installs erlang-nox erlang-x11 package by default' do
expect(debian_converged).to install_package('erlang-nox')
end
it 'does not install erlang-x11 package' do
expect(debian_converged).to_not install_package('erlang-x11')
end
end
context 'gui_tools is true' do
it 'installs erlang-x11 package' do
chef_run_debian.node.override['erlang']['gui_tools'] = true
gui_tools_run = chef_run_debian.converge('erlang::package')
expect(gui_tools_run).to install_package('erlang-x11')
end
end
is_expected.to install_package('erlang-dev')
end
end
describe 'RHEL Platform Family' do
cached(:chef_run_rhel) do
ChefSpec::SoloRunner.new(platform: 'centos', version: '7.3.1611')
.converge('erlang::package')
end
it 'converges successfully' do
expect { :chef_run_rhel }.to_not raise_error
end
context 'RHEL Platform Family' do
platform 'centos'
it 'includes the yum-epel recipe' do
expect(chef_run_rhel).to include_recipe('yum-epel')
is_expected.to include_recipe('yum-epel')
end
it 'installs the erlang package' do
expect(chef_run_rhel).to install_package('erlang')
is_expected.to install_package('erlang')
end
end
end
require 'spec_helper'
describe 'erlang::source' do
describe 'On Debain Platform Family' do
context 'On Debain Platform Family' do
cached(:chef_run) { ChefSpec::SoloRunner.new(platform: 'ubuntu', version: '16.04').converge('erlang::source') }
it 'includes the build_essential resource' do
......@@ -31,9 +31,9 @@ describe 'erlang::source' do
end
end
describe 'RHEL Platform Family' do
context 'RHEL Platform Family' do
cached(:chef_run_rhel) do
ChefSpec::SoloRunner.new(platform: 'centos', version: '7.3.1611')
ChefSpec::SoloRunner.new(platform: 'centos')
.converge('erlang::source')
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment