Skip to content

Commit

Permalink
Reorder default acceptance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-vaughan committed Jun 24, 2022
1 parent 32ea69c commit ef8c808
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 50 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ group :system_tests do
gem 'net-ssh', :git => "https://github.com/net-ssh/net-ssh", :ref => 'v7.0.0.beta1'
gem 'bcrypt_pbkdf' unless RUBY_PLATFORM == 'java'
gem 'puppet', ENV.fetch('PUPPET_VERSION', '~> 7.0')
gem 'puppetlabs_spec_helper', '~> 3.0'
gem 'puppetlabs_spec_helper', '~> 4.0'
gem 'rubocop'
gem 'rubocop-rspec'
end
50 changes: 50 additions & 0 deletions spec/acceptance/suites/default/99_install_simp_deps_repo_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
require 'spec_helper_acceptance'

hosts.each do |host|
unsupported_host = false
if hosts_with_role(hosts, 'el9').include?(host)
unsupported_host = true
end

describe '#install_simp_repos' do
if unsupported_host
it "does not support #{host}"
else
it 'should install yum utils' do
host.install_package('yum-utils')
end

context 'default settings' do
before(:all) { install_simp_repos(host) }

it 'enables the correct repos' do
on(host, 'yum -y list simp')
on(host, 'yum -y list postgresql96')
end
end

context 'when targeting a release type' do
it 'adjusts the SIMP release target' do
set_simp_repo_release(host, 'rolling')
expect(file_content_on(host, '/etc/yum/vars/simpreleasetype').strip).to eq('rolling')
end

it 'lists the simp rpm' do
on(host, 'yum list simp')
end
end

context 'when passed a disabled list ' do
before(:all) { install_simp_repos(host, ['simp-community-simp'] ) }

it 'enables the correct repos' do
on(host, 'yum -y list postgresql96')
end

it 'disables the correct repos' do
on(host, 'yum -y list simp', :acceptable_exit_codes => [1])
end
end
end
end
end
49 changes: 0 additions & 49 deletions spec/acceptance/suites/default/install_simp_deps_repo_spec.rb

This file was deleted.

0 comments on commit ef8c808

Please sign in to comment.