summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-06-13 17:31:10 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-06-13 17:31:10 +0000
commit07e0d592c42249481aa7578e521182c6c19271ca (patch)
treec2e20ff7dacd044586ae51be1716ed7b28b51e9e
parentc380bfe234769165ba5c2e2d197dd1a1bdfa3e2b (diff)
downloadpuppet-07e0d592c42249481aa7578e521182c6c19271ca.tar.gz
puppet-07e0d592c42249481aa7578e521182c6c19271ca.tar.xz
puppet-07e0d592c42249481aa7578e521182c6c19271ca.zip
Fixing #169. Tags are ignored during config.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1259 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r--lib/puppet/config.rb8
-rwxr-xr-xtest/other/config.rb21
2 files changed, 29 insertions, 0 deletions
diff --git a/lib/puppet/config.rb b/lib/puppet/config.rb
index 7af3a72d9..bcfdabd90 100644
--- a/lib/puppet/config.rb
+++ b/lib/puppet/config.rb
@@ -525,8 +525,16 @@ Generated on #{Time.now}.
objects = bucket.to_type
objects.finalize
+ tags = nil
+ if Puppet[:tags]
+ tags = Puppet[:tags]
+ Puppet[:tags] = ""
+ end
trans = objects.evaluate
trans.evaluate
+ if tags
+ Puppet[:tags] = tags
+ end
# Remove is a recursive process, so it's sufficient to just call
# it on the component.
diff --git a/test/other/config.rb b/test/other/config.rb
index 95eab3b4d..457010ac0 100755
--- a/test/other/config.rb
+++ b/test/other/config.rb
@@ -625,6 +625,27 @@ inttest = 27
config.handlearg("--no-booltest", "false")
assert_equal(false, config[:booltest], "Boolean was not converted")
end
+
+ # Make sure that tags are ignored when configuring
+ def test_configs_ignore_tags
+ config = mkconfig
+ file = tempfile()
+
+ config.setdefaults(:mysection,
+ :mydir => [file, "a file"]
+ )
+
+ Puppet[:tags] = "yayness"
+
+ assert_nothing_raised {
+ config.use(:mysection)
+ }
+
+ assert(FileTest.directory?(file), "Directory did not get created")
+
+ assert_equal("yayness", Puppet[:tags],
+ "Tags got changed during config")
+ end
end
# $Id$