1
0

test_handle_iorder.py 726 B

1234567891011121314151617181920212223242526
  1. # -*- coding: utf-8 -*-
  2. '''
  3. tests for host state
  4. '''
  5. # Import Python libs
  6. from __future__ import absolute_import, print_function, unicode_literals
  7. # Import Salt Testing libs
  8. from tests.support.case import ModuleCase
  9. class HandleOrderTest(ModuleCase):
  10. '''
  11. Validate that ordering works correctly
  12. '''
  13. def test_handle_iorder(self):
  14. '''
  15. Test the error with multiple states of the same type
  16. '''
  17. ret = self.run_function('state.show_low_sls', mods='issue-7649-handle-iorder')
  18. sorted_chunks = [chunk['name'] for chunk in sorted(ret, key=lambda c: c.get('order'))]
  19. expected = ['./configure', 'make', 'make install']
  20. self.assertEqual(expected, sorted_chunks)