2013-11-27 11:19:24 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2013-10-18 20:57:48 +00:00
|
|
|
'''
|
|
|
|
tests for host state
|
|
|
|
'''
|
|
|
|
|
2014-11-21 19:05:13 +00:00
|
|
|
# Import Python libs
|
|
|
|
from __future__ import absolute_import
|
|
|
|
|
2013-10-18 20:57:48 +00:00
|
|
|
# Import Salt Testing libs
|
2017-04-03 16:04:09 +00:00
|
|
|
from tests.support.case import ModuleCase
|
2013-10-18 20:57:48 +00:00
|
|
|
|
|
|
|
|
2017-04-03 16:04:09 +00:00
|
|
|
class HandleOrderTest(ModuleCase):
|
2013-10-18 20:57:48 +00:00
|
|
|
'''
|
|
|
|
Validate that ordering works correctly
|
|
|
|
'''
|
|
|
|
def test_handle_iorder(self):
|
|
|
|
'''
|
|
|
|
Test the error with multiple states of the same type
|
|
|
|
'''
|
|
|
|
ret = self.run_function('state.show_low_sls', mods='issue-7649-handle-iorder')
|
|
|
|
|
2017-03-03 18:24:44 +00:00
|
|
|
sorted_chunks = [chunk['name'] for chunk in sorted(ret, key=lambda c: c.get('order'))]
|
2013-10-18 20:57:48 +00:00
|
|
|
|
2017-03-03 18:24:44 +00:00
|
|
|
expected = ['./configure', 'make', 'make install']
|
|
|
|
self.assertEqual(expected, sorted_chunks)
|