From 2f55d602932e8c8e62dc105537099ace34c7215c Mon Sep 17 00:00:00 2001 From: Andreas Lutro Date: Tue, 18 Aug 2015 16:38:10 +0200 Subject: [PATCH] git.latest: add test for no rev technically, rename existing test and add a new simpler test with the old name. --- tests/integration/states/git.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/integration/states/git.py b/tests/integration/states/git.py index 0ba4b33b59..4fb2f121c2 100644 --- a/tests/integration/states/git.py +++ b/tests/integration/states/git.py @@ -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 '''