mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 01:30:21 +00:00
fix .0 tests
This commit is contained in:
parent
c291d741f5
commit
11a0c6fee0
2 changed files with 4 additions and 3 deletions
|
@ -41,8 +41,6 @@ def target_python_version():
|
|||
@pytest.fixture(scope="session")
|
||||
def target_salt_version():
|
||||
target_salt = os.environ["KITCHEN_SUITE"].split("-", 2)[-1].replace("-", ".")
|
||||
if target_salt.endswith(".0") and float(target_salt) >= 3000:
|
||||
target_salt = ".".join(target_salt.split(".")[:-1])
|
||||
if target_salt in ("latest", "master"):
|
||||
pytest.skip("Don't have a specific salt version to test against")
|
||||
return target_salt
|
||||
|
|
|
@ -21,4 +21,7 @@ def test_target_python_version(host, target_python_version):
|
|||
def test_target_salt_version(host, target_salt_version):
|
||||
with host.sudo():
|
||||
ret = host.salt("grains.item", "saltversion", "--timeout=120")
|
||||
assert ret["saltversion"].startswith(target_salt_version)
|
||||
if target_salt_version.endswith(".0"):
|
||||
assert ret["saltversion"] == ".".join(target_salt_version.split(".")[:-1])
|
||||
else:
|
||||
assert ret["saltversion"].startswith(target_salt_version)
|
||||
|
|
Loading…
Add table
Reference in a new issue