From 4eaf13ad0bc3057fb439fbc0a7090caa6d8ebb0c Mon Sep 17 00:00:00 2001 From: luke Date: Tue, 3 Jan 2006 00:35:31 +0000 Subject: converting storage from Marshal to YAML git-svn-id: https://reductivelabs.com/svn/puppet/trunk@759 980ebf18-57e1-0310-9a29-db15c13687c0 --- test/other/storage.rb | 9 ++++++++- test/puppettest.rb | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/other/storage.rb b/test/other/storage.rb index 787fe9cdd..0a52196d6 100755 --- a/test/other/storage.rb +++ b/test/other/storage.rb @@ -28,6 +28,12 @@ class TestParsedFile < Test::Unit::TestCase assert_nothing_raised { Puppet::Storage.store } + assert_nothing_raised { + Puppet::Storage.clear + } + assert_nothing_raised { + Puppet::Storage.load + } assert_nothing_raised { state = Puppet::Storage.state(hash) } @@ -39,7 +45,7 @@ class TestParsedFile < Test::Unit::TestCase # are reading or writing the file at once # so we need to test that def test_multiwrite - value = {:a => :b, :c => :d} + value = {:a => :b} threads = [] 9.times { |a| threads << Thread.new { @@ -47,6 +53,7 @@ class TestParsedFile < Test::Unit::TestCase assert_nothing_raised { Puppet::Storage.load state = Puppet::Storage.state(value) + value.each { |k,v| state[k] = v } state[:e] = rand(100) Puppet::Storage.store } diff --git a/test/puppettest.rb b/test/puppettest.rb index be3ec8279..0871b5c13 100644 --- a/test/puppettest.rb +++ b/test/puppettest.rb @@ -98,6 +98,7 @@ module TestPuppet } @@tmppids.clear Puppet::Type.allclear + Puppet::Storage.clear Puppet.clear # reset all of the logs -- cgit