Saltstack Official UFW Formula
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

7 роки тому
12345678910111213141516171819202122232425262728293031
  1. # encoding: utf-8
  2. title 'Test Ufw installation'
  3. describe package('ufw') do
  4. it { should be_installed }
  5. end
  6. describe directory('/etc/ufw') do
  7. it { should exist }
  8. end
  9. describe file('/etc/ufw/ufw.conf') do
  10. its('content') { should include 'ENABLED=' }
  11. its('content') { should include 'LOGLEVEL=' }
  12. end
  13. describe command('ufw status verbose | grep Status') do
  14. its('exit_status') { should eq 0 }
  15. its('stdout') { should match /active/ }
  16. end
  17. describe command('ufw status verbose | grep Logging') do
  18. its('exit_status') { should eq 0 }
  19. its('stdout') { should match /low/ }
  20. end
  21. describe command('ufw status | grep 22/tcp') do
  22. its('exit_status') { should eq 0 }
  23. its('stdout') { should match /ALLOW/ }
  24. end