diff --git a/acceptance/tests/parser_functions/hiera_array/lookup_data.rb b/acceptance/tests/parser_functions/hiera_array/lookup_data.rb index 172065d78..49e161274 100644 --- a/acceptance/tests/parser_functions/hiera_array/lookup_data.rb +++ b/acceptance/tests/parser_functions/hiera_array/lookup_data.rb @@ -1,105 +1,105 @@ test_name "Lookup data using the hiera_array parser function" testdir = master.tmpdir('hiera') step 'Setup' apply_manifest_on(master, <<-PP, :catch_failures => true) File { ensure => directory, mode => "0750", owner => #{master.puppet['user']}, group => #{master.puppet['group']}, } file { '#{testdir}':; '#{testdir}/hieradata':; '#{testdir}/environments':; '#{testdir}/environments/production':; '#{testdir}/environments/production/manifests':; '#{testdir}/environments/production/modules':; } file { '#{testdir}/hiera.yaml': ensure => file, content => '--- :backends: - "yaml" :logger: "console" :hierarchy: - "%{fqdn}" - "%{environment}" - "global" :yaml: :datadir: "#{testdir}/hieradata" ', mode => "0640"; } file { '#{testdir}/hieradata/global.yaml': ensure => file, content => "--- port: '8080' ntpservers: ['global.ntp.puppetlabs.com'] ", mode => "0640"; } file { '#{testdir}/hieradata/production.yaml': ensure => file, content => "--- ntpservers: ['production.ntp.puppetlabs.com'] ", mode => "0640"; } file { '#{testdir}/environments/production/modules/ntp':; '#{testdir}/environments/production/modules/ntp/manifests':; } file { '#{testdir}/environments/production/modules/ntp/manifests/init.pp': ensure => file, content => ' class ntp { $ntpservers = hiera_array("ntpservers") define print { $server = $name notify { "ntpserver ${server}": } } - print { $ntpservers: } + ntp::print { $ntpservers: } }', mode => "0640"; } file { '#{testdir}/environments/production/manifests/site.pp': ensure => file, content => " node default { include ntp }", mode => "0640"; } PP step "Try to lookup array data" master_opts = { 'main' => { 'environmentpath' => "#{testdir}/environments", 'hiera_config' => "#{testdir}/hiera.yaml", }, } with_puppet_running_on master, master_opts, testdir do agents.each do |agent| on(agent, puppet('agent', "-t --server #{master}"), :acceptable_exit_codes => [2]) assert_match("ntpserver global.ntp.puppetlabs.com", stdout) assert_match("ntpserver production.ntp.puppetlabs.com", stdout) end end diff --git a/acceptance/tests/ticket_4293_define_and_use_a_define_within_a_class.rb b/acceptance/tests/ticket_4293_define_and_use_a_define_within_a_class.rb index 18aca2bd0..8dfce35c3 100644 --- a/acceptance/tests/ticket_4293_define_and_use_a_define_within_a_class.rb +++ b/acceptance/tests/ticket_4293_define_and_use_a_define_within_a_class.rb @@ -1,23 +1,23 @@ # 2010-07-22 Jeff McCune # # AffectedVersion: 2.6.0rc4 # FixedVersion: 2.6.0 # # Description: using a defined type in the class it's declared in # causes an error. manifest = < "a_message_for_you" } + foo::do_notify { "test_one": msg => "a_message_for_you" } } include foo PP agents.each do |host| apply_manifest_on(host, manifest) do assert_match(/.*?Foo::Do_notify.*?a_message_for_you/, stdout, "the notification didn't show up in stdout on #{host}") end end