fastd_spec.rb 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. describe file('/etc/fastd/fastd-blacklist.sh') do
  13. it { should exist }
  14. it { should be_executable }
  15. end
  16. describe port(10000) do
  17. it { should be_listening.with('udp6') }
  18. end
  19. describe port(10001) do
  20. it { should be_listening.with('udp6') }
  21. end
  22. describe package('rng-tools') do
  23. it { should be_installed }
  24. end
  25. describe file('/etc/default/rng-tools') do
  26. it { should exist }
  27. its(:content) { should match /HRNGDEVICE=\/dev\/urandom/ }
  28. end
  29. # Detection of running service fails in Debian 7.8. Needs investigation.
  30. #describe service('rng-tools') do
  31. # it { should be_running }
  32. # it { should be_enabled }
  33. #end
  34. describe process("rngd") do
  35. it { should be_running }
  36. end
  37. describe user('fastd') do
  38. it { should exist }
  39. it { should have_login_shell '/bin/false' }
  40. end