diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-03 22:01:46 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-03 22:01:46 +0000 |
| commit | daa79e2da4d7a8a32c461da9bfb01c7a98763a5c (patch) | |
| tree | b14d23f24c0a151cd9f9e5387c7c2218d0ef76a4 /test/providers | |
| parent | b657850bf5cc02b25200720a57d5e3e381a98b62 (diff) | |
Intermediate commit; ports are not working yet
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1549 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/providers')
| -rw-r--r-- | test/providers/parsedhost.rb | 23 | ||||
| -rwxr-xr-x | test/providers/parsedsshkey.rb | 21 |
2 files changed, 2 insertions, 42 deletions
diff --git a/test/providers/parsedhost.rb b/test/providers/parsedhost.rb index 1d982c813..bb122129a 100644 --- a/test/providers/parsedhost.rb +++ b/test/providers/parsedhost.rb @@ -194,28 +194,7 @@ class TestParsedHostProvider < Test::Unit::TestCase # Parse our sample data and make sure we regenerate it correctly. def test_hostsparse - fakedata("data/types/hosts").each { |file| - @provider.path = file - instances = nil - assert_nothing_raised { - instances = @provider.retrieve - } - - text = @provider.fileobj.read - - dest = tempfile() - @provider.path = dest - - # Now write it back out - assert_nothing_raised { - @provider.store(instances) - } - - newtext = @provider.fileobj.read - - # Don't worry about difference in whitespace - assert_equal(text.gsub(/\s+/, ' '), newtext.gsub(/\s+/, ' ')) - } + fakedata("data/types/hosts").each do |file| fakedataparse(file) end end # Make sure we can modify the file elsewhere and those modifications will diff --git a/test/providers/parsedsshkey.rb b/test/providers/parsedsshkey.rb index f0295c47a..7f21a58b4 100755 --- a/test/providers/parsedsshkey.rb +++ b/test/providers/parsedsshkey.rb @@ -30,26 +30,7 @@ class TestParsedSSHKey < Test::Unit::TestCase def test_keysparse fakedata("data/types/sshkey").each { |file| - @provider.path = file - instances = nil - assert_nothing_raised { - instances = @provider.retrieve - } - - text = @provider.fileobj.read - - dest = tempfile() - @provider.path = dest - - # Now write it back out - assert_nothing_raised { - @provider.store(instances) - } - - newtext = @provider.fileobj.read - - # Don't worry about difference in whitespace - assert_equal(text.gsub(/\s+/, ' '), newtext.gsub(/\s+/, ' ')) + fakedataparse(file) } end end |
