mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
If the passed version begins with v, eg. it's a tag, remove it before comparison.
This commit is contained in:
parent
719422adfe
commit
e7c8f7698b
1 changed files with 4 additions and 1 deletions
|
@ -1,8 +1,9 @@
|
|||
import logging
|
||||
import os
|
||||
import pprint
|
||||
|
||||
import pytest
|
||||
import testinfra
|
||||
import logging
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
@ -47,6 +48,8 @@ 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.startswith("v"):
|
||||
target_salt = target_salt[1:]
|
||||
if target_salt in ("latest", "master", "nightly"):
|
||||
pytest.skip("Don't have a specific salt version to test against")
|
||||
return target_salt
|
||||
|
|
Loading…
Add table
Reference in a new issue