
Untitled
By: a guest on
Jul 20th, 2012 | syntax:
None | size: 1.41 KB | hits: 16 | expires: Never
1) SSH fact SSHRSAKey returns hostkeys if sshd -T is invoked
Failure/Error: File.stubs(:read).with('/etc/ssh/ssh_host_rsa_key').returns(my_fixture_read('ssh_host_rsa_key'))
Mocha::ExpectationError: unexpected invocation: File.read('/home/apenney/ruby/facter/spec/fixtures/unit/ssh/ssh_host_rsa_key
')
satisfied expectations: - allowed any number of times, not yet invoked: #<AnyInstance:Facter::Util::Loader>.load_all(any_parameters) - allowed any number of times, not yet invoked: FileTest.exists?('/etc/ssh/ssh_host_rsa_key') - allowed any number of times, not yet invoked: FileTest.file?('/etc/opt/ssh/ssh_host_rsa_key.pub') - allowed any number of times, not yet invoked: FileTest.file?('/usr/local/etc/ssh_host_rsa_key.pub') - allowed any number of times, not yet invoked: FileTest.file?('/etc/ssh_host_rsa_key.pub') - allowed any number of times, not yet invoked: FileTest.file?('/usr/local/etc/ssh/ssh_host_rsa_key.pub') - allowed any number of times, not yet invoked: FileTest.file?('/etc/ssh/ssh_host_rsa_key.pub') - allowed any number of times, not yet invoked: Facter::Util::Resolution.exec('sshd -T 2>/dev/null | grep hostkey') - allowed any number of times, not yet invoked: File.read('/etc/ssh/ssh_host_rsa_key') # ./spec/puppetlabs_spec/fixtures.rb:36:in `my_fixture_read' # ./spec/unit/ssh_spec.rb:55:in `block (4 levels) in <top (required)>'