mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
make sure cmd is not run when npm isn't installed
apparently the skipIf on the functions still get run, even if the function is going to be skipped based on a skipIf on the class.
This commit is contained in:
parent
b458b89fb8
commit
da3402a53d
1 changed files with 2 additions and 1 deletions
|
@ -54,7 +54,8 @@ class NpmStateTest(integration.ModuleCase, integration.SaltReturnAssertsMixIn):
|
|||
ret = self.run_state('npm.installed', name=None, pkgs=['pm2', 'grunt'])
|
||||
self.assertSaltTrueReturn(ret)
|
||||
|
||||
@skipIf(LooseVersion(cmd.run('npm -v')) >= LooseVersion(MAX_NPM_VERSION), 'Skip with npm >= 5.0.0 until #41770 is fixed')
|
||||
@skipIf(salt.utils.which('npm') and LooseVersion(cmd.run('npm -v')) >= LooseVersion(MAX_NPM_VERSION),
|
||||
'Skip with npm >= 5.0.0 until #41770 is fixed')
|
||||
@destructiveTest
|
||||
def test_npm_cache_clean(self):
|
||||
'''
|
||||
|
|
Loading…
Add table
Reference in a new issue