remove unused function _guess_deliverable_type
Change-Id: I60485fc67692f584afc281736f5f00623015f81a Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
@@ -838,14 +838,6 @@ def validate_branch_prefixes(deliv, messages):
|
|||||||
branch.name, _VALID_BRANCH_PREFIXES))
|
branch.name, _VALID_BRANCH_PREFIXES))
|
||||||
|
|
||||||
|
|
||||||
def _guess_deliverable_type(deliverable_name, deliverable_info):
|
|
||||||
if 'tempest-plugin' in deliverable_name:
|
|
||||||
return 'tempest-plugin'
|
|
||||||
if 'type' in deliverable_info:
|
|
||||||
return deliverable_info['type']
|
|
||||||
return 'other'
|
|
||||||
|
|
||||||
|
|
||||||
def validate_stable_branches(deliv, workdir, series_name, messages):
|
def validate_stable_branches(deliv, workdir, series_name, messages):
|
||||||
"Apply the rules for stable branches."
|
"Apply the rules for stable branches."
|
||||||
header('Validate Stable Branches')
|
header('Validate Stable Branches')
|
||||||
|
|||||||
@@ -2521,40 +2521,6 @@ class TestValidateSeriesFirst(base.BaseTestCase):
|
|||||||
self.assertEqual(0, len(self.msg.errors))
|
self.assertEqual(0, len(self.msg.errors))
|
||||||
|
|
||||||
|
|
||||||
class TestGuessDeliverableType(base.BaseTestCase):
|
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super().setUp()
|
|
||||||
self.msg = validate.MessageCollector()
|
|
||||||
|
|
||||||
def test_explicit(self):
|
|
||||||
self.assertEqual(
|
|
||||||
'the-type',
|
|
||||||
validate._guess_deliverable_type(
|
|
||||||
'name',
|
|
||||||
{'type': 'the-type'},
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
def test_implicit_tempest_plugin(self):
|
|
||||||
self.assertEqual(
|
|
||||||
'tempest-plugin',
|
|
||||||
validate._guess_deliverable_type(
|
|
||||||
'foo-tempest-plugin',
|
|
||||||
{},
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
def test_default_other(self):
|
|
||||||
self.assertEqual(
|
|
||||||
'other',
|
|
||||||
validate._guess_deliverable_type(
|
|
||||||
'name',
|
|
||||||
{},
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class TestValidateBranchPoints(base.BaseTestCase):
|
class TestValidateBranchPoints(base.BaseTestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user