Skip to content

Commit

Permalink
Added test for [#4293] define something and use it
Browse files Browse the repository at this point in the history
This test appears to only come up in agent/server
mode.  I could not trigger the bug in 2.6.0rc4
using stand alone apply mode.

This test doesn't fail on any of the 2.6.0
release candidates, as far as I can tell.  I'm
not sure if the bug and fix were transitional
between release candidates or not...

Updated list of issues needing tests.

Signed-off-by: Jeff McCune <jeff@puppetlabs.com>
  • Loading branch information
Jeff McCune committed Jul 23, 2010
1 parent d798a9a commit 493ee2b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
6 changes: 3 additions & 3 deletions issues_needing_tests.txt
Expand Up @@ -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)

32 changes: 32 additions & 0 deletions spec/ticket_4293_define_and_use_a_define_within_a_class_spec.sh
@@ -0,0 +1,32 @@
#!/bin/bash
#
# 2010-07-22 Jeff McCune <jeff@puppetlabs.com>
#
# 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

0 comments on commit 493ee2b

Please sign in to comment.