mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #49323 from Ch3LL/skip_git
Skip nonexistent branch test for git versions <1.7.10
This commit is contained in:
commit
be6691d91b
1 changed files with 5 additions and 2 deletions
|
@ -51,11 +51,13 @@ def __check_git_version(caller, min_version, skip_msg):
|
|||
return wrapper
|
||||
|
||||
|
||||
def ensure_min_git(caller):
|
||||
def ensure_min_git(caller=None, min_version='1.6.5'):
|
||||
'''
|
||||
Skip test if minimum supported git version is not installed
|
||||
'''
|
||||
min_version = '1.6.5'
|
||||
if caller is None:
|
||||
return functools.partial(ensure_min_git, min_version=min_version)
|
||||
|
||||
return __check_git_version(
|
||||
caller,
|
||||
min_version,
|
||||
|
@ -624,6 +626,7 @@ class GitTest(ModuleCase, SaltReturnAssertsMixin):
|
|||
)
|
||||
|
||||
@with_tempdir(create=False)
|
||||
@ensure_min_git(min_version='1.7.10')
|
||||
def test_cloned_with_nonexistant_branch(self, target):
|
||||
'''
|
||||
Test git.cloned state with a nonexistant branch provided
|
||||
|
|
Loading…
Add table
Reference in a new issue