On Oct 16, 2008, at 12:54 PM, Brice Figureau wrote: > > Hi, > > I just discovered that the fix for #1202 (and particularly the fact > that > I added a tags method to TemplateWrapper) broke the following test: > should return the processed template contents with a call to result > and > should set all of the scope's variables as instance variables > > I didn't perform a thorough analysis, but it is beacause > TemplateWrapper > is used as a log source. Log sources are asked for their tags by > calling > the tags method. In the case of TemplateWrapper it is plain wrong to > do so.
Why is that? If you're logging from there, wouldn't you want to include the tags in the log message? The TemplateWrapper class needs to be slightly refactored to use Puppet::Util::Logging, instead of the Puppet::Util.logmethods, but otherwise, it seems right. (You'd get the same behaviour, just cleaner code.) > > I'm seeing two options: > * fix the test themselves (I don't think that's the right > solution :-)) > or > * rename TemplateWrapper.tags to TemplateWrapper.get_tags or sth > else. > > Any other idea? > Let me know and I'll contribute a fix patch. I'd fix the tests, because I think the behaviour's right. What makes you disagree? -- There is only one success - to be able to spend your life in your own way. -- Christopher Morley --------------------------------------------------------------------- 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 -~----------~----~----~----~------~----~------~--~---
