diff --git a/acceptance/tests/stages/ticket_4655_default_stage_for_classes.rb b/acceptance/tests/stages/ticket_4655_default_stage_for_classes.rb new file mode 100644 index 000000000..1b0b537bf --- /dev/null +++ b/acceptance/tests/stages/ticket_4655_default_stage_for_classes.rb @@ -0,0 +1,39 @@ +test_name "#4655: Allow setting the default stage for parameterized classes" + +temp_file_name = "/tmp/4655-stage-in-parameterized-class.#{$$}" +test_manifest = < Stage[two] } +stage { two: before => Stage[three] } +stage { three: before => Stage[main] } + +class in_one { + exec { "echo 'in_one' > #{temp_file_name}": + path => '/usr/bin:/bin', + } +} +class { in_one: stage => "one" } + +class in_two( $stage=two ){ + exec { "echo 'in_two' >> #{temp_file_name}": + path => '/usr/bin:/bin', + } +} +class { in_two: } + +class in_three { + exec { "echo 'in_three' >> #{temp_file_name}": + path => '/usr/bin:/bin', + } +} +class { "in_three": stage => "three" } +HERE + +expected_results = "in_one +in_two +in_three +" +apply_manifest_on agents, test_manifest + +on(agents, "cat #{temp_file_name}").each do |result| + assert_equal(expected_results, "#{result.stdout}", "Unexpected result for host '#{result.host}'") +end diff --git a/acceptance/tests/ticket_7139_puppet_resource_file_qualified_paths.rm b/acceptance/tests/ticket_7139_puppet_resource_file_qualified_paths.rm new file mode 100644 index 000000000..f773ba17c --- /dev/null +++ b/acceptance/tests/ticket_7139_puppet_resource_file_qualified_paths.rm @@ -0,0 +1,11 @@ +test_name "#7139: Puppet resource file failes on path with leading '/'" + +step "Agents: create valid, invalid formatted manifests" +create_remote_file(agents, '/tmp/ticket-7139', %w{foo bar contents} ) + +step "Run puppet file resource on /tmp/ticket-7139" +agents.each do |host| + on(host, "puppet resource file /tmp/ticket-7139") do + assert_match(/file \{ \'\/tmp\/ticket-7139\':/, stdout, "puppet resource file failed on #{host}") + end +end diff --git a/ext/vim/README b/ext/vim/README index 776bb1eb2..7fd2934fb 100644 --- a/ext/vim/README +++ b/ext/vim/README @@ -1,2 +1,3 @@ To install these files, copy them into ~/.vim, or the relevant -system-wide location. +system-wide location. To use the ftplugin and indenting, you may need +to enable them with "filetype plugin indent on" in your vimrc. diff --git a/ext/vim/ftplugin/puppet.vim b/ext/vim/ftplugin/puppet.vim new file mode 100644 index 000000000..b6491554b --- /dev/null +++ b/ext/vim/ftplugin/puppet.vim @@ -0,0 +1,94 @@ +" Vim filetype plugin +" Language: Puppet +" Maintainer: Todd Zullinger +" Last Change: 2009 Aug 19 +" vim: set sw=4 sts=4: + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +if !exists("no_plugin_maps") && !exists("no_puppet_maps") + if !hasmapto("AlignRange") + map = AlignRange + endif +endif + +noremap