summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-01-03 00:35:31 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-01-03 00:35:31 +0000
commit4eaf13ad0bc3057fb439fbc0a7090caa6d8ebb0c (patch)
tree8543bb72bbb5931747693b79ea636820d4d6e6ab /test
parent3c14db187d68bcfebbd5cd017f1b38326645b07d (diff)
downloadpuppet-4eaf13ad0bc3057fb439fbc0a7090caa6d8ebb0c.tar.gz
puppet-4eaf13ad0bc3057fb439fbc0a7090caa6d8ebb0c.tar.xz
puppet-4eaf13ad0bc3057fb439fbc0a7090caa6d8ebb0c.zip
converting storage from Marshal to YAML
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@759 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
-rwxr-xr-xtest/other/storage.rb9
-rw-r--r--test/puppettest.rb1
2 files changed, 9 insertions, 1 deletions
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
@@ -29,6 +29,12 @@ class TestParsedFile < Test::Unit::TestCase
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