fastd_spec.rb 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 file('/etc/fastd/test2/peers') do
  14. it { should be_directory}
  15. end
  16. describe file('/etc/fastd/test2/peers/test-peer') do
  17. it { should be_file }
  18. it { should be_readable }
  19. end
  20. describe package('fastd') do
  21. it { should be_installed }
  22. end
  23. if ENV['CI'] != 'true'
  24. # Travis doesn't provide the tap module, so our service won't start
  25. # Ansible seems to have problems to enable a service. Needs investigation
  26. describe service('fastd') do
  27. it { should be_running }
  28. # it { should be_enabled }
  29. end
  30. describe process('fastd') do
  31. it { should be_running }
  32. end
  33. describe port(10000) do
  34. it { should be_listening.with('udp6') }
  35. end
  36. describe port(10001) do
  37. it { should be_listening.with('udp6') }
  38. end
  39. end
  40. describe user('fastd') do
  41. it { should exist }
  42. it { should have_login_shell '/bin/false' }
  43. end