Saltstack Official Nginx Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
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)