summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/types/tc_symlink.rb67
1 files changed, 0 insertions, 67 deletions
diff --git a/test/types/tc_symlink.rb b/test/types/tc_symlink.rb
deleted file mode 100644
index f322c1167..000000000
--- a/test/types/tc_symlink.rb
+++ /dev/null
@@ -1,67 +0,0 @@
-if __FILE__ == $0
- $:.unshift '..'
- $:.unshift '../../lib'
- $puppetbase = "../../../../language/trunk"
-end
-
-require 'puppet'
-require 'test/unit'
-
-# $Id$
-
-class TestSymlink < Test::Unit::TestCase
- # hmmm
- # this is complicated, because we store references to the created
- # objects in a central store
- def setup
- @symlink = nil
- @path = File.join($puppetbase,"examples/root/etc/symlink")
-
- Kernel.system("rm -f %s" % @path)
- Puppet[:loglevel] = :debug if __FILE__ == $0
- assert_nothing_raised() {
- unless Puppet::Type::Symlink.has_key?(@path)
- Puppet::Type::Symlink.new(
- :path => @path
- )
- end
- @symlink = Puppet::Type::Symlink[@path]
- }
- end
-
- def test_target
- assert_nothing_raised() {
- @symlink[:target] = "configfile"
- }
- assert_nothing_raised() {
- @symlink.retrieve
- }
- # we might already be in sync
- assert(!@symlink.insync?())
- assert_nothing_raised() {
- @symlink.sync
- }
- assert_nothing_raised() {
- @symlink.retrieve
- }
- assert(@symlink.insync?())
- assert_nothing_raised() {
- @symlink[:target] = nil
- }
- assert_nothing_raised() {
- @symlink.retrieve
- }
- assert(!@symlink.insync?())
- assert_nothing_raised() {
- @symlink.sync
- }
- assert_nothing_raised() {
- @symlink.retrieve
- }
- assert(@symlink.insync?())
- end
-
- def teardown
- Kernel.system("rm -f %s" % @path)
- end
-end