diff options
author | lutter <lutter@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-06-15 15:41:47 +0000 |
---|---|---|
committer | lutter <lutter@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-06-15 15:41:47 +0000 |
commit | 883921c7607da1a805b223ffeff6950f97192315 (patch) | |
tree | d2badc417e5e2d2998dbcba26f2aaab25e385a0e | |
parent | e841d8fafac51837b13c3f429d988944aaba2119 (diff) | |
download | puppet-883921c7607da1a805b223ffeff6950f97192315.tar.gz puppet-883921c7607da1a805b223ffeff6950f97192315.tar.xz puppet-883921c7607da1a805b223ffeff6950f97192315.zip |
Test that setting a state to 'absent' really deletes it from the config
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1289 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r-- | test/types/yumrepo.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/types/yumrepo.rb b/test/types/yumrepo.rb index 89bdf9590..f88525d1e 100644 --- a/test/types/yumrepo.rb +++ b/test/types/yumrepo.rb @@ -63,6 +63,21 @@ class TestYumRepo < Test::Unit::TestCase assert_equal(CREATE_EXP, text) end + # Delete mirrorlist by setting it to :absent and enable baseurl + def test_absent + copy_datafiles + baseurl = 'http://example.com/' + devel = make_repo("development", + { :mirrorlist => 'absent', + :baseurl => baseurl }) + devel.retrieve + assert_apply(devel) + inifile = Puppet.type(:yumrepo).read() + sec = inifile["development"] + assert_nil(sec["mirrorlist"]) + assert_equal(baseurl, sec["baseurl"]) + end + def make_repo(name, hash={}) hash[:name] = name Puppet.type(:yumrepo).create(hash) |