summaryrefslogtreecommitdiffstats
path: root/tests/integration/fixtures
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
committerDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
commitdd136858f1ea40ad3c94191d647487fa4f31926c (patch)
tree58fec94a7b2a12510c9664b21793f1ed560c6518 /tests/integration/fixtures
parentInitial commit. (diff)
downloadforgejo-dd136858f1ea40ad3c94191d647487fa4f31926c.tar.xz
forgejo-dd136858f1ea40ad3c94191d647487fa4f31926c.zip
Adding upstream version 9.0.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'tests/integration/fixtures')
-rw-r--r--tests/integration/fixtures/TestAdminDeleteUser/issue.yml16
-rw-r--r--tests/integration/fixtures/TestAdminDeleteUser/issue_index.yml3
-rw-r--r--tests/integration/fixtures/TestAdminDeleteUser/repository.yml30
-rw-r--r--tests/integration/fixtures/TestAdminDeleteUser/user.yml73
-rw-r--r--tests/integration/fixtures/TestBlockActions/comment.yml9
-rw-r--r--tests/integration/fixtures/TestBlockActions/issue.yml17
-rw-r--r--tests/integration/fixtures/TestBlockedNotifications/issue.yml16
-rw-r--r--tests/integration/fixtures/TestCommitRefComment/comment.yml17
-rw-r--r--tests/integration/fixtures/TestGetContentHistory/issue_content_history.yml17
-rw-r--r--tests/integration/fixtures/TestXSSReviewDismissed/comment.yml9
-rw-r--r--tests/integration/fixtures/TestXSSReviewDismissed/review.yml8
11 files changed, 215 insertions, 0 deletions
diff --git a/tests/integration/fixtures/TestAdminDeleteUser/issue.yml b/tests/integration/fixtures/TestAdminDeleteUser/issue.yml
new file mode 100644
index 0000000..02ea88e
--- /dev/null
+++ b/tests/integration/fixtures/TestAdminDeleteUser/issue.yml
@@ -0,0 +1,16 @@
+-
+ id: 1000
+ repo_id: 1000
+ index: 2
+ poster_id: 1000
+ original_author_id: 0
+ name: NAME
+ content: content
+ milestone_id: 0
+ priority: 0
+ is_closed: false
+ is_pull: false
+ num_comments: 0
+ created_unix: 946684830
+ updated_unix: 978307200
+ is_locked: false
diff --git a/tests/integration/fixtures/TestAdminDeleteUser/issue_index.yml b/tests/integration/fixtures/TestAdminDeleteUser/issue_index.yml
new file mode 100644
index 0000000..88aae4d
--- /dev/null
+++ b/tests/integration/fixtures/TestAdminDeleteUser/issue_index.yml
@@ -0,0 +1,3 @@
+-
+ group_id: 1000
+ max_index: 2
diff --git a/tests/integration/fixtures/TestAdminDeleteUser/repository.yml b/tests/integration/fixtures/TestAdminDeleteUser/repository.yml
new file mode 100644
index 0000000..2c12c7e
--- /dev/null
+++ b/tests/integration/fixtures/TestAdminDeleteUser/repository.yml
@@ -0,0 +1,30 @@
+-
+ id: 1000
+ owner_id: 1001
+ owner_name: user1001
+ lower_name: repo1000
+ name: repo1000
+ default_branch: master
+ num_watches: 0
+ num_stars: 0
+ num_forks: 0
+ num_issues: 1
+ num_closed_issues: 0
+ num_pulls: 0
+ num_closed_pulls: 0
+ num_milestones: 0
+ num_closed_milestones: 0
+ num_projects: 0
+ num_closed_projects: 0
+ is_private: false
+ is_empty: false
+ is_archived: false
+ is_mirror: false
+ status: 0
+ is_fork: false
+ fork_id: 0
+ is_template: false
+ template_id: 0
+ size: 0
+ is_fsck_enabled: true
+ close_issues_via_commit_in_any_branch: false
diff --git a/tests/integration/fixtures/TestAdminDeleteUser/user.yml b/tests/integration/fixtures/TestAdminDeleteUser/user.yml
new file mode 100644
index 0000000..9b44a85
--- /dev/null
+++ b/tests/integration/fixtures/TestAdminDeleteUser/user.yml
@@ -0,0 +1,73 @@
+-
+ id: 1000
+ lower_name: user1000
+ name: user1000
+ full_name: User Thousand
+ email: user1000@example.com
+ keep_email_private: false
+ email_notifications_preference: enabled
+ passwd: ZogKvWdyEx:password
+ passwd_hash_algo: dummy
+ must_change_password: false
+ login_source: 0
+ login_name: user1000
+ type: 0
+ salt: ZogKvWdyEx
+ max_repo_creation: -1
+ is_active: true
+ is_admin: false
+ is_restricted: false
+ allow_git_hook: false
+ allow_import_local: false
+ allow_create_organization: true
+ prohibit_login: false
+ avatar: avatar1000
+ avatar_email: user1000@example.com
+ use_custom_avatar: false
+ num_followers: 1
+ num_following: 1
+ num_stars: 0
+ num_repos: 0
+ num_teams: 0
+ num_members: 0
+ visibility: 0
+ repo_admin_change_team_access: false
+ theme: ""
+ keep_activity_private: false
+
+-
+ id: 1001
+ lower_name: user1001
+ name: user1001
+ full_name: User 1001
+ email: user1001@example.com
+ keep_email_private: false
+ email_notifications_preference: enabled
+ passwd: ZogKvWdyEx:password
+ passwd_hash_algo: dummy
+ must_change_password: false
+ login_source: 0
+ login_name: user1001
+ type: 0
+ salt: ZogKvWdyEx
+ max_repo_creation: -1
+ is_active: true
+ is_admin: false
+ is_restricted: false
+ allow_git_hook: false
+ allow_import_local: false
+ allow_create_organization: true
+ prohibit_login: false
+ avatar: avatar1001
+ avatar_email: user1001@example.com
+ use_custom_avatar: false
+ num_followers: 0
+ num_following: 0
+ num_stars: 0
+ num_repos: 1
+ num_teams: 0
+ num_members: 0
+ visibility: 0
+ repo_admin_change_team_access: false
+ theme: ""
+ keep_activity_private: false
diff --git a/tests/integration/fixtures/TestBlockActions/comment.yml b/tests/integration/fixtures/TestBlockActions/comment.yml
new file mode 100644
index 0000000..bf5bc34
--- /dev/null
+++ b/tests/integration/fixtures/TestBlockActions/comment.yml
@@ -0,0 +1,9 @@
+
+-
+ id: 1008
+ type: 0 # comment
+ poster_id: 2
+ issue_id: 4 # in repo_id 2
+ content: "comment in private pository"
+ created_unix: 946684811
+ updated_unix: 946684811
diff --git a/tests/integration/fixtures/TestBlockActions/issue.yml b/tests/integration/fixtures/TestBlockActions/issue.yml
new file mode 100644
index 0000000..f08ef54
--- /dev/null
+++ b/tests/integration/fixtures/TestBlockActions/issue.yml
@@ -0,0 +1,17 @@
+
+-
+ id: 1004
+ repo_id: 2
+ index: 1000
+ poster_id: 2
+ original_author_id: 0
+ name: issue1004
+ content: content for the 1000 fourth issue
+ milestone_id: 0
+ priority: 0
+ is_closed: true
+ is_pull: false
+ num_comments: 1
+ created_unix: 946684830
+ updated_unix: 978307200
+ is_locked: false
diff --git a/tests/integration/fixtures/TestBlockedNotifications/issue.yml b/tests/integration/fixtures/TestBlockedNotifications/issue.yml
new file mode 100644
index 0000000..9524e60
--- /dev/null
+++ b/tests/integration/fixtures/TestBlockedNotifications/issue.yml
@@ -0,0 +1,16 @@
+-
+ id: 1000
+ repo_id: 4
+ index: 1000
+ poster_id: 10
+ original_author_id: 0
+ name: issue for moderation
+ content: Hello there!
+ milestone_id: 0
+ priority: 0
+ is_closed: false
+ is_pull: false
+ num_comments: 0
+ created_unix: 1705939088
+ updated_unix: 1705939088
+ is_locked: false
diff --git a/tests/integration/fixtures/TestCommitRefComment/comment.yml b/tests/integration/fixtures/TestCommitRefComment/comment.yml
new file mode 100644
index 0000000..e2cfa0f
--- /dev/null
+++ b/tests/integration/fixtures/TestCommitRefComment/comment.yml
@@ -0,0 +1,17 @@
+-
+ id: 1000
+ type: 4 # commit ref
+ poster_id: 2
+ issue_id: 2 # in repo_id 2
+ content: 4a357436d925b5c974181ff12a994538ddc5a269
+ created_unix: 1706469348
+ updated_unix: 1706469348
+
+-
+ id: 1001
+ type: 4 # commit ref
+ poster_id: 2
+ issue_id: 1 # in repo_id 2
+ content: 4a357436d925b5c974181ff12a994538ddc5a269
+ created_unix: 1706469348
+ updated_unix: 1706469348
diff --git a/tests/integration/fixtures/TestGetContentHistory/issue_content_history.yml b/tests/integration/fixtures/TestGetContentHistory/issue_content_history.yml
new file mode 100644
index 0000000..6633b50
--- /dev/null
+++ b/tests/integration/fixtures/TestGetContentHistory/issue_content_history.yml
@@ -0,0 +1,17 @@
+-
+ id: 1
+ issue_id: 1
+ comment_id: 3
+ edited_unix: 1687612839
+ content_text: Original Text
+ is_first_created: true
+ is_deleted: false
+
+-
+ id: 2
+ issue_id: 1
+ comment_id: 3
+ edited_unix: 1687612840
+ content_text: "meh..." # This has to be consistent with comment.yml
+ is_first_created: false
+ is_deleted: false
diff --git a/tests/integration/fixtures/TestXSSReviewDismissed/comment.yml b/tests/integration/fixtures/TestXSSReviewDismissed/comment.yml
new file mode 100644
index 0000000..50162a4
--- /dev/null
+++ b/tests/integration/fixtures/TestXSSReviewDismissed/comment.yml
@@ -0,0 +1,9 @@
+-
+ id: 1000
+ type: 32 # dismiss review
+ poster_id: 2
+ issue_id: 2 # in repo_id 1
+ content: "XSS time!"
+ review_id: 1000
+ created_unix: 1700000000
+ updated_unix: 1700000000
diff --git a/tests/integration/fixtures/TestXSSReviewDismissed/review.yml b/tests/integration/fixtures/TestXSSReviewDismissed/review.yml
new file mode 100644
index 0000000..56bc08d
--- /dev/null
+++ b/tests/integration/fixtures/TestXSSReviewDismissed/review.yml
@@ -0,0 +1,8 @@
+-
+ id: 1000
+ type: 1
+ issue_id: 2
+ original_author: "Otto <script class='evil'>alert('Oh no!')</script>"
+ content: "XSS time!"
+ updated_unix: 1700000000
+ created_unix: 1700000000