mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
Update test_gem to set gem_binary to "gem.cmd
Updates tests/integration/modules/test_gem.py to pass gem_binary="gem.cmd" to the gem module on windows. Although just using "gem" on the commandline works, from the module, via cmd.run_all it doesn't.
This commit is contained in:
parent
5fe28f00f9
commit
955529f1c0
1 changed files with 7 additions and 0 deletions
|
@ -4,6 +4,7 @@ Integration tests for Ruby Gem module
|
|||
|
||||
import pytest
|
||||
|
||||
import salt.utils.platform
|
||||
from salt.ext.tornado.httpclient import HTTPClient
|
||||
from tests.support.case import ModuleCase
|
||||
|
||||
|
@ -31,6 +32,7 @@ class GemModuleTest(ModuleCase):
|
|||
if check_status() is False:
|
||||
self.skipTest("External resource 'https://rubygems.org' is not available")
|
||||
|
||||
self.GEM_BIN = "gem.cmd" if salt.utils.platform.is_windows() else "gem"
|
||||
self.GEM = "tidy"
|
||||
self.GEM_VER = "1.1.2"
|
||||
self.OLD_GEM = "brass"
|
||||
|
@ -54,6 +56,11 @@ class GemModuleTest(ModuleCase):
|
|||
|
||||
self.addCleanup(uninstall_gem)
|
||||
|
||||
def run_function(self, function, *args, **kwargs):
|
||||
"""Override run_function to use the gem binary"""
|
||||
kwargs["gem_bin"] = self.GEM_BIN
|
||||
return super().run_function(function, *args, **kwargs)
|
||||
|
||||
@pytest.mark.slow_test
|
||||
def test_install_uninstall(self):
|
||||
"""
|
||||
|
|
Loading…
Add table
Reference in a new issue