aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-01-10 12:53:24 +0100
committerGuido Günther <agx@sigxcpu.org>2017-01-10 13:17:30 +0100
commit42878ff2e5756a6cd32f43a90c024ffadbe989c7 (patch)
tree7be27826f446b37fbc73a990b650c39018ffc67c /tests
parente9ffa80e5ff429e6f5cd38c07036aae07416fecf (diff)
Always set a mainttrailer option
to honor --[no]-git-author This basically reverts c3258c19c6cfa291c8bebac1dae230f6e3ccca36 but also adds a test case to not break it again that easily. Closes: #796913 Thanks: David Kalnischkies for investigating
Diffstat (limited to 'tests')
-rw-r--r--tests/11_test_dch_main.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/11_test_dch_main.py b/tests/11_test_dch_main.py
index e9b6400..a9b2146 100644
--- a/tests/11_test_dch_main.py
+++ b/tests/11_test_dch_main.py
@@ -68,6 +68,8 @@ class TestScriptDch(DebianGitTestRepo):
self.options = ["--upstream-tag=%s" % self.upstream_tag, "--debian-branch=debian",
"--upstream-branch=upstream", "--id-length=0", "--spawn-editor=/bin/true"]
self.repo.create_tag(deb_tag, msg=deb_tag_msg, commit="HEAD~1")
+ self.repo.set_user_name("gbp test user")
+ self.repo.set_user_email("gbp@example.com")
def tearDown(self):
DebianGitTestRepo.tearDown(self)
@@ -387,3 +389,13 @@ class TestScriptDch(DebianGitTestRepo):
lines)
self.assertIn(""" * test non-debian closes 2 (Example: EX-5678)\n""",
lines)
+
+ def test_dch_main_git_author(self):
+ options = ["--git-author", '-S', '-a']
+ lines = self.run_dch(options)
+ self.assertIn("-- gbp test user <gbp@example.com>", lines[9])
+
+ def test_dch_main_no_git_author(self):
+ options = ["--no-git-author", '-S', '-a']
+ lines = self.run_dch(options)
+ self.assertNotIn("-- gbp test user", "\n".join(lines))