Commit 0485a8d2 authored by Mickaël Canévet's avatar Mickaël Canévet

Use file() instead of fileserver

parent f48cbe51
......@@ -9,6 +9,8 @@ matrix:
include:
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 3.0" FACTER_GEM_VERSION="~> 1.7.0"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3.6.0"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.0.0
......
......@@ -2,21 +2,23 @@
# This class provides the augeas lenses used by the postfix class
#
class postfix::augeas {
$module_path = get_module_path($module_name)
augeas::lens {'postfix_transport':
ensure => present,
lens_source => 'puppet:///modules/postfix/lenses/postfix_transport.aug',
test_source => 'puppet:///modules/postfix/lenses/test_postfix_transport.aug',
stock_since => '1.0.0',
ensure => present,
lens_content => file("${module_path}/files/lenses/postfix_transport.aug"),
test_content => file("${module_path}/files/lenses/test_postfix_transport.aug"),
stock_since => '1.0.0',
}
augeas::lens {'postfix_virtual':
ensure => present,
lens_source => 'puppet:///modules/postfix/lenses/postfix_virtual.aug',
test_source => 'puppet:///modules/postfix/lenses/test_postfix_virtual.aug',
stock_since => '1.0.0',
ensure => present,
lens_content => file("${module_path}/files/lenses/postfix_virtual.aug"),
test_content => file("${module_path}/files/lenses/test_postfix_virtual.aug"),
stock_since => '1.0.0',
}
augeas::lens {'postfix_canonical':
ensure => present,
lens_source => 'puppet:///modules/postfix/lenses/postfix_canonical.aug',
test_source => 'puppet:///modules/postfix/lenses/test_postfix_canonical.aug',
ensure => present,
lens_content => file("${module_path}/files/lenses/postfix_canonical.aug"),
test_content => file("${module_path}/files/lenses/test_postfix_canonical.aug"),
}
}
......@@ -17,16 +17,16 @@ describe 'postfix::augeas' do
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_augeas__lens('postfix_transport').with({
:ensure => 'present',
:lens_source => 'puppet:///modules/postfix/lenses/postfix_transport.aug',
:test_source => 'puppet:///modules/postfix/lenses/test_postfix_transport.aug',
:stock_since => '1.0.0',
:ensure => 'present',
:lens_content => %r{Parses /etc/postfix/transport},
:test_content => %r{Provides unit tests and examples for the <Postfix_Transport> lens.},
:stock_since => '1.0.0',
} ) }
it { is_expected.to contain_augeas__lens('postfix_virtual').with({
:ensure => 'present',
:lens_source => 'puppet:///modules/postfix/lenses/postfix_virtual.aug',
:test_source => 'puppet:///modules/postfix/lenses/test_postfix_virtual.aug',
:stock_since => '1.0.0',
:ensure => 'present',
:lens_content => %r{Parses /etc/postfix/virtual},
:test_content => %r{Provides unit tests and examples for the <Postfix_Virtual> lens.},
:stock_since => '1.0.0',
}) }
end
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