Add test to ensure ssm.exe present

This commit is contained in:
Twangboy 2023-05-02 15:56:55 -06:00 committed by Pedro Algarvio
parent 87074deea0
commit e4c5ce3692
2 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,16 @@
import os
import pytest
pytestmark = [
pytest.mark.skip_unless_on_windows,
]
def test_ssm_present(install_salt):
"""
The ssm.exe binary needs to be present in both the zip and the exe/msi
builds
"""
ssm_path = os.path.join(*install_salt.binary_paths["ssm"])
assert os.path.exists(ssm_path)

View file

@ -380,6 +380,7 @@ class SaltPkgInstall:
"minion": ["salt-minion.exe"],
"pip": ["salt-pip.exe"],
"python": [python_bin],
"ssm": [self.ssm_bin],
}
else:
if os.path.exists(self.install_dir / "bin" / "salt"):
@ -412,6 +413,7 @@ class SaltPkgInstall:
"minion": [str(self.run_root), "minion"],
"pip": [str(self.run_root), "pip"],
"python": [python_bin],
"ssm": [self.ssm_bin],
}
else:
self.binary_paths = {
@ -439,6 +441,7 @@ class SaltPkgInstall:
"minion": [self.install_dir / "salt-minion.exe"],
"pip": [self.install_dir / "salt-pip.exe"],
"python": [python_bin],
"ssm": [self.ssm_bin],
}
else:
self.binary_paths = {