Saltstack Official Nginx Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

24 行
672B

  1. from subprocess import check_output
  2. from unittest import TestCase
  3. class ApplyStateTest(TestCase):
  4. def test_000_apply(self):
  5. state_apply_response = check_output(["salt-call", "--local", "state.apply"])
  6. print('')
  7. print('-' * 50)
  8. print('state_apply_response:')
  9. print(state_apply_response)
  10. print('-' * 50)
  11. print('')
  12. state_apply_response = state_apply_response.split('\n')
  13. summary = state_apply_response[-8:]
  14. failed = 0
  15. for line in summary:
  16. if line.startswith('Failed:'):
  17. failed = int(line.split(':').pop().strip())
  18. self.assertEqual(failed, 0)