예제 #1
0
 def test_branch(self):
     self.assertEqual(
         git_version_specifier(refspec=None,
                               branch='master',
                               commit=None,
                               tag=None),
         {'origin_ci_sync_version': 'master'})
예제 #2
0
 def test_tag(self):
     self.assertEqual(
         git_version_specifier(refspec=None,
                               branch=None,
                               commit=None,
                               tag='v1.0.0'),
         {'origin_ci_sync_version': 'v1.0.0'})
예제 #3
0
 def test_refspec_branch(self):
     self.assertEqual(
         git_version_specifier(refspec='pulls/1/head', branch='myfeature', commit=None, tag=None),
         {
             'origin_ci_sync_refspec': 'pulls/1/head:myfeature',
             'origin_ci_sync_version': 'myfeature',
         },
     )
예제 #4
0
 def test_commit(self):
     self.assertEqual(
         git_version_specifier(refspec=None,
                               branch=None,
                               commit='SHA',
                               tag=None), {'origin_ci_sync_version': 'SHA'})