diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-05-15 19:22:36 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-05-15 19:22:36 +0000 |
| commit | dbedcd7b9892bc41728a4f334464f152d09d54fc (patch) | |
| tree | 66e06fa8fec48ea00491a728ed24906e6b810812 /test/other | |
| parent | 28f7d6c7ebd56da3014464c82c73a4f98f3406ea (diff) | |
A round of fixes so unit tests pass; most of the failures were from the merging of the transaction-refactor branch
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2517 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/other')
| -rwxr-xr-x | test/other/propertychange.rb | 7 | ||||
| -rwxr-xr-x | test/other/transactions.rb | 13 |
2 files changed, 10 insertions, 10 deletions
diff --git a/test/other/propertychange.rb b/test/other/propertychange.rb index 97ee3268c..31321753b 100755 --- a/test/other/propertychange.rb +++ b/test/other/propertychange.rb @@ -10,7 +10,7 @@ require 'puppettest' class TestPropertyChange < Test::Unit::TestCase include PuppetTest class FakeProperty < Puppet::Type::Property - attr_accessor :is, :should, :parent + attr_accessor :is, :should, :resource attr_reader :noop def change_to_s(currentvalue, newvalue) "fake change" @@ -52,10 +52,10 @@ class TestPropertyChange < Test::Unit::TestCase end def mkchange - property = FakeProperty.new :parent => "fakeparent" + property = FakeProperty.new :resource => "fakeparent" property.is = :start property.should = :finish - property.parent = :parent + property.resource = :parent change = nil assert_nothing_raised do change = Puppet::PropertyChange.new(property, :start) @@ -125,7 +125,6 @@ class TestPropertyChange < Test::Unit::TestCase Puppet[:noop] = true change.property.noop = true - p change.property.noop assert(change.noop, "did not set noop") assert(change.skip?, "setting noop did not mark change for skipping") diff --git a/test/other/transactions.rb b/test/other/transactions.rb index 3a9ba3d79..1e0b6377d 100755 --- a/test/other/transactions.rb +++ b/test/other/transactions.rb @@ -248,8 +248,9 @@ class TestTransactions < Test::Unit::TestCase assert_nothing_raised() { check.each { |property| - assert(file[property]) - properties[property] = file[property] + value = file.value(property) + assert(value) + properties[property] = value } } @@ -277,7 +278,7 @@ class TestTransactions < Test::Unit::TestCase } properties.each { |property,value| assert_equal( - value,file.is(property), "File %s remained %s" % [property, file.is(property)] + value, file.value(property), "File %s remained %s" % [property, file.value(property)] ) } end @@ -310,7 +311,7 @@ class TestTransactions < Test::Unit::TestCase } check.each { |property| - properties[property] = file[property] + properties[property] = file.value(property) } assert_nothing_raised() { file[:mode] = "755" @@ -766,7 +767,7 @@ class TestTransactions < Test::Unit::TestCase type = mkreducer do def evaluate return Puppet::PropertyChange.new(Fakeprop.new( - :path => :path, :is => :is, :should => :should, :name => self.name, :parent => "a parent"), :is) + :path => :path, :is => :is, :should => :should, :name => self.name, :resource => "a parent"), :is) end end @@ -778,7 +779,7 @@ class TestTransactions < Test::Unit::TestCase assert_nothing_raised do trans.eval_resource(resource) end - + changes = trans.instance_variable_get("@changes") assert(changes.length > 0, "did not get any changes") |
