diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-06-06 12:40:32 +0300 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-11-14 14:47:20 +0200 |
commit | f551fab4b20e1d8cd9a069928f54756f2f963d83 (patch) | |
tree | 0fe57f417c656e0b1aaff2735e60f03003537f52 /tests | |
parent | 72fdb2c35c188ad2d14da68befc54241f592467e (diff) | |
download | git-buildpackage-f551fab4b20e1d8cd9a069928f54756f2f963d83.tar.gz git-buildpackage-f551fab4b20e1d8cd9a069928f54756f2f963d83.tar.bz2 git-buildpackage-f551fab4b20e1d8cd9a069928f54756f2f963d83.zip |
rpm-ch: implement --meta-bts option
This gives the user the possibility to define what meta tags (in git
commit message) git-rpm-ch recognizes as bug tracking system references.
Or, makes it possible to disable bts meta tag tracking altogether.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/component/rpm/test_rpm_ch.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/component/rpm/test_rpm_ch.py b/tests/component/rpm/test_rpm_ch.py index b69c517e..db03c845 100644 --- a/tests/component/rpm/test_rpm_ch.py +++ b/tests/component/rpm/test_rpm_ch.py @@ -181,6 +181,26 @@ class TestRpmCh(RpmRepoTestBase): eq_(mock_ch(['--packaging-branch=foo', '--ignore-branch']), 0) + def test_option_meta_bts(self): + """Test parsing of the bts meta tags""" + repo = self.init_test_repo('gbp-test-native') + + # Create a dummy commit that references bts + with open('new-file', 'w') as fobj: + fobj.write('foobar\n') + repo.add_files('new-file') + repo.commit_all('Fix\n\nCloses: #123\nFixes: #456\n Fixes: #789') + + eq_(mock_ch(['--since=HEAD^']), 0) + content = self.read_file('packaging/gbp-test-native.changes') + # rpm-ch shouldn't have picked the ref with leading whitespace + eq_(content[1], '- Fix (Closes: #123) (Fixes: #456)\n') + + # Check the --meta-bts option + eq_(mock_ch(['--since=HEAD^', '--meta-bts=Fixes']), 0) + content = self.read_file('packaging/gbp-test-native.changes') + eq_(content[1], '- Fix (Fixes: #456)\n') + def test_option_no_release(self): """Test the --no-release cmdline option""" self.init_test_repo('gbp-test-native') |