Skip to content

Commit

Permalink
Merge pull request #11 from voxpupuli/package
Browse files Browse the repository at this point in the history
Add CI job for package based installation
  • Loading branch information
bastelfreak authored Oct 28, 2022
2 parents f368338 + d260afc commit bbafdd0
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
39 changes: 39 additions & 0 deletions spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,43 @@ class { 'file_capability':
it { is_expected.to be_listening.on('127.0.0.1').with('tcp') }
end
end

context 'with package based setup' do
it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-PUPPET
if $facts['os']['name'] == 'Archlinux' {
class { 'file_capability':
package_name => 'libcap',
}
} else {
include file_capability
}
class { 'vault':
storage => {
file => {
path => '/tmp',
}
},
listener => [{
tcp => {
address => '127.0.0.1:8200',
tls_disable => 1,
}
}],
install_method => 'repo',
require => Class['file_capability'],
}
PUPPET
end
end
describe service('vault') do
it { is_expected.to be_enabled }
it { is_expected.to be_running }
end

describe port(8200) do
it { is_expected.to be_listening.on('127.0.0.1').with('tcp') }
end
end
end
6 changes: 6 additions & 0 deletions spec/setup_acceptance_node.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Needed for os.distro.codebase fact
if $facts['os']['name'] == 'Ubuntu' and $facts['os']['release']['full'] == '18.04' and versioncmp($facts['puppetversion'], '7') <= 0 {
package{'lsb-release':
ensure => present,
}
}

0 comments on commit bbafdd0

Please sign in to comment.