mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
git.latest: add test for no rev
technically, rename existing test and add a new simpler test with the old name.
This commit is contained in:
parent
5fa86fee0a
commit
2f55d60293
@ -38,6 +38,22 @@ class GitTest(integration.ModuleCase, integration.SaltReturnAssertsMixIn):
|
||||
self.skipTest(msg.format(self.__domain))
|
||||
|
||||
def test_latest(self):
|
||||
'''
|
||||
git.latest
|
||||
'''
|
||||
name = os.path.join(integration.TMP, 'salt_repo')
|
||||
try:
|
||||
ret = self.run_state(
|
||||
'git.latest',
|
||||
name='https://{0}/saltstack/salt-test-repo.git'.format(self.__domain),
|
||||
target=name
|
||||
)
|
||||
self.assertSaltTrueReturn(ret)
|
||||
self.assertTrue(os.path.isdir(os.path.join(name, '.git')))
|
||||
finally:
|
||||
shutil.rmtree(name, ignore_errors=True)
|
||||
|
||||
def test_latest_with_rev_and_submodules(self):
|
||||
'''
|
||||
git.latest
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user