fastd_spec.rb 1007 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. require 'serverspec'
  2. # Required by serverspec
  3. set :backend, :exec
  4. describe package('fastd') do
  5. it { should be_installed }
  6. end
  7. # Ansible seems to have problems to enable a service. Needs investigation
  8. describe service('fastd') do
  9. it { should be_running }
  10. # it { should be_enabled }
  11. end
  12. # Detection of running service fails in Debian 7.8. Needs investigation.
  13. #describe service('rng-tools') do
  14. # it { should be_running }
  15. # it { should be_enabled }
  16. #end
  17. describe file('/etc/fastd/fastd-blacklist.sh') do
  18. it { should exist }
  19. it { should be_executable }
  20. end
  21. describe port(10000) do
  22. it { should be_listening.with('udp6') }
  23. end
  24. describe port(10001) do
  25. it { should be_listening.with('udp6') }
  26. end
  27. describe package('rng-tools') do
  28. it { should be_installed }
  29. end
  30. describe file('/etc/default/rng-tools') do
  31. it { should exist }
  32. its(:content) { should match /HRNGDEVICE=\/dev\/urandom/ }
  33. end
  34. describe user('fastd') do
  35. it { should exist }
  36. it { should have_login_shell '/bin/false' }
  37. end