mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Adding some tests for the grains, pillar and mine functions in the cache runner. These will also ensure that the relevant functions in salt.utils.master.MasterPillarUtil are functioning properly.
This commit is contained in:
parent
b0d5acbe0d
commit
8108a4d31a
1 changed files with 39 additions and 0 deletions
|
@ -8,6 +8,9 @@ from __future__ import absolute_import, print_function, unicode_literals
|
|||
# Import Salt Testing libs
|
||||
from tests.support.case import ShellCase
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ManageTest(ShellCase):
|
||||
'''
|
||||
|
@ -34,3 +37,39 @@ class ManageTest(ShellCase):
|
|||
ret = self.run_run_plus('cache.flush', bank='cachetest/runner', key='test_cache')
|
||||
ret = self.run_run_plus('cache.list', bank='cachetest/runner')
|
||||
self.assertNotIn('test_cache', ret['return'])
|
||||
|
||||
def test_grains(self):
|
||||
'''
|
||||
Test cache.grains
|
||||
'''
|
||||
# Store the data
|
||||
ret = self.run_run_plus(
|
||||
'cache.grains',
|
||||
tgt='minion'
|
||||
)
|
||||
|
||||
self.assertIn('minion', ret['return'])
|
||||
|
||||
def test_pillar(self):
|
||||
'''
|
||||
Test cache.pillar
|
||||
'''
|
||||
# Store the data
|
||||
ret = self.run_run_plus(
|
||||
'cache.pillar',
|
||||
tgt='minion'
|
||||
)
|
||||
|
||||
self.assertIn('minion', ret['return'])
|
||||
|
||||
def test_mine(self):
|
||||
'''
|
||||
Test cache.mine
|
||||
'''
|
||||
# Store the data
|
||||
ret = self.run_run_plus(
|
||||
'cache.mine',
|
||||
tgt='minion'
|
||||
)
|
||||
|
||||
self.assertIn('minion', ret['return'])
|
||||
|
|
Loading…
Add table
Reference in a new issue