test_spec.rb 971 B

123456789101112131415161718192021222324252627282930313233
  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. end
  5. describe user('fritz') do
  6. it { should exist }
  7. it { should have_authorized_key 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCfO2TgNUMcY9K8N9SsAU/LfVtlloO50n6NRxDER8dCi+t1ydalTbNdEj52cIjqvIEn458cCxdCwsNYeWqSVggX7vT7a+DgYZlJcRteHcb0lPYZplPuiZe3AUE9rHH48W4xEopv7J8Wz6hLng6Gb0TQx9HeVybQ5dn6CGyt8sOCKQ== Fritz Brinkhoffs' }
  8. it { should belong_to_group 'sudo' }
  9. end
  10. describe port(67) do
  11. it { should be_listening.with('udp') }
  12. end
  13. describe process('unbound') do
  14. it { should be_running }
  15. end
  16. describe port(53) do
  17. it { should be_listening.with('udp') }
  18. it { should be_listening.with('udp6') }
  19. end
  20. describe process('ntpd') do
  21. it { should be_running }
  22. end
  23. describe port(123) do
  24. it { should be_listening.with('udp') }
  25. it { should be_listening.with('udp') }
  26. end