summaryrefslogtreecommitdiff
path: root/tools/python_test_v4.py
diff options
context:
space:
mode:
authorMax Wittig <max.wittig95@gmail.com>2020-03-22 17:48:09 +0100
committerGitHub <noreply@github.com>2020-03-22 17:48:09 +0100
commit1b8e74887945b363eb46908f2b5f9fa7eb6da40d (patch)
treeb9956d3ad1caa4ba8d13a1279701647dbf60171a /tools/python_test_v4.py
parent82deb7dbe261c4b42a9c45a5b85a2c767f3a8218 (diff)
parentda7a809772233be27fa8e563925dd2e44e1ce058 (diff)
downloadgitlab-1b8e74887945b363eb46908f2b5f9fa7eb6da40d.tar.gz
Merge pull request #1055 from nejch/feat/commit-gpg-signature
feat: add support for commit GPG signature
Diffstat (limited to 'tools/python_test_v4.py')
-rw-r--r--tools/python_test_v4.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/python_test_v4.py b/tools/python_test_v4.py
index fad8c69..69b0d31 100644
--- a/tools/python_test_v4.py
+++ b/tools/python_test_v4.py
@@ -473,6 +473,14 @@ commit = admin_project.commits.list()[0]
# assert commit.refs()
# assert commit.merge_requests()
+# commit GPG signature (for unsigned commits)
+# TODO: reasonable tests for signed commits?
+try:
+ signature = commit.signature()
+except gitlab.GitlabGetError as e:
+ error_message = e.error_message
+assert error_message == "404 GPG Signature Not Found"
+
# commit comment
commit.comments.create({"note": "This is a commit comment"})
# assert len(commit.comments.list()) == 1