mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
add tcp transport to shell.key tests
This commit is contained in:
parent
5dadaec775
commit
a95353b4e3
1 changed files with 8 additions and 8 deletions
|
@ -41,7 +41,7 @@ class KeyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||
'''
|
||||
data = self.run_key('-L')
|
||||
expect = None
|
||||
if self.master_opts['transport'] == 'zeromq':
|
||||
if self.master_opts['transport'] in ('zeromq', 'tcp'):
|
||||
expect = [
|
||||
'Accepted Keys:',
|
||||
'minion',
|
||||
|
@ -67,7 +67,7 @@ class KeyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||
'''
|
||||
data = self.run_key('-L --out json')
|
||||
expect = None
|
||||
if self.master_opts['transport'] == 'zeromq':
|
||||
if self.master_opts['transport'] in ('zeromq', 'tcp'):
|
||||
expect = [
|
||||
'{',
|
||||
' "minions_rejected": [], ',
|
||||
|
@ -99,7 +99,7 @@ class KeyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||
'''
|
||||
data = self.run_key('-L --out yaml')
|
||||
expect = []
|
||||
if self.master_opts['transport'] == 'zeromq':
|
||||
if self.master_opts['transport'] in ('zeromq', 'tcp'):
|
||||
expect = [
|
||||
'minions:',
|
||||
'- minion',
|
||||
|
@ -125,7 +125,7 @@ class KeyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||
'''
|
||||
data = self.run_key('-L --out raw')
|
||||
expect = None
|
||||
if self.master_opts['transport'] == 'zeromq':
|
||||
if self.master_opts['transport'] in ('zeromq', 'tcp'):
|
||||
expect = [
|
||||
"{'minions_rejected': [], 'minions_denied': [], 'minions_pre': [], "
|
||||
"'minions': ['minion', 'sub_minion']}"
|
||||
|
@ -144,7 +144,7 @@ class KeyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||
test salt-key -l
|
||||
'''
|
||||
data = self.run_key('-l acc')
|
||||
if self.master_opts['transport'] == 'zeromq':
|
||||
if self.master_opts['transport'] in ('zeromq', 'tcp'):
|
||||
self.assertEqual(
|
||||
data,
|
||||
['Accepted Keys:', 'minion', 'sub_minion']
|
||||
|
@ -166,7 +166,7 @@ class KeyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||
'''
|
||||
data = self.run_key('-l un')
|
||||
expect = None
|
||||
if self.master_opts['transport'] == 'zeromq':
|
||||
if self.master_opts['transport'] in ('zeromq', 'tcp'):
|
||||
expect = ['Unaccepted Keys:']
|
||||
elif self.master_opts['transport'] == 'raet':
|
||||
expect = ['minions_pre:']
|
||||
|
@ -181,7 +181,7 @@ class KeyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||
self.run_key(arg_str)
|
||||
try:
|
||||
key_names = None
|
||||
if self.master_opts['transport'] == 'zeromq':
|
||||
if self.master_opts['transport'] in ('zeromq', 'tcp'):
|
||||
key_names = ('minibar.pub', 'minibar.pem')
|
||||
elif self.master_opts['transport'] == 'raet':
|
||||
key_names = ('minibar.key',)
|
||||
|
@ -197,7 +197,7 @@ class KeyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||
self.run_script('salt-key', arg_str)
|
||||
try:
|
||||
key_names = None
|
||||
if self.master_opts['transport'] == 'zeromq':
|
||||
if self.master_opts['transport'] in ('zeromq', 'tcp'):
|
||||
key_names = ('minibar.pub', 'minibar.pem')
|
||||
elif self.master_opts['transport'] == 'raet':
|
||||
key_names = ('minibar.key',)
|
||||
|
|
Loading…
Add table
Reference in a new issue