mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #44617 from Ch3LL/thindir_ssh
Add ssh thin_dir integration test
This commit is contained in:
commit
3ace504c8c
1 changed files with 20 additions and 0 deletions
|
@ -4,6 +4,8 @@ salt-ssh testing
|
|||
'''
|
||||
# Import Python libs
|
||||
from __future__ import absolute_import
|
||||
import os
|
||||
import shutil
|
||||
|
||||
# Import salt testing libs
|
||||
from tests.support.case import SSHCase
|
||||
|
@ -19,3 +21,21 @@ class SSHTest(SSHCase):
|
|||
'''
|
||||
ret = self.run_function('test.ping')
|
||||
self.assertTrue(ret, 'Ping did not return true')
|
||||
|
||||
def test_thin_dir(self):
|
||||
'''
|
||||
test to make sure thin_dir is created
|
||||
and salt-call file is included
|
||||
'''
|
||||
thin_dir = self.run_function('config.get', ['thin_dir'], wipe=False)
|
||||
os.path.isdir(thin_dir)
|
||||
os.path.exists(os.path.join(thin_dir, 'salt-call'))
|
||||
os.path.exists(os.path.join(thin_dir, 'running_data'))
|
||||
|
||||
def tearDown(self):
|
||||
'''
|
||||
make sure to clean up any old ssh directories
|
||||
'''
|
||||
salt_dir = self.run_function('config.get', ['thin_dir'], wipe=False)
|
||||
if os.path.exists(salt_dir):
|
||||
shutil.rmtree(salt_dir)
|
||||
|
|
Loading…
Add table
Reference in a new issue