mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fixing status beacon tests.
This commit is contained in:
parent
c87d6cae23
commit
a2a8d78cb0
1 changed files with 11 additions and 10 deletions
|
@ -44,7 +44,11 @@ class StatusBeaconTestCase(TestCase, LoaderModuleMockMixin):
|
|||
}
|
||||
|
||||
def test_empty_config(self, *args, **kwargs):
|
||||
config = {}
|
||||
config = []
|
||||
|
||||
ret = status.validate(config)
|
||||
self.assertEqual(ret, (True, 'Valid beacon configuration'))
|
||||
|
||||
ret = status.beacon(config)
|
||||
|
||||
if sys.platform.startswith('win'):
|
||||
|
@ -56,21 +60,18 @@ class StatusBeaconTestCase(TestCase, LoaderModuleMockMixin):
|
|||
|
||||
def test_deprecated_dict_config(self):
|
||||
config = {'time': ['all']}
|
||||
ret = status.beacon(config)
|
||||
self.assertEqual(ret, (True, 'Valid beacon configuration'))
|
||||
|
||||
if sys.platform.startswith('win'):
|
||||
expected = []
|
||||
else:
|
||||
expected = ['time']
|
||||
|
||||
self.assertEqual(list(ret[0]['data']), expected)
|
||||
ret = status.validate(config)
|
||||
self.assertEqual(ret, (False, 'Configuration for status beacon must be a list.'))
|
||||
|
||||
def test_list_config(self):
|
||||
config = [{'time': ['all']}]
|
||||
ret = status.beacon(config)
|
||||
|
||||
ret = status.validate(config)
|
||||
self.assertEqual(ret, (True, 'Valid beacon configuration'))
|
||||
|
||||
ret = status.beacon(config)
|
||||
|
||||
if sys.platform.startswith('win'):
|
||||
expected = []
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue