Saltstack Official Logrotate Formula
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

54 行
2.0KB

  1. # encoding: utf-8
  2. title 'Test logrotate jobs configuration'
  3. describe file('/etc/logrotate.d/error') do
  4. it { should be_file }
  5. it { should be_owned_by 'root' }
  6. it { should be_grouped_into 'root' }
  7. its('mode') { should cmp '0644' }
  8. # FIXME
  9. #its('content') { should include '/tmp/var/log/mysql/error' }
  10. its('content') { should include 'weekly' }
  11. its('content') { should include 'missingok' }
  12. its('content') { should include 'rotate 52' }
  13. its('content') { should include 'compress' }
  14. its('content') { should include 'delaycompress' }
  15. its('content') { should include 'notifempty' }
  16. its('content') { should include 'create 640 root adm' }
  17. its('content') { should include 'sharedscripts' }
  18. end
  19. describe file('/etc/logrotate.d/mysql') do
  20. it { should be_file }
  21. it { should be_owned_by 'root' }
  22. it { should be_grouped_into 'root' }
  23. its('mode') { should cmp '0644' }
  24. its('content') { should include '/tmp/var/log/mysql/*.log' }
  25. its('content') { should include 'weekly' }
  26. its('content') { should include 'missingok' }
  27. its('content') { should include 'rotate 52' }
  28. its('content') { should include 'compress' }
  29. its('content') { should include 'delaycompress' }
  30. its('content') { should include 'notifempty' }
  31. its('content') { should include 'create 640 root adm' }
  32. its('content') { should include 'sharedscripts' }
  33. end
  34. describe file('/etc/logrotate.d/syslog') do
  35. it { should be_file }
  36. it { should be_owned_by 'root' }
  37. it { should be_grouped_into 'root' }
  38. its('mode') { should cmp '0644' }
  39. its('content') { should include '/var/log/cron' }
  40. its('content') { should include '/var/log/maillog' }
  41. its('content') { should include '/var/log/messages' }
  42. its('content') { should include '/var/log/secure' }
  43. its('content') { should include '/var/log/spooler' }
  44. its('content') { should include '/var/log/slapd.log' }
  45. its('content') { should include 'sharedscripts' }
  46. its('content') { should include 'postrotate' }
  47. its('content') { should include 'sharedscripts' }
  48. end