Ashley, I took a brief look and didn't a glaring cause of the spec failures. I'll try to take a more in-depth look a little later (when I actually have my laptop with me). In the interim, I've also copied puppet-dev in case someone can get to it before me. I made a small commit comment on your branch, but I don't think that would be the cause of your spec failure.
Best Regards, Jeff Weiss Sent from my iPhone On Jul 15, 2012, at 11:44 AM, Ashley Penney <[email protected]> wrote: > Hey, > > Thanks for all the help the other day. I ran into another rspec > question and I thought if you get a spare moment you could prod me in > the right direction. I've been working on > https://github.com/apenney/facter/tree/ssh, effectively adding 'sshd > -t' as the primary way to find the location of the various files > required. I have code in lib/facter/ that works and parses and finds > the appropriate stuff, it's the tests I'm struggling with. > > I have tried a few different things you can see in > https://github.com/apenney/facter/tree/ssh, specifically in > https://github.com/apenney/facter/blob/ssh/spec/unit/ssh_spec.rb, to > try and fake out sshd -T failing so it'll try the fallback weighted > stuff. I clearly am in over my head at this point and I see comments > from you throughout so you're probably the best person to know where > to point me. When I run the tests: > > /home/apenney/ruby/facter/lib/facter/kernel.rb:19:in `block (2 levels) > in <top (required)>': unexpected invocation: > Facter::Util::Resolution.exec('uname -s') > (Mocha::ExpectationError)satisfied expectations:- allowed any number > of times, not yet invoked: Facter::Util::Resolution.exec('sshd -T > 2>/dev/null | grep hostkey') from > /home/apenney/ruby/facter/lib/facter/util/resolution.rb:277:in `call' > from /home/apenney/ruby/facter/lib/facter/util/resolution.rb:277:in > `block in value' from > /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/timeout.rb:54:in > `timeout' from > /home/apenney/ruby/facter/lib/facter/util/resolution.rb:275:in `value' > from /home/apenney/ruby/facter/lib/facter/util/fact.rb:105:in > `block in find_first_real_ > value' > > I've normally seen uname -s errors when I've totally screwed up the > lib/facter side of things but I've installed and used those facts and > they seem to be working ok and parsing the appropriate things. I > figured I'd turn it over to a professional at this point. :) -- 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.
