diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/other/tc_metrics.rb | 2 | ||||
-rw-r--r-- | test/other/tc_state.rb | 2 | ||||
-rw-r--r-- | test/other/tc_transactions.rb | 6 | ||||
-rw-r--r-- | test/types/tc_basic.rb | 2 | ||||
-rw-r--r-- | test/types/tc_file.rb | 10 | ||||
-rw-r--r-- | test/types/tc_query.rb | 6 |
6 files changed, 14 insertions, 14 deletions
diff --git a/test/other/tc_metrics.rb b/test/other/tc_metrics.rb index 1dd73a305..f111ea792 100644 --- a/test/other/tc_metrics.rb +++ b/test/other/tc_metrics.rb @@ -19,7 +19,7 @@ class TestMetric < Test::Unit::TestCase eventmax = 10 maxdiff = 10 - types = [Puppet::Type::File, Puppet::Type::Package, Puppet::Type::Service] + types = [Puppet::Type::PFile, Puppet::Type::Package, Puppet::Type::Service] data = [:total, :managed, :outofsync, :changed, :totalchanges] events = [:file_changed, :package_installed, :service_started] diff --git a/test/other/tc_state.rb b/test/other/tc_state.rb index 5ab5a7cb3..3720f6286 100644 --- a/test/other/tc_state.rb +++ b/test/other/tc_state.rb @@ -41,7 +41,7 @@ class TestStorage < Test::Unit::TestCase file = nil state = nil assert_nothing_raised { - file = Puppet::Type::File.new( + file = Puppet::Type::PFile.new( :path => "/etc/passwd" ) } diff --git a/test/other/tc_transactions.rb b/test/other/tc_transactions.rb index ac2cd8578..03c5134e2 100644 --- a/test/other/tc_transactions.rb +++ b/test/other/tc_transactions.rb @@ -31,13 +31,13 @@ class TestTransactions < Test::Unit::TestCase def newfile assert_nothing_raised() { cfile = File.join($puppetbase,"examples/root/etc/configfile") - unless Puppet::Type::File.has_key?(cfile) - Puppet::Type::File.new( + unless Puppet::Type::PFile.has_key?(cfile) + Puppet::Type::PFile.new( :path => cfile, :check => [:mode, :owner, :group] ) end - return Puppet::Type::File[cfile] + return Puppet::Type::PFile[cfile] } end diff --git a/test/types/tc_basic.rb b/test/types/tc_basic.rb index a62bc4aba..cd567855c 100644 --- a/test/types/tc_basic.rb +++ b/test/types/tc_basic.rb @@ -27,7 +27,7 @@ class TestBasic < Test::Unit::TestCase assert_nothing_raised() { @filepath = "/tmp/testfile" system("rm -f %s" % @filepath) - @configfile = Puppet::Type::File.new( + @configfile = Puppet::Type::PFile.new( :path => @filepath, :create => true, :checksum => "md5" diff --git a/test/types/tc_file.rb b/test/types/tc_file.rb index e40060c01..00f942a33 100644 --- a/test/types/tc_file.rb +++ b/test/types/tc_file.rb @@ -19,14 +19,14 @@ class TestFile < Test::Unit::TestCase Puppet[:loglevel] = :debug if __FILE__ == $0 Puppet[:statefile] = "/var/tmp/puppetstate" assert_nothing_raised() { - @file = Puppet::Type::File.new( + @file = Puppet::Type::PFile.new( :path => @path ) } end def teardown - Puppet::Type::File.clear + Puppet::Type::PFile.clear system("rm -f %s" % Puppet[:statefile]) end @@ -84,7 +84,7 @@ class TestFile < Test::Unit::TestCase %w{a b c d}.collect { |name| "/tmp/createst%s" % name }.each { |path| file =nil assert_nothing_raised() { - file = Puppet::Type::File.new( + file = Puppet::Type::PFile.new( :path => path, :create => true ) @@ -142,7 +142,7 @@ class TestFile < Test::Unit::TestCase } # okay, we now know that we have a file... assert_nothing_raised() { - file = Puppet::Type::File.new( + file = Puppet::Type::PFile.new( :path => path, :checksum => type ) @@ -177,7 +177,7 @@ class TestFile < Test::Unit::TestCase events.include?(:file_modified) ) assert_nothing_raised() { - Puppet::Type::File.clear + Puppet::Type::PFile.clear } assert_nothing_raised() { system("rm -f %s" % path) diff --git a/test/types/tc_query.rb b/test/types/tc_query.rb index 9bb2dd72e..242e160ff 100644 --- a/test/types/tc_query.rb +++ b/test/types/tc_query.rb @@ -26,13 +26,13 @@ class TestQuery < Test::Unit::TestCase def file assert_nothing_raised() { cfile = File.join($puppetbase,"examples/root/etc/configfile") - unless Puppet::Type::File.has_key?(cfile) - Puppet::Type::File.new( + unless Puppet::Type::PFile.has_key?(cfile) + Puppet::Type::PFile.new( :path => cfile, :check => [:mode, :owner] ) end - @configfile = Puppet::Type::File[cfile] + @configfile = Puppet::Type::PFile[cfile] } return @configfile end |