mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
require recursion and still not done prereq recursion
This commit is contained in:
parent
a99cd0eafd
commit
7b01991c0a
3 changed files with 38 additions and 0 deletions
|
@ -0,0 +1,10 @@
|
|||
A:
|
||||
cmd.run:
|
||||
- name: echo A
|
||||
- prereq_in:
|
||||
- cmd: B
|
||||
B:
|
||||
cmd.run:
|
||||
- name: echo B
|
||||
- prereq_in:
|
||||
- cmd: A
|
|
@ -0,0 +1,12 @@
|
|||
A:
|
||||
cmd.run:
|
||||
- name: echo A
|
||||
- require:
|
||||
- cmd: B
|
||||
|
||||
B:
|
||||
cmd.run:
|
||||
- name: echo B
|
||||
- require:
|
||||
- cmd: A
|
||||
|
|
@ -417,13 +417,21 @@ fi
|
|||
'Cannot extend ID W in "base:requisites.require_error1".'
|
||||
+ ' It is not part of the high state.'
|
||||
])
|
||||
|
||||
# commented until a fix is made for issue #8772
|
||||
# TODO: this test actually fails
|
||||
#ret = self.run_function('state.sls', mods='requisites.require_error2')
|
||||
#self.assertEqual(ret, [
|
||||
# 'Cannot extend state foobar for ID A in "base:requisites.require_error2".'
|
||||
# + ' It is not part of the high state.'
|
||||
#])
|
||||
|
||||
ret = self.run_function('state.sls', mods='requisites.require_recursion_error1')
|
||||
self.assertEqual(
|
||||
ret,
|
||||
['A recursive requisite was found, SLS "requisites.require_recursion_error1" ID "B" ID "A"']
|
||||
)
|
||||
|
||||
def test_requisites_prereq_simple_ordering_and_errors(self):
|
||||
'''
|
||||
Call sls file containing several prereq_in and prereq.
|
||||
|
@ -512,6 +520,14 @@ fi
|
|||
# }
|
||||
#self.assertEqual(expected_result_complex, result)
|
||||
|
||||
# issue #8210 : prereq recursion undetected
|
||||
# TODO: this test fails
|
||||
#ret = self.run_function('state.sls', mods='requisites.prereq_recursion_error')
|
||||
#self.assertEqual(
|
||||
# ret,
|
||||
# ['A recursive requisite was found, SLS "requisites.prereq_recursion_error" ID "B" ID "A"']
|
||||
#)
|
||||
|
||||
def test_requisites_use(self):
|
||||
'''
|
||||
Call sls file containing several use_in and use.
|
||||
|
|
Loading…
Add table
Reference in a new issue