On May 1, 2009, at 1:33 PM, Brice Figureau wrote:

>
> Since the last stream of patches coming in master, some tests are  
> now failing.
> This bunch of patches fixes them (except the daemontools ones which  
> are taken
> care by Bryan Allen).
>
> Note: all the snippets tests were failing because scope.rb and  
> parser.rb tests
> were activating storeconfigs, which since the last refactoring  
> changes some
> internal terminii to their active_record counterpart.
> Since setting storeconfigs=false doesn't reset them to sane  
> defaults, I hacked the
> tests themselves to do it.
> Maybe the correct fix could be:
> * to change storeconfigs default's hook to reset those terminii to  
> correct values
> when set to false.

This would require modifying the Settings class - we can currently  
force a setting's hook to get triggered when the setting is set, but  
we can't force it to get triggered when the Settings instance is  
cleared.  Most likely, the Settings class should trigger any hooks  
marked 'call_on_define' when the Settings instance is cleared, as this  
is effectively defining the value.

With that, then changing the storeconfigs (and async_storeconfigs)  
hook would be sufficient.

>
> * make sure tests set storeconfigs=false afterward.

This would be a decent short-term solution and would work as long as  
the hook were updated.

>
> * make sure storeconfig is true and rails exists in the various  
> active_record
> terminii.

This is kind of a catch-22, though - the terminii are only used if  
storeconfigs is true, so having them make sure storeconfigs is true  
would basically have a closed loop that never got used.

>
> Code available in tickets/master/2216 in my github repository:
> http://github.com/masterzen/puppet/tree/tickets/master/2216
>
> Please review and comment,
> Thanks,
>
> Brice Figureau (4):
>  Fix some master failing tests
>  Confine stomp tests to Stomp enabled systems
>  Fix failing test: file.close! and file.path ordering fix
>  Fix snippets tests failing because of activated storeconfigs
>
> spec/integration/util/file_locking.rb |    3 ++-
> spec/unit/util/queue/stomp.rb         |    4 ++++
> test/language/parser.rb               |   18 ++++++++++++++++++
> test/language/scope.rb                |    9 ++++++++-
> test/rails/railsparameter.rb          |    2 +-
> test/ral/type/file.rb                 |    2 +-
> 6 files changed, 34 insertions(+), 4 deletions(-)
>
>
> >


-- 
Consistency requires you to be as ignorant today as you were a year
ago. -- Bernard Berenson
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to