diff options
| author | Luke Kanies <luke@madstop.com> | 2007-10-05 00:08:15 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-10-05 00:08:15 -0500 |
| commit | 275af562b462813ddf5ddbad2192ddc2bf57770c (patch) | |
| tree | aceabf68095b8c34fd599f245022a9aaab0984da /test/ral | |
| parent | ce0178316d8cefd072f53d39b59ce47332f6ec8f (diff) | |
| parent | 29accba1b9343f4967c15d36506b3bf60d5f0f9c (diff) | |
| download | puppet-275af562b462813ddf5ddbad2192ddc2bf57770c.tar.gz puppet-275af562b462813ddf5ddbad2192ddc2bf57770c.tar.xz puppet-275af562b462813ddf5ddbad2192ddc2bf57770c.zip | |
Merge branch 'routing' of http://git.rickbradley.com/puppet into routing
Diffstat (limited to 'test/ral')
44 files changed, 15 insertions, 59 deletions
diff --git a/test/ral/manager/attributes.rb b/test/ral/manager/attributes.rb index ef8742d48..28cb07f69 100755 --- a/test/ral/manager/attributes.rb +++ b/test/ral/manager/attributes.rb @@ -349,4 +349,3 @@ class TestTypeAttributes < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/manager/instances.rb b/test/ral/manager/instances.rb index e7a43488a..14b85f95d 100755 --- a/test/ral/manager/instances.rb +++ b/test/ral/manager/instances.rb @@ -106,4 +106,3 @@ class TestTypeInstances < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/manager/manager.rb b/test/ral/manager/manager.rb index 8a273ecfd..4f2ade4e9 100755 --- a/test/ral/manager/manager.rb +++ b/test/ral/manager/manager.rb @@ -52,4 +52,3 @@ class TestTypeManager < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/manager/provider.rb b/test/ral/manager/provider.rb index 1fcb5efbc..0aeac357f 100755 --- a/test/ral/manager/provider.rb +++ b/test/ral/manager/provider.rb @@ -89,4 +89,3 @@ class TestTypeProviders < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/providers/cron/crontab.rb b/test/ral/providers/cron/crontab.rb index 7df7bab3d..bc32b839b 100755 --- a/test/ral/providers/cron/crontab.rb +++ b/test/ral/providers/cron/crontab.rb @@ -52,7 +52,6 @@ class TestCronParsedProvider < Test::Unit::TestCase def teardown Puppet::Util::FileType.filetype(:ram).clear - @provider.filetype = @oldfiletype @provider.clear super end @@ -211,7 +210,7 @@ class TestCronParsedProvider < Test::Unit::TestCase # Take our sample files, and make sure we can entirely parse them, # then that we can generate them again and we get the same data. def test_parse_and_generate_sample_files - @provider.filetype = :ram + @provider.stubs(:filetype).returns(Puppet::Util::FileType.filetype(:ram)) crondir = datadir(File.join(%w{providers cron})) files = Dir.glob("%s/crontab.*" % crondir) @@ -306,7 +305,7 @@ class TestCronParsedProvider < Test::Unit::TestCase str = "# this is a comment\n#and another comment\n" user = "fakeuser" records = nil - target = @provider.filetype = :ram + @provider.stubs(:filetype).returns(Puppet::Util::FileType.filetype(:ram)) target = @provider.target_object(user) target.write(str) assert_nothing_raised { @@ -320,7 +319,7 @@ class TestCronParsedProvider < Test::Unit::TestCase end def test_simpleparsing - @provider.filetype = :ram + @provider.stubs(:filetype).returns(Puppet::Util::FileType.filetype(:ram)) text = "5 1,2 * 1 0 /bin/echo funtest" records = nil @@ -376,7 +375,7 @@ class TestCronParsedProvider < Test::Unit::TestCase # Make sure we correctly bidirectionally parse things. def test_records_and_strings - @provider.filetype = :ram + @provider.stubs(:filetype).returns(Puppet::Util::FileType.filetype(:ram)) setme target = @provider.target_object(@me) @@ -426,7 +425,7 @@ class TestCronParsedProvider < Test::Unit::TestCase 0,30 * * 1 * fooness " setme - @provider.filetype = :ram + @provider.stubs(:filetype).returns(Puppet::Util::FileType.filetype(:ram)) you = "you" # Write the same tab to multiple targets @@ -486,7 +485,7 @@ class TestCronParsedProvider < Test::Unit::TestCase def test_data setme - @provider.filetype = :ram + @provider.stubs(:filetype).returns(Puppet::Util::FileType.filetype(:ram)) target = @provider.target_object(@me) fakedata("data/providers/cron/examples").each do |file| text = File.read(file) @@ -518,7 +517,7 @@ class TestCronParsedProvider < Test::Unit::TestCase # Match freebsd's annoying @daily stuff. def test_match_freebsd_special - @provider.filetype = :ram + @provider.stubs(:filetype).returns(Puppet::Util::FileType.filetype(:ram)) setme target = @provider.target_object(@me) @@ -561,7 +560,7 @@ class TestCronParsedProvider < Test::Unit::TestCase # Testing #669. def test_environment_settings - @provider.filetype = :ram + @provider.stubs(:filetype).returns(Puppet::Util::FileType.filetype(:ram)) setme target = @provider.target_object(@me) @@ -601,4 +600,3 @@ class TestCronParsedProvider < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/providers/group.rb b/test/ral/providers/group.rb index 158fc4afa..2d5122da0 100755 --- a/test/ral/providers/group.rb +++ b/test/ral/providers/group.rb @@ -249,4 +249,3 @@ class TestGroupProvider < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/providers/host/netinfo.rb b/test/ral/providers/host/netinfo.rb index 674253d3c..f49a00beb 100755 --- a/test/ral/providers/host/netinfo.rb +++ b/test/ral/providers/host/netinfo.rb @@ -54,4 +54,3 @@ end end end -# $Id$ diff --git a/test/ral/providers/host/parsed.rb b/test/ral/providers/host/parsed.rb index 85f5cb664..5499b0220 100755 --- a/test/ral/providers/host/parsed.rb +++ b/test/ral/providers/host/parsed.rb @@ -223,4 +223,3 @@ class TestParsedHostProvider < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/providers/mailalias/aliases.rb b/test/ral/providers/mailalias/aliases.rb index d0a95d877..e54b6659a 100755 --- a/test/ral/providers/mailalias/aliases.rb +++ b/test/ral/providers/mailalias/aliases.rb @@ -54,4 +54,3 @@ class TestMailaliasAliasesProvider < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/providers/mount/netinfo.rb b/test/ral/providers/mount/netinfo.rb index af65e5a4d..dc4316b8a 100755 --- a/test/ral/providers/mount/netinfo.rb +++ b/test/ral/providers/mount/netinfo.rb @@ -77,4 +77,3 @@ require 'puppettest' # end # end -# $Id$ diff --git a/test/ral/providers/mount/parsed.rb b/test/ral/providers/mount/parsed.rb index 9637a840f..4fe644734 100755 --- a/test/ral/providers/mount/parsed.rb +++ b/test/ral/providers/mount/parsed.rb @@ -248,4 +248,3 @@ class TestParsedMountsNonDarwinAsRoot < PuppetTest::TestCase end end -# $Id$ diff --git a/test/ral/providers/nameservice.rb b/test/ral/providers/nameservice.rb index f63853af3..f15e51d02 100755 --- a/test/ral/providers/nameservice.rb +++ b/test/ral/providers/nameservice.rb @@ -30,4 +30,3 @@ class TestNameServiceProvider < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/providers/package.rb b/test/ral/providers/package.rb index 969bd39a1..a0283b363 100755 --- a/test/ral/providers/package.rb +++ b/test/ral/providers/package.rb @@ -275,4 +275,3 @@ class TestPackageProvider < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/providers/package/apt.rb b/test/ral/providers/package/apt.rb index a82f1bc3a..f4fb1a95c 100755 --- a/test/ral/providers/package/apt.rb +++ b/test/ral/providers/package/apt.rb @@ -167,4 +167,3 @@ class AptPackageProviderTest < PuppetTest::TestCase end end -# $Id$ diff --git a/test/ral/providers/package/aptrpm.rb b/test/ral/providers/package/aptrpm.rb index a3257bcce..c005ee5a6 100755 --- a/test/ral/providers/package/aptrpm.rb +++ b/test/ral/providers/package/aptrpm.rb @@ -86,4 +86,3 @@ class AptrpmPackageProviderTest < PuppetTest::TestCase end end -# $Id$ diff --git a/test/ral/providers/parsedfile.rb b/test/ral/providers/parsedfile.rb index 053a1993d..8a5982553 100755 --- a/test/ral/providers/parsedfile.rb +++ b/test/ral/providers/parsedfile.rb @@ -695,5 +695,4 @@ class TestParsedFile < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/providers/port/parsed.rb b/test/ral/providers/port/parsed.rb index acd6eda1f..b8237ad86 100755 --- a/test/ral/providers/port/parsed.rb +++ b/test/ral/providers/port/parsed.rb @@ -230,4 +230,3 @@ require 'puppettest' # end #end -# $Id$ diff --git a/test/ral/providers/provider.rb b/test/ral/providers/provider.rb index 7fcf3f59d..ee7eb1bca 100755 --- a/test/ral/providers/provider.rb +++ b/test/ral/providers/provider.rb @@ -500,4 +500,3 @@ class TestProviderFeatures < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/providers/service.rb b/test/ral/providers/service.rb index 5a4a6c1c2..c4127146f 100755 --- a/test/ral/providers/service.rb +++ b/test/ral/providers/service.rb @@ -232,4 +232,3 @@ class TestLocalService < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/providers/service/base.rb b/test/ral/providers/service/base.rb index 03e7105ca..7300b77af 100755 --- a/test/ral/providers/service/base.rb +++ b/test/ral/providers/service/base.rb @@ -72,4 +72,3 @@ class TestBaseServiceProvider < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/providers/sshkey/parsed.rb b/test/ral/providers/sshkey/parsed.rb index 4a8ce07f1..017bb983f 100755 --- a/test/ral/providers/sshkey/parsed.rb +++ b/test/ral/providers/sshkey/parsed.rb @@ -108,4 +108,3 @@ class TestParsedSSHKey < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/providers/user.rb b/test/ral/providers/user.rb index 7e5290549..1c2fd2f1f 100755 --- a/test/ral/providers/user.rb +++ b/test/ral/providers/user.rb @@ -563,4 +563,3 @@ class TestUserProvider < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/providers/user/useradd.rb b/test/ral/providers/user/useradd.rb index 55bb96f2a..28692be6c 100755 --- a/test/ral/providers/user/useradd.rb +++ b/test/ral/providers/user/useradd.rb @@ -243,4 +243,3 @@ class UserRootAddProviderTest < PuppetTest::TestCase end -# $Id$ diff --git a/test/ral/types/cron.rb b/test/ral/types/cron.rb index 1695befac..05fd342d5 100755 --- a/test/ral/types/cron.rb +++ b/test/ral/types/cron.rb @@ -17,8 +17,7 @@ class TestCron < Test::Unit::TestCase @crontype = Puppet::Type.type(:cron) @provider = @crontype.defaultprovider if @provider.respond_to?(:filetype=) - @oldfiletype = @provider.filetype - @provider.filetype = :ram + @provider.stubs(:filetype).returns(Puppet::Util::FileType.filetype(:ram)) end @crontype = Puppet::Type.type(:cron) end @@ -26,9 +25,6 @@ class TestCron < Test::Unit::TestCase def teardown super @crontype.defaultprovider = nil - if defined? @oldfiletype - @provider.filetype = @oldfiletype - end Puppet::Util::FileType.filetype(:ram).clear end @@ -501,4 +497,3 @@ class TestCron < Test::Unit::TestCase end -# $Id$ diff --git a/test/ral/types/exec.rb b/test/ral/types/exec.rb index 0c7cc1d90..e7ffa0aec 100755 --- a/test/ral/types/exec.rb +++ b/test/ral/types/exec.rb @@ -728,4 +728,3 @@ and stuff" end end -# $Id$ diff --git a/test/ral/types/file.rb b/test/ral/types/file.rb index 0c16d6dff..de8d60447 100755 --- a/test/ral/types/file.rb +++ b/test/ral/types/file.rb @@ -1813,4 +1813,3 @@ class TestFile < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/types/file/target.rb b/test/ral/types/file/target.rb index c4597cedf..8dda94e92 100755 --- a/test/ral/types/file/target.rb +++ b/test/ral/types/file/target.rb @@ -360,4 +360,3 @@ class TestFileTarget < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/types/filebucket.rb b/test/ral/types/filebucket.rb index 5b0093425..094a5da2b 100755 --- a/test/ral/types/filebucket.rb +++ b/test/ral/types/filebucket.rb @@ -153,4 +153,3 @@ class TestFileBucket < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/types/filesources.rb b/test/ral/types/filesources.rb index 01d9766db..9517db5a5 100755 --- a/test/ral/types/filesources.rb +++ b/test/ral/types/filesources.rb @@ -955,8 +955,13 @@ class TestFileSources < Test::Unit::TestCase files = [] [source1, source2, File.join(source1, "subdir"), File.join(source2, "subdir")].each_with_index do |dir, i| Dir.mkdir(dir) + # Make a single file in each directory file = File.join(dir, "file%s" % i) File.open(file, "w") { |f| f.puts "yay%s" % i} + + # Now make a second one in each directory + file = File.join(dir, "second-file%s" % i) + File.open(file, "w") { |f| f.puts "yaysecond-%s" % i} files << file end @@ -964,7 +969,7 @@ class TestFileSources < Test::Unit::TestCase assert_apply(obj) - ["file0", "file1", "subdir/file2", "subdir/file3"].each do |file| + ["file0", "file1", "second-file0", "second-file1", "subdir/file2", "subdir/second-file2", "subdir/file3", "subdir/second-file3"].each do |file| path = File.join(dest, file) assert(FileTest.exists?(path), "did not create %s" % file) @@ -1000,4 +1005,3 @@ class TestFileSources < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/types/host.rb b/test/ral/types/host.rb index 57d425e7c..8244caed0 100755 --- a/test/ral/types/host.rb +++ b/test/ral/types/host.rb @@ -159,4 +159,3 @@ class TestHost < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/types/interface.rb b/test/ral/types/interface.rb index 0e2768d9e..0de538721 100755 --- a/test/ral/types/interface.rb +++ b/test/ral/types/interface.rb @@ -37,4 +37,3 @@ class TestInterfaceType < PuppetTest::TestCase end end -# $Id$ diff --git a/test/ral/types/mailalias.rb b/test/ral/types/mailalias.rb index 6dce531e9..544e6d2ae 100755 --- a/test/ral/types/mailalias.rb +++ b/test/ral/types/mailalias.rb @@ -47,4 +47,3 @@ class TestMailAlias < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/types/mount.rb b/test/ral/types/mount.rb index c4314db98..fa5022e3d 100755 --- a/test/ral/types/mount.rb +++ b/test/ral/types/mount.rb @@ -359,4 +359,3 @@ class TestMounts < PuppetTest::TestCase end end -# $Id$ diff --git a/test/ral/types/package.rb b/test/ral/types/package.rb index e97c6bd3c..d09cfdc8e 100755 --- a/test/ral/types/package.rb +++ b/test/ral/types/package.rb @@ -154,4 +154,3 @@ class TestPackages < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/types/parameter.rb b/test/ral/types/parameter.rb index bc79d0bd5..70c325e08 100755 --- a/test/ral/types/parameter.rb +++ b/test/ral/types/parameter.rb @@ -169,4 +169,3 @@ class TestParameter < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/types/port.rb b/test/ral/types/port.rb index 30292e1af..743107e44 100755 --- a/test/ral/types/port.rb +++ b/test/ral/types/port.rb @@ -145,4 +145,3 @@ require 'puppettest' # end #end -# $Id$ diff --git a/test/ral/types/property.rb b/test/ral/types/property.rb index 27998d6fd..2ad5212b7 100755 --- a/test/ral/types/property.rb +++ b/test/ral/types/property.rb @@ -385,4 +385,3 @@ class TestProperty < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/types/resources.rb b/test/ral/types/resources.rb index 82d4e225d..3ee785444 100755 --- a/test/ral/types/resources.rb +++ b/test/ral/types/resources.rb @@ -206,4 +206,3 @@ class TestResources < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/types/schedule.rb b/test/ral/types/schedule.rb index cc565bbfc..a07ac791e 100755 --- a/test/ral/types/schedule.rb +++ b/test/ral/types/schedule.rb @@ -354,4 +354,3 @@ class TestSchedule < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/types/service.rb b/test/ral/types/service.rb index 488cd7147..b187a08cd 100755 --- a/test/ral/types/service.rb +++ b/test/ral/types/service.rb @@ -36,4 +36,3 @@ class TestServiceType < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/types/sshkey.rb b/test/ral/types/sshkey.rb index 9a20dc251..26349e382 100755 --- a/test/ral/types/sshkey.rb +++ b/test/ral/types/sshkey.rb @@ -189,4 +189,3 @@ class TestSSHKey < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/types/tidy.rb b/test/ral/types/tidy.rb index 8fada1adb..521f1acc5 100755 --- a/test/ral/types/tidy.rb +++ b/test/ral/types/tidy.rb @@ -228,4 +228,3 @@ class TestTidy < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/types/user.rb b/test/ral/types/user.rb index 9b24cc74a..9a76c0585 100755 --- a/test/ral/types/user.rb +++ b/test/ral/types/user.rb @@ -490,4 +490,3 @@ class TestUser < Test::Unit::TestCase end end -# $Id$ diff --git a/test/ral/types/zone.rb b/test/ral/types/zone.rb index d68306201..eef791361 100755 --- a/test/ral/types/zone.rb +++ b/test/ral/types/zone.rb @@ -418,4 +418,3 @@ end end end -# $Id$ |
