Skip to content

Commit

Permalink
Fix acceptance tests, README
Browse files Browse the repository at this point in the history
  • Loading branch information
bodgit committed May 15, 2016
1 parent 58a9d20 commit 6406ec3
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ Class['::sssd'] -> Class['::nsswitch']

### Functions

* [`validate_sssd_search_base`](#function-validatesssdsearchbase): Parameter
* [`validate_sssd_search_base`](#function-validate_sssd_search_base): Parameter
validation.

### Native Types
Expand Down
27 changes: 27 additions & 0 deletions spec/acceptance/sssd_dbus_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@

describe 'sssd::dbus' do

it 'install dependencies' do
case fact('osfamily')
when 'RedHat'
case fact('operatingsystemmajrelease')
when '6'
pp = <<-EOS
package { 'ruby-devel':
ensure => present,
}
package { 'oniguruma-devel':
ensure => present,
}
package { 'oniguruma':
ensure => present,
provider => 'gem',
require => [
Package['ruby-devel'],
Package['oniguruma-devel'],
]
}
EOS

apply_manifest(pp, :catch_failures => true)
end
end
end

it 'should work with no errors' do

pp = <<-EOS
Expand Down
27 changes: 27 additions & 0 deletions spec/acceptance/sssd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@

describe 'sssd' do

it 'install dependencies' do
case fact('osfamily')
when 'RedHat'
case fact('operatingsystemmajrelease')
when '6'
pp = <<-EOS
package { 'ruby-devel':
ensure => present,
}
package { 'oniguruma-devel':
ensure => present,
}
package { 'oniguruma':
ensure => present,
provider => 'gem',
require => [
Package['ruby-devel'],
Package['oniguruma-devel'],
]
}
EOS

apply_manifest(pp, :catch_failures => true)
end
end
end

it 'should work with no errors' do

pp = <<-EOS
Expand Down
1 change: 0 additions & 1 deletion spec/functions/validate_sssd_search_base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
it { expect { should run.with_params('dc=example,dc=com?invalid?') }.to raise_error(/is not a valid SSSD search base/) }
it { expect { should run.with_params('dc=example,dc=com?subtree?invalid') }.to raise_error(/is not a valid SSSD search base/) }
it { expect { should run.with_params(['invalid']) }.to raise_error(/is not a valid SSSD search base/) }
# Taken from the RFC 2253 examples
it { should run.with_params('dc=example,dc=com') }
it { should run.with_params('dc=example,dc=com?subtree?') }
it { should run.with_params('cn=host_specific,dc=example,dc=com?subtree?(host=thishost)?dc=example.com?subtree?') }
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
hosts.each do |host|
puppet_module_install(:source => proj_root, :module_name => 'sssd')
on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module','install','bodgit-bodgitlib'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module','install','richardc-datacat'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module','install','herculesteam-augeasproviders_core'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module','install','bodgit-dbus'), { :acceptable_exit_codes => [0,1] }
Expand Down

0 comments on commit 6406ec3

Please sign in to comment.