mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
commit
e0d7b330fa
1 changed files with 28 additions and 0 deletions
28
tests/integration/modules/test_status.py
Normal file
28
tests/integration/modules/test_status.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Import Python libs
|
||||
from __future__ import absolute_import
|
||||
import random
|
||||
|
||||
# Import Salt Testing libs
|
||||
from tests.support.case import ModuleCase
|
||||
from tests.support.unit import skipIf
|
||||
|
||||
# Import Salt libs
|
||||
import salt.utils
|
||||
|
||||
|
||||
class StatusModuleTest(ModuleCase):
|
||||
'''
|
||||
Test the status module
|
||||
'''
|
||||
@skipIf(salt.utils.is_windows(), 'minion is windows')
|
||||
def test_status_pid(self):
|
||||
'''
|
||||
status.pid
|
||||
'''
|
||||
status_pid = self.run_function('status.pid', ['salt'])
|
||||
grab_pids = status_pid.split()[:10]
|
||||
random_pid = random.choice(grab_pids)
|
||||
grep_salt = self.run_function('cmd.run', ['ps aux | grep salt'])
|
||||
self.assertIn(random_pid, grep_salt)
|
Loading…
Add table
Reference in a new issue