diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-06-05 17:25:25 +0300 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-06-05 17:27:35 +0300 |
commit | 0f1fc7f430e6f25ab5f8516ca5f8a79291f86c50 (patch) | |
tree | b2742c639fa9149f3469cbb89892c38951f8e249 /tests | |
parent | dca47ece0d2f0de035dc1d2199ac9716ab9b559f (diff) | |
download | git-buildpackage-0f1fc7f430e6f25ab5f8516ca5f8a79291f86c50.tar.gz git-buildpackage-0f1fc7f430e6f25ab5f8516ca5f8a79291f86c50.tar.bz2 git-buildpackage-0f1fc7f430e6f25ab5f8516ca5f8a79291f86c50.zip |
rpm-ch: implement --commit-msg option
Change-Id: I10e2d4ad30dfd02c73fd0f318375715202ec36c2
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/component/rpm/test_rpm_ch.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/component/rpm/test_rpm_ch.py b/tests/component/rpm/test_rpm_ch.py index b8c3bcaf..b69c517e 100644 --- a/tests/component/rpm/test_rpm_ch.py +++ b/tests/component/rpm/test_rpm_ch.py @@ -287,6 +287,17 @@ class TestRpmCh(RpmRepoTestBase): eq_(repo.get_commit_info('HEAD')['files'], {'M': ['foo.txt', 'gbp-test.spec']}) + def test_option_commit_msg(self): + """Test the --commit-msg cmdline option""" + repo = self.init_test_repo('gbp-test2') + + eq_(mock_ch(['--commit', '--since=HEAD^', '--commit-msg=Foo']), 0) + eq_(repo.get_commit_info('HEAD')['subject'], 'Foo') + + # Unknown key in format string causes failure + eq_(mock_ch(['--commit', '--since=HEAD^', '--commit-msg=%(foo)s']), 1) + self._check_log(-1, "gbp:error: Unknown key 'foo' in commit-msg string") + def test_tagging(self): """Test commiting/tagging""" repo = self.init_test_repo('gbp-test-native') |