| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -258,7 +258,7 @@ Get a specific project commit by its SHA id: | |||
| 258 | 258 | ||
| 259 | 259 | $ gitlab project-commit get --project-id 2 --id a43290c | |
| 260 | 260 | ||
| 261 | - Get the GPG signature of a signed commit: | ||
| 261 | + Get the signature (e.g. GPG or x509) of a signed commit: | ||
| 262 | 262 | ||
| 263 | 263 | .. code-block:: console | |
| 264 | 264 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -82,7 +82,7 @@ Get the references the commit has been pushed to (branches and tags):: | |||
| 82 | 82 | commit.refs('tag') # only tags | |
| 83 | 83 | commit.refs('branch') # only branches | |
| 84 | 84 | ||
| 85 | - Get the GPG signature of the commit (if the commit was signed):: | ||
| 85 | + Get the signature of the commit (if the commit was signed, e.g. with GPG or x509):: | ||
| 86 | 86 | ||
| 87 | 87 | commit.signature() | |
| 88 | 88 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2299,7 +2299,7 @@ def revert(self, branch, **kwargs): | |||
| 2299 | 2299 | @cli.register_custom_action("ProjectCommit") | |
| 2300 | 2300 | @exc.on_http_error(exc.GitlabGetError) | |
| 2301 | 2301 | def signature(self, **kwargs): | |
| 2302 | - """Get the GPG signature of the commit. | ||
| 2302 | + """Get the signature of the commit. | ||
| 2303 | 2303 | ||
| 2304 | 2304 | Args: | |
| 2305 | 2305 | **kwargs: Extra options to send to the server (e.g. sudo) | |
@@ -2309,7 +2309,7 @@ def signature(self, **kwargs): | |||
| 2309 | 2309 | GitlabGetError: If the signature could not be retrieved | |
| 2310 | 2310 | ||
| 2311 | 2311 | Returns: | |
| 2312 | - dict: The commit's GPG signature data | ||
| 2312 | + dict: The commit's signature data | ||
| 2313 | 2313 | """ | |
| 2314 | 2314 | path = "%s/%s/signature" % (self.manager.path, self.get_id()) | |
| 2315 | 2315 | return self.manager.gitlab.http_get(path, **kwargs) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -113,11 +113,11 @@ testcase "revert commit" ' | |||
| 113 | 113 | --id "$COMMIT_ID" --branch master | |
| 114 | 114 | ' | |
| 115 | 115 | ||
| 116 | - # Test commit GPG signature | ||
| 117 | - testcase "attempt to get GPG signature of unsigned commit" ' | ||
| 116 | + # Test commit signature | ||
| 117 | + testcase "attempt to get signature of unsigned commit" ' | ||
| 118 | 118 | OUTPUT=$(GITLAB project-commit signature --project-id "$PROJECT_ID" \ | |
| 119 | 119 | --id "$COMMIT_ID" 2>&1 || exit 0) | |
| 120 | - echo "$OUTPUT" | grep -q "404 GPG Signature Not Found" | ||
| 120 | + echo "$OUTPUT" | grep -q "404 Signature Not Found" | ||
| 121 | 121 | ' | |
| 122 | 122 | ||
| 123 | 123 | # Test project labels | |
@@ -218,23 +218,18 @@ testcase "values from files" ' | |||
| 218 | 218 | CREATE_PROJECT_DEPLOY_TOKEN_OUTPUT=$(GITLAB -v project-deploy-token create --project-id $PROJECT_ID \ | |
| 219 | 219 | --name foo --username root --expires-at "2021-09-09" --scopes "read_registry") | |
| 220 | 220 | CREATED_DEPLOY_TOKEN_ID=$(echo "$CREATE_PROJECT_DEPLOY_TOKEN_OUTPUT" | grep ^id: | cut -d" " -f2) | |
| 221 | - testcase "create project deploy token" ' | ||
| 221 | + testcase "create project deploy token (name)" ' | ||
| 222 | 222 | echo $CREATE_PROJECT_DEPLOY_TOKEN_OUTPUT | grep -q "name: foo" | |
| 223 | 223 | ' | |
| 224 | - testcase "create project deploy token" ' | ||
| 224 | + testcase "create project deploy token (expires-at)" ' | ||
| 225 | 225 | echo $CREATE_PROJECT_DEPLOY_TOKEN_OUTPUT | grep -q "expires-at: 2021-09-09T00:00:00.000Z" | |
| 226 | 226 | ' | |
| 227 | - testcase "create project deploy token" ' | ||
| 227 | + testcase "create project deploy token (scopes)" ' | ||
| 228 | 228 | echo $CREATE_PROJECT_DEPLOY_TOKEN_OUTPUT | grep "scopes: " | grep -q "read_registry" | |
| 229 | 229 | ' | |
| 230 | - # Uncomment once https://gitlab.com/gitlab-org/gitlab/-/issues/211963 is fixed | ||
| 231 | - #testcase "create project deploy token" ' | ||
| 232 | - # echo $CREATE_PROJECT_DEPLOY_TOKEN_OUTPUT | grep -q "username: root" | ||
| 233 | - #' | ||
| 234 | 230 | ||
| 235 | - # Remove once https://gitlab.com/gitlab-org/gitlab/-/issues/211963 is fixed | ||
| 236 | - testcase "create project deploy token" ' | ||
| 237 | - echo $CREATE_PROJECT_DEPLOY_TOKEN_OUTPUT | grep -q "gitlab+deploy-token" | ||
| 231 | + testcase "create project deploy token (username)" ' | ||
| 232 | + echo $CREATE_PROJECT_DEPLOY_TOKEN_OUTPUT | grep -q "username: root" | ||
| 238 | 233 | ' | |
| 239 | 234 | ||
| 240 | 235 | LIST_DEPLOY_TOKEN_OUTPUT=$(GITLAB -v deploy-token list) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -500,13 +500,13 @@ | |||
| 500 | 500 | # assert commit.refs() | |
| 501 | 501 | # assert commit.merge_requests() | |
| 502 | 502 | ||
| 503 | - # commit GPG signature (for unsigned commits) | ||
| 503 | + # commit signature (for unsigned commits) | ||
| 504 | 504 | # TODO: reasonable tests for signed commits? | |
| 505 | 505 | try: | |
| 506 | 506 | signature = commit.signature() | |
| 507 | 507 | except gitlab.GitlabGetError as e: | |
| 508 | 508 | error_message = e.error_message | |
| 509 | - assert error_message == "404 GPG Signature Not Found" | ||
| 509 | + assert error_message == "404 Signature Not Found" | ||
| 510 | 510 | ||
| 511 | 511 | # commit comment | |
| 512 | 512 | commit.comments.create({"note": "This is a commit comment"}) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments