Merge pull request #49323 from Ch3LL/skip_git

Skip nonexistent branch test for git versions <1.7.10
This commit is contained in:
Daniel Wallace 2018-08-25 14:52:47 -05:00 committed by GitHub
commit be6691d91b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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