diff options
author | Brice Figureau <brice-puppet@daysofwonder.com> | 2009-04-29 19:32:38 +0200 |
---|---|---|
committer | Brice Figureau <brice-puppet@daysofwonder.com> | 2009-04-29 19:32:38 +0200 |
commit | 1c4620544520d2b5e2967be8dd525bd584ad3886 (patch) | |
tree | 7d3b23fa5cec082597beaf8601231e6e3de13a26 /test | |
parent | 929130bafc5f88512b256cfdb772299b3a54cfdb (diff) | |
download | puppet-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-x | test/ral/manager/type.rb | 6 |
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 |