Skip to content

Commit

Permalink
test: Added dummy json docs for tests 🧪
Browse files Browse the repository at this point in the history
  • Loading branch information
guisea committed Jul 24, 2024
1 parent d1e56e5 commit 1cbc6ff
Show file tree
Hide file tree
Showing 4 changed files with 453 additions and 0 deletions.
302 changes: 302 additions & 0 deletions tests/data/GetCommits.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,302 @@
[
{
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/commits/deadbeef",
"sha": "deadbeef",
"created": "2024-04-23T13:20:33+12:00",
"html_url": "https://1.1.1.1/owner/test-repo/commit/deadbeef",
"commit": {
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/commits/deadbeef",
"author": {
"name": "A User",
"email": "owner@noreply.1.1.1.1",
"date": "2024-04-23T13:20:33+12:00"
},
"committer": {
"name": "A User",
"email": "owner@noreply.1.1.1.1",
"date": "2024-04-23T13:20:33+12:00"
},
"message": "fix: Removed lint as not go project\n",
"tree": {
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/trees/deadbeef",
"sha": "deadbeef",
"created": "2024-04-23T13:20:33+12:00"
},
"verification": {
"verified": false,
"reason": "gpg.error.not_signed_commit",
"signature": "",
"signer": null,
"payload": ""
}
},
"author": {
"id": 1,
"login": "owner",
"login_name": "",
"source_id": 0,
"full_name": "A User",
"email": "owner@noreply.1.1.1.1",
"avatar_url": "https://secure.gravatar.com/avatar/ahash?d=identicon",
"html_url": "https://1.1.1.1/owner",
"language": "",
"is_admin": false,
"last_login": "0001-01-01T00:00:00Z",
"created": "2021-05-05T11:08:04+12:00",
"restricted": false,
"active": false,
"prohibit_login": false,
"location": "",
"website": "",
"description": "",
"visibility": "public",
"followers_count": 0,
"following_count": 0,
"starred_repos_count": 0,
"username": "owner"
},
"committer": {
"id": 1,
"login": "owner",
"login_name": "",
"source_id": 0,
"full_name": "A User",
"email": "owner@noreply.1.1.1.1",
"avatar_url": "https://secure.gravatar.com/avatar/ahash?d=identicon",
"html_url": "https://1.1.1.1/owner",
"language": "",
"is_admin": false,
"last_login": "0001-01-01T00:00:00Z",
"created": "2021-05-05T11:08:04+12:00",
"restricted": false,
"active": false,
"prohibit_login": false,
"location": "",
"website": "",
"description": "",
"visibility": "public",
"followers_count": 0,
"following_count": 0,
"starred_repos_count": 0,
"username": "owner"
},
"parents": [
{
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/commits/deadbeef",
"sha": "deadbeef",
"created": "0001-01-01T00:00:00Z"
}
],
"files": [
{
"filename": ".gitea/workflows/.ci.yml",
"status": "modified"
}
],
"stats": {
"total": 16,
"additions": 8,
"deletions": 8
}
},
{
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/commits/deadbeef",
"sha": "deadbeef",
"created": "2024-04-23T13:17:11+12:00",
"html_url": "https://1.1.1.1/owner/test-repo/commit/deadbeef",
"commit": {
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/commits/deadbeef",
"author": {
"name": "A User",
"email": "owner@noreply.1.1.1.1",
"date": "2024-04-23T13:17:11+12:00"
},
"committer": {
"name": "A User",
"email": "owner@noreply.1.1.1.1",
"date": "2024-04-23T13:17:11+12:00"
},
"message": "fix: Oops, need a tidyup\n",
"tree": {
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/trees/deadbeef",
"sha": "deadbeef",
"created": "2024-04-23T13:17:11+12:00"
},
"verification": {
"verified": false,
"reason": "gpg.error.not_signed_commit",
"signature": "",
"signer": null,
"payload": ""
}
},
"author": {
"id": 1,
"login": "owner",
"login_name": "",
"source_id": 0,
"full_name": "A User",
"email": "owner@noreply.1.1.1.1",
"avatar_url": "https://secure.gravatar.com/avatar/ahash?d=identicon",
"html_url": "https://1.1.1.1/owner",
"language": "",
"is_admin": false,
"last_login": "0001-01-01T00:00:00Z",
"created": "2021-05-05T11:08:04+12:00",
"restricted": false,
"active": false,
"prohibit_login": false,
"location": "",
"website": "",
"description": "",
"visibility": "public",
"followers_count": 0,
"following_count": 0,
"starred_repos_count": 0,
"username": "owner"
},
"committer": {
"id": 1,
"login": "owner",
"login_name": "",
"source_id": 0,
"full_name": "A User",
"email": "owner@noreply.1.1.1.1",
"avatar_url": "https://secure.gravatar.com/avatar/ahash?d=identicon",
"html_url": "https://1.1.1.1/owner",
"language": "",
"is_admin": false,
"last_login": "0001-01-01T00:00:00Z",
"created": "2021-05-05T11:08:04+12:00",
"restricted": false,
"active": false,
"prohibit_login": false,
"location": "",
"website": "",
"description": "",
"visibility": "public",
"followers_count": 0,
"following_count": 0,
"starred_repos_count": 0,
"username": "owner"
},
"parents": [
{
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/commits/deadbeef",
"sha": "deadbeef",
"created": "0001-01-01T00:00:00Z"
}
],
"files": [
{
"filename": ".gitea/workflows/ci.yaml",
"status": "removed"
}
],
"stats": {
"total": 62,
"additions": 0,
"deletions": 62
}
},
{
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/commits/deadbeef",
"sha": "deadbeef",
"created": "2024-04-23T13:15:00+12:00",
"html_url": "https://1.1.1.1/owner/test-repo/commit/deadbeef",
"commit": {
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/commits/deadbeef",
"author": {
"name": "A User",
"email": "owner@noreply.1.1.1.1",
"date": "2024-04-23T13:15:00+12:00"
},
"committer": {
"name": "A User",
"email": "owner@noreply.1.1.1.1",
"date": "2024-04-23T13:15:00+12:00"
},
"message": "fix: Update CI\n",
"tree": {
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/trees/deadbeef",
"sha": "deadbeef",
"created": "2024-04-23T13:15:00+12:00"
},
"verification": {
"verified": false,
"reason": "gpg.error.not_signed_commit",
"signature": "",
"signer": null,
"payload": ""
}
},
"author": {
"id": 1,
"login": "owner",
"login_name": "",
"source_id": 0,
"full_name": "A User",
"email": "owner@noreply.1.1.1.1",
"avatar_url": "https://secure.gravatar.com/avatar/ahash?d=identicon",
"html_url": "https://1.1.1.1/owner",
"language": "",
"is_admin": false,
"last_login": "0001-01-01T00:00:00Z",
"created": "2021-05-05T11:08:04+12:00",
"restricted": false,
"active": false,
"prohibit_login": false,
"location": "",
"website": "",
"description": "",
"visibility": "public",
"followers_count": 0,
"following_count": 0,
"starred_repos_count": 0,
"username": "owner"
},
"committer": {
"id": 1,
"login": "owner",
"login_name": "",
"source_id": 0,
"full_name": "A User",
"email": "owner@noreply.1.1.1.1",
"avatar_url": "https://secure.gravatar.com/avatar/ahash?d=identicon",
"html_url": "https://1.1.1.1/owner",
"language": "",
"is_admin": false,
"last_login": "0001-01-01T00:00:00Z",
"created": "2021-05-05T11:08:04+12:00",
"restricted": false,
"active": false,
"prohibit_login": false,
"location": "",
"website": "",
"description": "",
"visibility": "public",
"followers_count": 0,
"following_count": 0,
"starred_repos_count": 0,
"username": "owner"
},
"parents": [
{
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/commits/deadbeef",
"sha": "deadbeef",
"created": "0001-01-01T00:00:00Z"
}
],
"files": [
{
"filename": ".gitea/workflows/.ci.yml",
"status": "added"
}
],
"stats": {
"total": 36,
"additions": 36,
"deletions": 0
}
}
]
56 changes: 56 additions & 0 deletions tests/data/GetRefs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[
{
"ref": "refs/tags/v2.0.0",
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/refs/tags/v2.0.0",
"object": {
"type": "commit",
"sha": "deadbeef",
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/commits/deadbeef"
}
},
{
"ref": "refs/tags/4.0.0-beta",
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/refs/tags/4.0.0-beta",
"object": {
"type": "commit",
"sha": "deadbeef",
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/commits/deadbeef"
}
},
{
"ref": "refs/tags/3.0.0-beta.2",
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/refs/tags/3.0.0-beta.2",
"object": {
"type": "commit",
"sha": "deadbeef",
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/commits/deadbeef"
}
},
{
"ref": "refs/tags/2.1.0-beta",
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/refs/tags/2.1.0-beta",
"object": {
"type": "commit",
"sha": "deadbeef",
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/commits/deadbeef"
}
},
{
"ref": "refs/tags/2.0.0",
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/refs/tags/2.0.0",
"object": {
"type": "commit",
"sha": "deadbeef",
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/commits/deadbeef"
}
},
{
"ref": "refs/tags/2020.4.19",
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/refs/tags/2020.4.19",
"object": {
"type": "commit",
"sha": "deadbeef",
"url": "https://1.1.1.1/api/v1/repos/owner/test-repo/git/commits/deadbeef"
}
}
]
Loading

0 comments on commit 1cbc6ff

Please sign in to comment.