summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2009-04-29 19:32:38 +0200
committerBrice Figureau <brice-puppet@daysofwonder.com>2009-04-29 19:32:38 +0200
commit1c4620544520d2b5e2967be8dd525bd584ad3886 (patch)
tree7d3b23fa5cec082597beaf8601231e6e3de13a26 /test
parent929130bafc5f88512b256cfdb772299b3a54cfdb (diff)
downloadpuppet-1c4620544520d2b5e2967be8dd525bd584ad3886.tar.gz
puppet-1c4620544520d2b5e2967be8dd525bd584ad3886.tar.xz
puppet-1c4620544520d2b5e2967be8dd525bd584ad3886.zip
Fix #2207 - type was doing its own tag management leading to subtile bugs
This patch moves Type to use Puppet::Util::Tagging as the other part of Puppet. This brings uniformity and consistency in the way the tags are used and/or compared to each other. Type was storing tags in Symbol format, which produced #2207. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/ral/manager/type.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ral/manager/type.rb b/test/ral/manager/type.rb
index 0a0e13e39..1bd6d7163 100755
--- a/test/ral/manager/type.rb
+++ b/test/ral/manager/type.rb
@@ -372,11 +372,13 @@ class TestType < Test::Unit::TestCase
def test_tags
obj = Puppet::Type.type(:file).new(:path => tempfile())
- tags = [:some, :test, :tags]
+ tags = ["some", "test", "tags"]
obj.tags = tags
- assert_equal(tags + [:file], obj.tags)
+ # tags can be stored in an unordered set, so we sort
+ # them for the assert_equal to work
+ assert_equal((tags << "file").sort, obj.tags.sort)
end
def disabled_test_list