Permalink
Browse files

Added support for templates

  • Loading branch information...
1 parent 23de103 commit 2e7098c4c07d7309e4a806d0698d93806104d7f1 @frankmt committed Feb 2, 2012
View
@@ -22,3 +22,8 @@ Scenario: Run puppet manifest with static files being served by fileserver
Given I have a clean running node n1
When I run puppet manifest "test_fileserver.pp" with config file "puppet_fileserver.conf" on node "n1"
Then Node "n1" should have file or directory "/tmp/puppet_test_fileserver"
+
+Scenario: Run puppet manifest with template dir configuration
+ Given I have a clean running node n1
+ When I run puppet manifest "test_template.pp" with config file "puppet_template.conf" on node "n1"
+ Then Node "n1" should have file or directory "/tmp/puppet_test_template"
@@ -0,0 +1,8 @@
+[main]
+ templatedir = /tmp/toft-puppet-tmp/manifests/templates
+
+ logdir = /var/log/puppet
+ vardir = /var/lib/puppet
+ ssldir = /var/lib/puppet/ssl
+ rundir = /var/run/puppet
+ report = true
@@ -0,0 +1,2 @@
+This is a test for the template config
+Here is the variable <%= variable %>
@@ -0,0 +1,12 @@
+class { 'test': }
+
+class test {
+
+ $variable = "BLAH"
+
+ file { "/tmp/puppet_test_template":
+ ensure => present,
+ mode => '0666',
+ content => template(template_test)
+ }
+}

0 comments on commit 2e7098c

Please sign in to comment.