mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
require vs require_in in not-list yamlsyntax: differences, still on #8235
This commit is contained in:
parent
58bfbff843
commit
38bd6709f0
@ -0,0 +1,15 @@
|
||||
A:
|
||||
cmd.run:
|
||||
- name: echo A
|
||||
B:
|
||||
cmd.run:
|
||||
- name: echo B
|
||||
# here used without "-"
|
||||
- require:
|
||||
cmd: A
|
||||
C:
|
||||
cmd.run:
|
||||
- name: echo C
|
||||
# here used without "-"
|
||||
- require_in:
|
||||
cmd: A
|
@ -537,12 +537,24 @@ fi
|
||||
'result':descr['result']
|
||||
}
|
||||
self.assertEqual(expected_result, result)
|
||||
|
||||
ret = self.run_function('state.sls', mods='requisites.require_error1')
|
||||
self.assertEqual(ret, [
|
||||
'Cannot extend ID W in "base:requisites.require_error1".'
|
||||
+ ' It is not part of the high state.'
|
||||
])
|
||||
|
||||
# issue #8235
|
||||
# FIXME: Why is require enforcing list syntax while require_in does not?
|
||||
# And why preventing it?
|
||||
# Currently this state fails, should return C/B/A
|
||||
result={}
|
||||
ret = self.run_function('state.sls', mods='requisites.require_simple_nolist')
|
||||
self.assertEqual(ret, [
|
||||
'The require or watch statement in state "B" in sls '
|
||||
+ '"requisites.require_simple_nolist" needs to be formed as a list'
|
||||
])
|
||||
|
||||
# commented until a fix is made for issue #8772
|
||||
# TODO: this test actually fails
|
||||
#ret = self.run_function('state.sls', mods='requisites.require_error2')
|
||||
@ -584,7 +596,7 @@ fi
|
||||
'result':descr['result']
|
||||
}
|
||||
self.assertEqual(expected_result, result)
|
||||
|
||||
|
||||
# TODO: not done
|
||||
#ret = self.run_function('state.sls', mods='requisites.fullsls_require_in')
|
||||
#self.assertEqual(['sls command can only be used with require requisite'], ret)
|
||||
|
Loading…
Reference in New Issue
Block a user