summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2010-12-10 14:56:19 -0800
committerJesse Wolfe <jes5199@gmail.com>2010-12-10 14:56:19 -0800
commitf38c36c63d6404536e075ce03c3d93e0b2f0a731 (patch)
tree2232c9688eeed1bc49fd3c151a883b39db0ba90d /test
parent56c91fb2accc7c6e53ab8d3c0c60812674c1676a (diff)
downloadpuppet-f38c36c63d6404536e075ce03c3d93e0b2f0a731.tar.gz
puppet-f38c36c63d6404536e075ce03c3d93e0b2f0a731.tar.xz
puppet-f38c36c63d6404536e075ce03c3d93e0b2f0a731.zip
(#5408) Attributes can be both audited and managed
This patch makes it possible to both audit and manage an attribute. It introduces a new field on Event objects "historical_value", which is the value from state.yaml. The value from the RAL is written to state.yaml, and then the RAL is updated with the desired value. Paired-With: Nick Lewis <nick@puppetlabs.com> Paired-With: Matt Robinson <matt@puppetlabs.com>
Diffstat (limited to 'test')
-rw-r--r--test/lib/puppettest/support/utils.rb2
-rwxr-xr-xtest/ral/type/filesources.rb5
2 files changed, 2 insertions, 5 deletions
diff --git a/test/lib/puppettest/support/utils.rb b/test/lib/puppettest/support/utils.rb
index e022f123c..bca5d9634 100644
--- a/test/lib/puppettest/support/utils.rb
+++ b/test/lib/puppettest/support/utils.rb
@@ -92,7 +92,7 @@ module PuppetTest::Support::Utils
method = type
trans.send(method)
- newevents = trans.events.reject { |e| e.status == 'failure' }.collect { |e|
+ newevents = trans.events.reject { |e| ['failure', 'audit'].include? e.status }.collect { |e|
e.name
}
diff --git a/test/ral/type/filesources.rb b/test/ral/type/filesources.rb
index dd73cea27..242a82e83 100755
--- a/test/ral/type/filesources.rb
+++ b/test/ral/type/filesources.rb
@@ -327,12 +327,9 @@ class TestFileSources < Test::Unit::TestCase
file = nil
assert_nothing_raised {
-
- file = Puppet::Type.type(:file).new(
-
+ file = Puppet::Type.type(:file).new(
:name => dest,
:ensure => "file",
-
:source => source
)
}