From 3a7531d874f6e90db821f3f5c6326542acc6534a Mon Sep 17 00:00:00 2001 From: Brian Stinson Date: Jul 20 2015 02:40:40 +0000 Subject: add test cases for if -common is specified in the git branch name --- diff --git a/tests/test_distgit.py b/tests/test_distgit.py index d048e88..d5e56d2 100644 --- a/tests/test_distgit.py +++ b/tests/test_distgit.py @@ -29,6 +29,26 @@ class TestDistgitOnlySig(unittest.TestCase): def test_releasename_gets_set(self): self.assertEqual(self.d.releasename, None) +class TestDistgitSigAndCommon(unittest.TestCase): + def setUp(self): + self.branchstring = 'sig-cloud7-common' + self.d = DistGitDirectory(self.branchstring) + + def test_signame_gets_set(self): + self.assertEqual(self.d.signame, 'cloud') + + def test_centosversion_gets_set(self): + self.assertEqual(self.d.centosversion, '7') + + def test_projectname_gets_set(self): + self.assertEqual(self.d.projectname, None) + + def test_releasename_gets_set(self): + self.assertEqual(self.d.releasename, None) + + def test_target_gets_set(self): + self.assertEqual(self.d.target, 'cloud7-common-el7') + class TestDistgitSigAndProject(unittest.TestCase): def setUp(self): self.branchstring = 'sig-cloud7-openstack' @@ -46,6 +66,26 @@ class TestDistgitSigAndProject(unittest.TestCase): def test_releasename_gets_set(self): self.assertEqual(self.d.releasename, None) +class TestDistgitSigProjectAndCommon(unittest.TestCase): + def setUp(self): + self.branchstring = 'sig-cloud7-openstack-common' + self.d = DistGitDirectory(self.branchstring) + + def test_signame_gets_set(self): + self.assertEqual(self.d.signame, 'cloud') + + def test_centosversion_gets_set(self): + self.assertEqual(self.d.centosversion, '7') + + def test_projectname_gets_set(self): + self.assertEqual(self.d.projectname, 'openstack') + + def test_releasename_gets_set(self): + self.assertEqual(self.d.releasename, None) + + def test_target_gets_set(self): + self.assertEqual(self.d.target, 'cloud7-openstack-common-el7') + class TestDistgitSigProjectAndRelease(unittest.TestCase): def setUp(self): self.branchstring = 'sig-cloud7-openstack-kilo'