summaryrefslogtreecommitdiffstats
path: root/test/data/snippets
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-02-12 14:57:24 -0600
committerLuke Kanies <luke@madstop.com>2008-02-12 14:57:24 -0600
commit7e45553448f2a051594ee4f2fc83ebcfa4a8114a (patch)
tree1d64489aa420ee391fb0fe51673fad92232bdcc6 /test/data/snippets
parent9b66251076e0403afde5b1ad7aa543d18e302a94 (diff)
downloadpuppet-7e45553448f2a051594ee4f2fc83ebcfa4a8114a.tar.gz
puppet-7e45553448f2a051594ee4f2fc83ebcfa4a8114a.tar.xz
puppet-7e45553448f2a051594ee4f2fc83ebcfa4a8114a.zip
Fixed #997 -- virtual defined types are no longer evaluated.
NOTE: This introduces a behaviour change, in that you previously could realize a resource within a virtual defined resource, and now you must realize the entire defined resource, rather than just the contained resource.
Diffstat (limited to 'test/data/snippets')
-rw-r--r--test/data/snippets/collection_within_virtual_definitions.pp20
-rw-r--r--test/data/snippets/realize_defined_types.pp13
2 files changed, 20 insertions, 13 deletions
diff --git a/test/data/snippets/collection_within_virtual_definitions.pp b/test/data/snippets/collection_within_virtual_definitions.pp
new file mode 100644
index 000000000..3c21468b0
--- /dev/null
+++ b/test/data/snippets/collection_within_virtual_definitions.pp
@@ -0,0 +1,20 @@
+define test($name) {
+ file {"/tmp/collection_within_virtual_definitions1_$name.txt":
+ content => "File name $name\n"
+ }
+ Test2 <||>
+}
+
+define test2() {
+ file {"/tmp/collection_within_virtual_definitions2_$name.txt":
+ content => "This is a test\n"
+ }
+}
+
+node default {
+ @test {"foo":
+ name => "foo"
+ }
+ @test2 {"foo2": }
+ Test <||>
+}
diff --git a/test/data/snippets/realize_defined_types.pp b/test/data/snippets/realize_defined_types.pp
deleted file mode 100644
index a4b562258..000000000
--- a/test/data/snippets/realize_defined_types.pp
+++ /dev/null
@@ -1,13 +0,0 @@
-define testing {
- file { "/tmp/realize_defined_test1": ensure => file }
-}
-@testing { yay: }
-
-define deeper {
- file { "/tmp/realize_defined_test2": ensure => file }
-}
-
-@deeper { boo: }
-
-realize Testing[yay]
-realize File["/tmp/realize_defined_test2"]