On Friday, July 22, 2011 at 10:38 AM, Daniel Pittman wrote: > On Thu, Jul 21, 2011 at 21:38, Nick Lewis <[email protected] > (mailto:[email protected])> wrote: > > Allowing the singleton_instance value to be expirable is unnecessary, > > because > > there will never be a need for a different CA instance in the lifetime of a > > master. Additionally, the master never expired its cache anyway. This was > > only > > using the cacher so it could be expired for tests, so it can safely be > > removed. > > So, in testing some CA related code, I ended up having to stub the > method to get a new instance of the CA each time. I don't think this > is going to make any difference to that, but should it? Is there some > other way I should be doing that? > I believe before this patch you could have used Puppet::Util::Cacher.expire between tests to get a new instance. Now, you would have to Puppet::SSL::Host.instance_variable_set(:@singleton_instance, nil) between tests. Or stub it. Ideally, these things wouldn't be so global, or perhaps would have a 'clear' method or its like.
> Daniel > -- > ⎋ Puppet Labs Developer – http://puppetlabs.com > ♲ Made with 100 percent post-consumer electrons > > -- > 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] > (mailto:[email protected]). > To unsubscribe from this group, send email to > [email protected] > (mailto:[email protected]). > For more options, visit this group at > http://groups.google.com/group/puppet-dev?hl=en. -- 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.
