test_spec.rb 774 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. require 'serverspec'
  2. # Required by serverspec
  3. set :backend, :exec
  4. describe package('fastd') do
  5. it { should be_installed }
  6. end
  7. describe package('rng-tools') do
  8. it { should be_installed }
  9. end
  10. describe file('/etc/default/rng-tools') do
  11. it { should exist }
  12. its(:content) { should match /HRNGDEVICE=\/dev\/urandom/ }
  13. end
  14. describe user('fastd') do
  15. it { should exist }
  16. it { should have_login_shell '/bin/false' }
  17. end
  18. describe file('/etc/fastd/test') do
  19. it { should exist }
  20. it { should be_directory }
  21. end
  22. describe file('/etc/fastd/test/fastd.conf') do
  23. it { should exist }
  24. it { should be_file }
  25. end
  26. describe file('/etc/fastd/test/secret.conf') do
  27. it { should exist }
  28. it { should be_file }
  29. its(:content) { should contain 'secret "some secret";' }
  30. end