fastd_spec.rb 1.0 KB

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