mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Test for deprecation message first and then use the new --out
format.
This commit is contained in:
parent
5bf4549777
commit
526ed994b8
@ -39,14 +39,15 @@ class KeyTest(integration.ShellCase,
|
||||
'''
|
||||
data = self.run_key('-L --json-out')
|
||||
if version.__version_info__ < (0, 10, 8):
|
||||
expect = [
|
||||
self.assertEqual(
|
||||
"WARNING: The option --json-out is deprecated. Please "
|
||||
"consider using '--out json' instead."
|
||||
]
|
||||
else:
|
||||
expect = []
|
||||
"consider using '--out json' instead.",
|
||||
data[0]
|
||||
)
|
||||
|
||||
expect += [
|
||||
data = self.run_key('-L --out json')
|
||||
|
||||
expect = [
|
||||
'{',
|
||||
' "minions_rejected": [], ',
|
||||
' "minions_pre": [], ',
|
||||
@ -64,14 +65,15 @@ class KeyTest(integration.ShellCase,
|
||||
'''
|
||||
data = self.run_key('-L --yaml-out')
|
||||
if version.__version_info__ < (0, 10, 8):
|
||||
expect = [
|
||||
self.assertEqual(
|
||||
"WARNING: The option --yaml-out is deprecated. Please "
|
||||
"consider using '--out yaml' instead."
|
||||
]
|
||||
else:
|
||||
expect = []
|
||||
"consider using '--out yaml' instead.",
|
||||
data[0]
|
||||
)
|
||||
|
||||
expect += [
|
||||
data = self.run_key('-L --out yaml')
|
||||
|
||||
expect = [
|
||||
'minions:',
|
||||
'- minion',
|
||||
'- sub_minion',
|
||||
@ -86,14 +88,15 @@ class KeyTest(integration.ShellCase,
|
||||
'''
|
||||
data = self.run_key('-L --raw-out')
|
||||
if version.__version_info__ < (0, 10, 8):
|
||||
expect = [
|
||||
self.assertEqual(
|
||||
"WARNING: The option --raw-out is deprecated. Please "
|
||||
"consider using '--out raw' instead."
|
||||
]
|
||||
else:
|
||||
expect = []
|
||||
"consider using '--out raw' instead.",
|
||||
data[0]
|
||||
)
|
||||
|
||||
expect += [
|
||||
data = self.run_key('-L --out raw')
|
||||
|
||||
expect = [
|
||||
"{'minions_rejected': [], 'minions_pre': [], "
|
||||
"'minions': ['minion', 'sub_minion']}"
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user