diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-11-12 21:25:13 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-11-12 21:25:13 +0000 |
| commit | 4d5f70f017c744229ea83cda03c2c4334a010d1d (patch) | |
| tree | 54985b8c5f9412efdaa956b5919dd69afd363e7a /test | |
| parent | bd169b44a0ce58413fb5b031c3f12cd4ca6f4cbe (diff) | |
| download | puppet-4d5f70f017c744229ea83cda03c2c4334a010d1d.tar.gz puppet-4d5f70f017c744229ea83cda03c2c4334a010d1d.tar.xz puppet-4d5f70f017c744229ea83cda03c2c4334a010d1d.zip | |
Trying to get a netinfo provider for mounts working, but i give up. I am leaving it in place but marked as highly experimental.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1860 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
| -rwxr-xr-x | test/providers/netinfo_mount.rb | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/test/providers/netinfo_mount.rb b/test/providers/netinfo_mount.rb new file mode 100755 index 000000000..fcd814264 --- /dev/null +++ b/test/providers/netinfo_mount.rb @@ -0,0 +1,80 @@ +#!/usr/bin/env ruby +# +# Created by Luke Kanies on 2006-11-12. +# Copyright (c) 2006. All rights reserved. + +$:.unshift("../lib").unshift("../../lib") if __FILE__ =~ /\.rb$/ + +require 'puppettest' +# +# if Puppet::Type.type(:mount).provider(:netinfo).suitable? +# class TestNetinfoMountProvider < Test::Unit::TestCase +# include PuppetTest +# +# def setup +# super +# @mount = Puppet::Type.type(:mount) +# end +# +# if Process.uid == 0 and Facter.value(:hostname) == "midden" +# def test_mount_nfs +# culain = nil +# assert_nothing_raised do +# culain = @mount.create :name => "/mnt", :device => "culain:/home/luke", :options => "-o -P", :ensure => :present, +# :fstype => "nfs" +# end +# +# assert(culain, "Did not create fs") +# +# assert_apply(culain) +# +# assert_nothing_raised do +# culain.provider.mount +# end +# +# assert(culain.provider.mounted?, "fs is not considered mounted") +# assert_nothing_raised() { culain.provider.unmount } +# +# culain[:ensure] = :absent +# +# assert_apply(culain) +# end +# end +# +# def test_simple +# root = nil +# assert_nothing_raised do +# root = @mount.create :name => "/", :check => @mount.validstates +# end +# +# assert_nothing_raised do +# root.retrieve +# end +# +# prov = root.provider +# +# assert_nothing_raised do +# assert(prov.device, "Did not value for device") +# assert(prov.device != :absent, "Netinfo thinks the root device is missing") +# end +# end +# +# def test_list +# list = nil +# assert_nothing_raised do +# list = @mount.list +# end +# assert(list.length > 0) +# list.each do |obj| +# assert_instance_of(@mount, obj) +# assert(obj[:name], "objects do not have names") +# p obj +# assert(obj.is(:device), "Did not get value for device in %s" % obj[:name]) +# end +# +# assert(list.detect { |m| m[:name] == "/"}, "Could not find root fs") +# end +# end +# end + +# $Id$
\ No newline at end of file |
