test_spec.rb 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. require 'serverspec'
  2. describe cron do
  3. it { should have_entry '*/5 * * * * wget -q -O /etc/fastd/fastd-blacklist.json https://raw.githubusercontent.com/ffruhr/fastdbl/master/fastd-blacklist.json' }
  4. it { should have_entry '* * * * * /src/ff-tools/nodeinfo/nodeinfo.py | gzip | alfred -s 158'}
  5. end
  6. describe user('fritz') do
  7. it { should exist }
  8. it { should have_authorized_key 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCfO2TgNUMcY9K8N9SsAU/LfVtlloO50n6NRxDER8dCi+t1ydalTbNdEj52cIjqvIEn458cCxdCwsNYeWqSVggX7vT7a+DgYZlJcRteHcb0lPYZplPuiZe3AUE9rHH48W4xEopv7J8Wz6hLng6Gb0TQx9HeVybQ5dn6CGyt8sOCKQ== Fritz Brinkhoffs' }
  9. it { should belong_to_group 'sudo' }
  10. end
  11. describe port(67) do
  12. it { should be_listening.with('udp') }
  13. end
  14. describe process('unbound') do
  15. it { should be_running }
  16. end
  17. describe port(53) do
  18. it { should be_listening.with('udp') }
  19. it { should be_listening.with('udp6') }
  20. end
  21. describe process('ntpd') do
  22. it { should be_running }
  23. end
  24. describe port(123) do
  25. it { should be_listening.with('udp') }
  26. it { should be_listening.with('udp') }
  27. end