Remove get_repo_tag
authorJuha Kosonen <juha.kosonen@nokia.com>
Mon, 4 Sep 2017 12:14:25 +0000 (15:14 +0300)
committerJuha Kosonen <juha.kosonen@nokia.com>
Mon, 4 Sep 2017 12:14:25 +0000 (15:14 +0300)
Not in use after removal of multisite support [1].

[1] https://gerrit.opnfv.org/gerrit/#/c/39569/

Change-Id: I1346c78743690a2e5279d3b1883501dfe19078e3
Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
functest/opnfv_tests/openstack/tempest/conf_utils.py
functest/tests/unit/openstack/tempest/test_conf_utils.py

index 52fa600..2cdc2cf 100644 (file)
@@ -115,17 +115,6 @@ def get_verifier_deployment_dir(verifier_id, deployment_id):
                         'for-deployment-{}'.format(deployment_id))
 
 
-def get_repo_tag(repo):
-    """
-    Returns last tag of current branch
-    """
-    cmd = ("git -C {0} describe --abbrev=0 HEAD".format(repo))
-    p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
-    tag = p.stdout.readline().rstrip()
-
-    return str(tag)
-
-
 def backup_tempest_config(conf_file):
     """
     Copy config file to tempest results directory
index 7755808..9df97b4 100644 (file)
@@ -157,17 +157,6 @@ class OSTempestConfUtilsTesting(unittest.TestCase):
             self.assertTrue(m1.called)
             self.assertTrue(m2.called)
 
-    def test_get_repo_tag_default(self):
-        mock_popen = mock.Mock()
-        attrs = {'stdout.readline.return_value': 'test_tag'}
-        mock_popen.configure_mock(**attrs)
-
-        with mock.patch('functest.opnfv_tests.openstack.tempest.'
-                        'conf_utils.subprocess.Popen',
-                        return_value=mock_popen):
-            self.assertEqual(conf_utils.get_repo_tag('test_repo'),
-                             'test_tag')
-
     def test_backup_tempest_config_default(self):
         with mock.patch('functest.opnfv_tests.openstack.tempest.'
                         'conf_utils.shutil.copyfile') as m1: