mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #43251 from twangboy/win_skip_test_groupadd
Skips `unit.modules.test_groupadd` on Windows
This commit is contained in:
commit
25666f88f7
1 changed files with 6 additions and 1 deletions
|
@ -5,7 +5,10 @@
|
|||
|
||||
# Import Python libs
|
||||
from __future__ import absolute_import
|
||||
import grp
|
||||
try:
|
||||
import grp
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
# Import Salt Testing Libs
|
||||
from tests.support.mixins import LoaderModuleMockMixin
|
||||
|
@ -13,10 +16,12 @@ from tests.support.unit import TestCase, skipIf
|
|||
from tests.support.mock import MagicMock, patch, NO_MOCK, NO_MOCK_REASON
|
||||
|
||||
# Import Salt Libs
|
||||
import salt.utils
|
||||
import salt.modules.groupadd as groupadd
|
||||
|
||||
|
||||
@skipIf(NO_MOCK, NO_MOCK_REASON)
|
||||
@skipIf(salt.utils.is_windows(), "Module not available on Windows")
|
||||
class GroupAddTestCase(TestCase, LoaderModuleMockMixin):
|
||||
'''
|
||||
TestCase for salt.modules.groupadd
|
||||
|
|
Loading…
Add table
Reference in a new issue