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:
Andreas Lutro 2015-08-18 16:38:10 +02:00
parent 5fa86fee0a
commit 2f55d60293

View File

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