Signed-off-by: Luke Kanies <[email protected]>
---
 test/ral/type/filebucket.rb |  110 -------------------------------------------
 1 files changed, 0 insertions(+), 110 deletions(-)
 delete mode 100755 test/ral/type/filebucket.rb

diff --git a/test/ral/type/filebucket.rb b/test/ral/type/filebucket.rb
deleted file mode 100755
index b18a66f..0000000
--- a/test/ral/type/filebucket.rb
+++ /dev/null
@@ -1,110 +0,0 @@
-#!/usr/bin/env ruby
-
-require File.dirname(__FILE__) + '/../../lib/puppettest'
-
-require 'puppettest'
-require 'puppettest/support/utils'
-require 'fileutils'
-
-class TestFileBucket < Test::Unit::TestCase
-    include PuppetTest::Support::Utils
-    include PuppetTest::FileTesting
-    # hmmm
-    # this is complicated, because we store references to the created
-    # objects in a central store
-    def mkfile(hash)
-        file = nil
-        assert_nothing_raised {
-            file = Puppet::Type.type(:file).new(hash)
-        }
-        return file
-    end
-
-    def mkbucket(name,path)
-        bucket = nil
-        assert_nothing_raised {
-            bucket = Puppet::Type.type(:filebucket).new(
-                :name => name,
-                :path => path
-            )
-        }
-
-        @@tmpfiles.push path
-
-        return bucket
-    end
-
-    def mktestfile
-        # because luke's home directory is on nfs, it can't be used for testing
-        # as root
-        tmpfile = tempfile()
-        File.open(tmpfile, "w") { |f| f.puts rand(100) }
-        @@tmpfiles.push tmpfile
-        mkfile(:name => tmpfile)
-    end
-
-    def setup
-        super
-        begin
-            initstorage
-        rescue
-            system("rm -rf %s" % Puppet[:statefile])
-        end
-    end
-
-    def initstorage
-        Puppet::Util::Storage.init
-        Puppet::Util::Storage.load
-    end
-
-    def clearstorage
-        Puppet::Util::Storage.store
-        Puppet::Util::Storage.clear
-    end
-
-    def test_simplebucket
-        name = "yayness"
-        bucketpath = tempfile()
-        resource = mkbucket(name, bucketpath)
-
-        bucket = resource.bucket
-
-        assert_instance_of(Puppet::Network::Client.dipper, bucket)
-
-        md5 = nil
-        newpath = tempfile()
-        @@tmpfiles << newpath
-        system("cp /etc/passwd %s" % newpath)
-        assert_nothing_raised {
-            md5 = bucket.backup(newpath)
-        }
-
-        assert(md5)
-
-        dir, file, pathfile = 
Puppet::Network::Handler.filebucket.paths(bucketpath, md5)
-
-        assert(FileTest.directory?(dir),
-            "MD5 directory does not exist")
-
-        newmd5 = nil
-
-        # Just in case the file isn't writable
-        File.chmod(0644, newpath)
-        File.open(newpath, "w") { |f| f.puts ";lkjasdf;lkjasdflkjwerlkj134lkj" 
}
-
-        assert_nothing_raised {
-            newmd5 = bucket.backup(newpath)
-        }
-
-        assert(md5 != newmd5)
-
-        assert_nothing_raised {
-            bucket.restore(newpath, md5)
-        }
-
-        File.open(newpath) { |f| newmd5 = Digest::MD5.hexdigest(f.read) }
-
-        assert_equal(md5, newmd5)
-    end
-end
-
-- 
1.6.1


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to