mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
specify checking man page path
Without setting the man path, this would be checking that the installed salt package used to bootstap has an spm man page, which is possible that it doesn't, and also not what we want to check
This commit is contained in:
parent
2ddbcb45c1
commit
1f71f301ba
1 changed files with 23 additions and 1 deletions
|
@ -4,19 +4,41 @@ Tests man spm
|
|||
'''
|
||||
# Import python libs
|
||||
from __future__ import absolute_import
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
# Import Salt Testing libs
|
||||
from tests.support.case import ModuleCase
|
||||
from tests.support.helpers import destructiveTest
|
||||
from tests.support.paths import CODE_DIR
|
||||
|
||||
|
||||
@destructiveTest
|
||||
class SPMManTest(ModuleCase):
|
||||
'''
|
||||
Validate man spm
|
||||
'''
|
||||
|
||||
def setUp(self):
|
||||
self.tmpdir = tempfile.mktemp()
|
||||
os.mkdir(self.tmpdir)
|
||||
self.run_function('cmd.run', ['{0} {1} install --root={2}'.format(
|
||||
sys.executable,
|
||||
os.path.join(CODE_DIR, 'setup.py'),
|
||||
self.tmpdir
|
||||
)])
|
||||
|
||||
def tearDown(self):
|
||||
shutil.rmtree(self.tmpdir)
|
||||
|
||||
def test_man_spm(self):
|
||||
'''
|
||||
test man spm
|
||||
'''
|
||||
cmd = self.run_function('cmd.run', ['man spm'])
|
||||
manpath = self.run_function('cmd.run', ['find {0} -name spm.1'.format(self.tmpdir)])
|
||||
self.assertIn('/man1/', manpath)
|
||||
cmd = self.run_function('cmd.run', ['man {0}'.format(manpath)])
|
||||
self.assertIn('Salt Package Manager', cmd)
|
||||
self.assertIn('command for managing Salt packages', cmd)
|
||||
|
|
Loading…
Add table
Reference in a new issue