Folks, I'm having trouble getting a working rspec for ssh and sshfp even though the functionality works.
$ facter sshfp_dsa SSHFP 2 1 8ac7d2b36a1155302d9e9d02b5c8704166e5551c $ facter sshfp_rsa SSHFP 1 1 94c78f73cb506dd4c04dfe66a63790ccb622bb28 The code is here: https://github.com/grooverdan/facter/tree/ticket/11660-sshfp_and_ssh_rspec The problem is the sshkey facts are returning nil when running the rspec. When I copy and paste the spec/unit/ssh_spec.rb into irb, removing the 'describe' and 'it' block and replacing the 'should' lines with p fact,Facter.fact(fact).value it all seems to be working. Note: I did modify a bit of ssh.rb so I could hook File.expects(:read).with(filename) which I couldn't work out how to do with the bit of ssh.rb code File.open(filepath) { |f| value = f.read.chomp.split(/\s+/)[1] } Any tips on what I'm doing wrong would be much appreciated. related tickets: 11660 11659 -- 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.
