summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-11-16 21:47:50 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-11-16 21:47:50 +0000
commit185ba8cc77bb90ac566ed2b6fe9132ae5c78d378 (patch)
tree7b12b785b0f951ea3b5432f11e40c74fc8e22b0b /test
parent5f5417aada66f65d9aeb924f64aebb28077286cf (diff)
downloadpuppet-185ba8cc77bb90ac566ed2b6fe9132ae5c78d378.tar.gz
puppet-185ba8cc77bb90ac566ed2b6fe9132ae5c78d378.tar.xz
puppet-185ba8cc77bb90ac566ed2b6fe9132ae5c78d378.zip
Fixing backwards compatibility in mounts -- they were not correctly copying the path over to the name
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1888 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
-rwxr-xr-xtest/types/mount.rb29
1 files changed, 24 insertions, 5 deletions
diff --git a/test/types/mount.rb b/test/types/mount.rb
index 8b8cf9ab5..1134b664a 100755
--- a/test/types/mount.rb
+++ b/test/types/mount.rb
@@ -76,6 +76,14 @@ class TestMounts < Test::Unit::TestCase
def mkmount
mount = nil
+ assert_nothing_raised {
+ mount = Puppet.type(:mount).create(mkmount_args)
+ }
+
+ return mount
+ end
+
+ def mkmount_args
if defined? @pcount
@pcount += 1
else
@@ -95,11 +103,7 @@ class TestMounts < Test::Unit::TestCase
end
end
- assert_nothing_raised {
- mount = Puppet.type(:mount).create(args)
- }
-
- return mount
+ return args
end
def test_simplemount
@@ -223,6 +227,21 @@ class TestMounts < Test::Unit::TestCase
"Mount was not actually removed")
end
end
+
+ # Make sure that the name gets correctly set if they set the path,
+ # which used to be the namevar.
+ def test_name_and_path
+ mount = nil
+ args = mkmount_args
+ args[:name] = "mount_name"
+ args[:path] = "mount_path"
+
+ assert_nothing_raised do
+ mount = @mount.create(args)
+ end
+
+ assert_equal("mount_path", mount[:name], "Name did not get copied over")
+ end
end
# $Id$