Revision 31aec8f0
Added by Ewoud Kohl van Wijngaarden over 6 years ago
.fixtures.yml | ||
---|---|---|
fixtures:
|
||
symlinks:
|
||
git: "#{source_dir}"
|
||
repositories:
|
||
stdlib: 'https://github.com/puppetlabs/puppetlabs-stdlib'
|
manifests/init.pp | ||
---|---|---|
$package = undef,
|
||
$package_ensure = undef,
|
||
) {
|
||
package { $package:
|
||
ensure => $package_ensure,
|
||
}
|
||
ensure_packages([$package], {'ensure' => $package_ensure})
|
||
}
|
manifests/repo.pp | ||
---|---|---|
String $user = 'root',
|
||
String $group = 'root',
|
||
String $mode = '0755',
|
||
String $workdir = '/tmp',
|
||
Stdlib::Absolutepath $workdir = '/tmp',
|
||
Optional[String] $args = undef,
|
||
String $bin = $::git::bin,
|
||
) {
|
metadata.json | ||
---|---|---|
"git"
|
||
],
|
||
"dependencies": [
|
||
|
||
{
|
||
"name": "puppetlabs/stdlib",
|
||
"version_requirement": ">= 4.13.0 < 5.0.0"
|
||
}
|
||
],
|
||
"requirements": [
|
||
{
|
spec/classes/init_spec.rb | ||
---|---|---|
end
|
||
|
||
it { is_expected.to compile.with_all_deps }
|
||
it { is_expected.to contain_package('git').with_ensure('installed') }
|
||
it { is_expected.to contain_package('git').with_ensure('present') }
|
||
end
|
||
end
|
||
end
|
Also available in: Unified diff
Use stdlib for ensure_packages and Absolutepath