mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Update old utils paths to use new utils paths
This commit is contained in:
parent
13e8124031
commit
fefc0cc3ca
5 changed files with 12 additions and 11 deletions
|
@ -8,10 +8,10 @@ from tests.support.case import ModuleCase
|
|||
from tests.support.unit import skipIf
|
||||
|
||||
# Import Salt libs
|
||||
import salt.utils
|
||||
import salt.utils.platform
|
||||
|
||||
|
||||
@skipIf(not salt.utils.is_windows(), 'windows tests only')
|
||||
@skipIf(not salt.utils.platform.is_windows(), 'windows tests only')
|
||||
class AutoRunsModuleTest(ModuleCase):
|
||||
'''
|
||||
Test the autoruns module
|
||||
|
|
|
@ -9,10 +9,10 @@ from tests.support.unit import skipIf
|
|||
from tests.support.helpers import destructiveTest
|
||||
|
||||
# Import Salt Libs
|
||||
import salt.utils
|
||||
import salt.utils.platform
|
||||
|
||||
|
||||
@skipIf(not salt.utils.is_windows(), 'Tests for only Windows')
|
||||
@skipIf(not salt.utils.platform.is_windows(), 'Tests for only Windows')
|
||||
class FirewallTest(ModuleCase):
|
||||
'''
|
||||
Validate windows firewall module
|
||||
|
|
|
@ -8,7 +8,8 @@ from tests.support.case import ModuleCase
|
|||
from tests.support.unit import skipIf
|
||||
|
||||
# Import Salt Libs
|
||||
import salt.utils
|
||||
import salt.utils.path
|
||||
import salt.utils.platform
|
||||
|
||||
URL = 'repo.saltstack.com'
|
||||
|
||||
|
@ -26,7 +27,7 @@ class NetworkTest(ModuleCase):
|
|||
for out in exp_out:
|
||||
self.assertIn(out, ret.lower())
|
||||
|
||||
@skipIf(salt.utils.is_darwin(), 'not supported on macosx')
|
||||
@skipIf(salt.utils.platform.is_darwin(), 'not supported on macosx')
|
||||
def test_network_netstat(self):
|
||||
'''
|
||||
network.netstat
|
||||
|
@ -41,14 +42,14 @@ class NetworkTest(ModuleCase):
|
|||
'''
|
||||
network.traceroute
|
||||
'''
|
||||
if not salt.utils.which('traceroute') and not salt.utils.is_windows():
|
||||
if not salt.utils.path.which('traceroute') and not salt.utils.platform.is_windows():
|
||||
self.skipTest('traceroute not installed')
|
||||
ret = self.run_function('network.traceroute', [URL])
|
||||
exp_out = ['hostname', 'ip']
|
||||
for out in exp_out:
|
||||
self.assertIn(out, exp_out)
|
||||
|
||||
@skipIf(not salt.utils.is_windows(), 'windows only test')
|
||||
@skipIf(not salt.utils.platform.is_windows(), 'windows only test')
|
||||
def test_network_nslookup(self):
|
||||
'''
|
||||
network.nslookup
|
||||
|
|
|
@ -9,10 +9,10 @@ from tests.support.unit import skipIf
|
|||
from tests.support.helpers import destructiveTest
|
||||
|
||||
# Import Salt Libs
|
||||
import salt.utils
|
||||
import salt.utils.platform
|
||||
|
||||
|
||||
@skipIf(not salt.utils.is_windows(), 'Tests for only Windows')
|
||||
@skipIf(not salt.utils.platform.is_windows(), 'Tests for only Windows')
|
||||
class NTPTest(ModuleCase):
|
||||
'''
|
||||
Validate windows ntp module
|
||||
|
|
|
@ -361,7 +361,7 @@ class SystemModuleTest(ModuleCase):
|
|||
self.assertTrue(self._hwclock_has_compare())
|
||||
|
||||
|
||||
@skipIf(not salt.utils.is_windows(), 'These tests can only be run on windows')
|
||||
@skipIf(not salt.utils.platform.is_windows(), 'These tests can only be run on windows')
|
||||
class WinSystemModuleTest(ModuleCase):
|
||||
'''
|
||||
Validate the date/time functions in the win_system module
|
||||
|
|
Loading…
Add table
Reference in a new issue