mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
add expected output for denied minions to test_*
This commit is contained in:
parent
ca5e63ed24
commit
b804056b65
@ -26,7 +26,7 @@ class KeyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||||||
'''
|
'''
|
||||||
test salt-key -l for accepted arguments
|
test salt-key -l for accepted arguments
|
||||||
'''
|
'''
|
||||||
for key in ('acc', 'pre', 'un', 'rej'):
|
for key in ('acc', 'pre', 'den', 'un', 'rej'):
|
||||||
# These should not trigger any error
|
# These should not trigger any error
|
||||||
data = self.run_key('-l {0}'.format(key), catch_stderr=True)
|
data = self.run_key('-l {0}'.format(key), catch_stderr=True)
|
||||||
self.assertNotIn('error:', '\n'.join(data[1]))
|
self.assertNotIn('error:', '\n'.join(data[1]))
|
||||||
@ -44,6 +44,7 @@ class KeyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||||||
'Accepted Keys:',
|
'Accepted Keys:',
|
||||||
'minion',
|
'minion',
|
||||||
'sub_minion',
|
'sub_minion',
|
||||||
|
'Denied Minions:',
|
||||||
'Unaccepted Keys:',
|
'Unaccepted Keys:',
|
||||||
'Rejected Keys:'
|
'Rejected Keys:'
|
||||||
]
|
]
|
||||||
@ -68,6 +69,7 @@ class KeyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||||||
expect = [
|
expect = [
|
||||||
'{',
|
'{',
|
||||||
' "minions_rejected": [], ',
|
' "minions_rejected": [], ',
|
||||||
|
' "minions_denied": [], ',
|
||||||
' "minions_pre": [], ',
|
' "minions_pre": [], ',
|
||||||
' "minions": [',
|
' "minions": [',
|
||||||
' "minion", ',
|
' "minion", ',
|
||||||
@ -100,6 +102,7 @@ class KeyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||||||
'minions:',
|
'minions:',
|
||||||
'- minion',
|
'- minion',
|
||||||
'- sub_minion',
|
'- sub_minion',
|
||||||
|
'minions_denied: []',
|
||||||
'minions_pre: []',
|
'minions_pre: []',
|
||||||
'minions_rejected: []',
|
'minions_rejected: []',
|
||||||
]
|
]
|
||||||
@ -122,7 +125,7 @@ class KeyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||||||
expect = None
|
expect = None
|
||||||
if self.master_opts['transport'] == 'zeromq':
|
if self.master_opts['transport'] == 'zeromq':
|
||||||
expect = [
|
expect = [
|
||||||
"{'minions_rejected': [], 'minions_pre': [], "
|
"{'minions_rejected': [], 'minions_denied': [], 'minions_pre': [], "
|
||||||
"'minions': ['minion', 'sub_minion']}"
|
"'minions': ['minion', 'sub_minion']}"
|
||||||
]
|
]
|
||||||
elif self.master_opts['transport'] == 'raet':
|
elif self.master_opts['transport'] == 'raet':
|
||||||
|
Loading…
Reference in New Issue
Block a user