diff --git a/issues_needing_tests.txt b/issues_needing_tests.txt index 10552e8d..5cf89961 100644 --- a/issues_needing_tests.txt +++ b/issues_needing_tests.txt @@ -3,14 +3,14 @@ Issues to write tests for: From James: * #4233 (JJM Verified) -* #4235 +* #4285 * #4288 -* #4293 +* #4293 (JJM Verified, but can't make fail in RCs) * #4294 From Markus: * #4233 (JJM Verified) * #4270 * #4285 * #4287 -* #4293 +* #4293 (JJM Verified, but can't make fail in RCs) diff --git a/spec/ticket_4293_define_and_use_a_define_within_a_class_spec.sh b/spec/ticket_4293_define_and_use_a_define_within_a_class_spec.sh new file mode 100755 index 00000000..8ff07325 --- /dev/null +++ b/spec/ticket_4293_define_and_use_a_define_within_a_class_spec.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# +# 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. +# + +set -u +source spec/setup.sh + +OUTPUT="/tmp/puppet-$$.out" + +execute_manifest <<'PP' >"${OUTPUT}" +class foo { + define do_notify($msg) { + notify { "Message for $name: $msg": } + } + do_notify { 'test_one': msg => 'a_message_for_you' } +} +include foo +PP + +if egrep -q '^notice.*?Foo::Do_notify.*?a_message_for_you' "${OUTPUT}" ; then + exit $EXIT_OK +else + exit $EXIT_FAILURE +fi +