mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
account for salt_version ending in .x, eg. 3006.x branch.
This commit is contained in:
parent
d9a8f4a6d8
commit
8d02826be7
1 changed files with 2 additions and 3 deletions
|
@ -1,6 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
import logging
|
||||
import os
|
||||
from contextlib import nullcontext
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
@ -26,7 +25,7 @@ def test_target_python_version(host, target_python_version):
|
|||
def test_target_salt_version(host, target_salt_version):
|
||||
with selected_context_manager(host):
|
||||
ret = host.salt("grains.item", "saltversion", "--timeout=120")
|
||||
if target_salt_version.endswith(".0"):
|
||||
if target_salt_version.endswith(".0") or target_salt_version.endswith(".x"):
|
||||
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