diff --git a/tests/integration/modules/test_gem.py b/tests/integration/modules/test_gem.py index 36ed2edf09a..28200c67bbf 100644 --- a/tests/integration/modules/test_gem.py +++ b/tests/integration/modules/test_gem.py @@ -4,6 +4,7 @@ import pytest +import salt.utils.platform from salt.ext.tornado.httpclient import HTTPClient from tests.support.case import ModuleCase @@ -31,6 +32,7 @@ def setUp(self): 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 @@ def uninstall_gem(): 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): """