Skip nonexistent branch for git versions <1.7.10

This commit is contained in:
Ch3LL 2018-08-24 18:11:32 -04:00
parent 7a89a4c8aa
commit ee3d32f74e
No known key found for this signature in database
GPG key ID: 132B55A7C13EFA73

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