Merge pull request #49071 from rallytime/bp-49034

Back-port #49034 to 2018.3
This commit is contained in:
Nicole Thomas 2018-08-13 16:15:30 -04:00 committed by GitHub
commit bc033da677
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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'])