diff options
author | 2022-05-13 08:55:19 +0300 | |
---|---|---|
committer | 2022-05-13 09:03:51 +0300 | |
commit | 0842965dd8316d176c24e56c88766a9e8b61bf0f (patch) | |
tree | 27db7b5a4a2ebd531e82ac08c36f145ad2fbe51f /tests | |
parent | pkgdev manifest: add --ignore-fetch-restricted (diff) | |
download | pkgdev-0842965dd8316d176c24e56c88766a9e8b61bf0f.tar.gz pkgdev-0842965dd8316d176c24e56c88766a9e8b61bf0f.tar.bz2 pkgdev-0842965dd8316d176c24e56c88766a9e8b61bf0f.zip |
pkgdev commit: make sign-off off by default
Make sign-off off by default, and enable the user to pass if manually
using `--signoff`, or by setting `commit.signoff` in config file.
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scripts/test_pkgdev_commit.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/scripts/test_pkgdev_commit.py b/tests/scripts/test_pkgdev_commit.py index a2adeec..df7c5f3 100644 --- a/tests/scripts/test_pkgdev_commit.py +++ b/tests/scripts/test_pkgdev_commit.py @@ -58,11 +58,19 @@ class TestPkgdevCommitParseArgs: options, _ = tool.parse_args(['commit', '-u']) assert '--signoff' not in options.commit_args assert '--gpg-sign' not in options.commit_args + + options, _ = tool.parse_args(['commit', '-u', '--signoff']) + assert '--signoff' in options.commit_args + assert '--gpg-sign' not in options.commit_args # signed commits enabled by layout.conf setting with open(pjoin(git_repo.path, 'metadata/layout.conf'), 'a+') as f: f.write('sign-commits = true\n') with chdir(repo.location): options, _ = tool.parse_args(['commit', '-u']) + assert '--signoff' not in options.commit_args + assert '--gpg-sign' in options.commit_args + + options, _ = tool.parse_args(['commit', '-u', '--signoff']) assert '--signoff' in options.commit_args assert '--gpg-sign' in options.commit_args |