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
|
||||
'''
|
||||
for key in ('acc', 'pre', 'un', 'rej'):
|
||||
for key in ('acc', 'pre', 'den', 'un', 'rej'):
|
||||
# These should not trigger any error
|
||||
data = self.run_key('-l {0}'.format(key), catch_stderr=True)
|
||||
self.assertNotIn('error:', '\n'.join(data[1]))
|
||||
@ -44,6 +44,7 @@ class KeyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
||||
'Accepted Keys:',
|
||||
'minion',
|
||||
'sub_minion',
|
||||
'Denied Minions:',
|
||||
'Unaccepted Keys:',
|
||||
'Rejected Keys:'
|
||||
]
|
||||
@ -68,6 +69,7 @@ class KeyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
||||
expect = [
|
||||
'{',
|
||||
' "minions_rejected": [], ',
|
||||
' "minions_denied": [], ',
|
||||
' "minions_pre": [], ',
|
||||
' "minions": [',
|
||||
' "minion", ',
|
||||
@ -100,6 +102,7 @@ class KeyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
||||
'minions:',
|
||||
'- minion',
|
||||
'- sub_minion',
|
||||
'minions_denied: []',
|
||||
'minions_pre: []',
|
||||
'minions_rejected: []',
|
||||
]
|
||||
@ -122,7 +125,7 @@ class KeyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
||||
expect = None
|
||||
if self.master_opts['transport'] == 'zeromq':
|
||||
expect = [
|
||||
"{'minions_rejected': [], 'minions_pre': [], "
|
||||
"{'minions_rejected': [], 'minions_denied': [], 'minions_pre': [], "
|
||||
"'minions': ['minion', 'sub_minion']}"
|
||||
]
|
||||
elif self.master_opts['transport'] == 'raet':
|
||||
|
Loading…
Reference in New Issue
Block a user