NameLast commit messageLast commit date
..
fixtures[v11.0/forgejo] fix: don't allow credentials in migrate/push mirror URL (#9065)1 year ago
migration-test[v11.0/forgejo] chore: branding import path (#7354)1 year ago
schemasverify nodeinfo response by schema (#22137)3 years ago
actions_commit_status_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
actions_job_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
actions_log_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
actions_route_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
actions_runner_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
actions_trigger_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
actions_variables_test.go[v11.0/forgejo] chore: merge tests.AddFixtures and unittest.OverrideFixtures (#7649)1 year ago
admin_config_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
admin_user_test.go[v11.0/forgejo] chore: merge tests.AddFixtures and unittest.OverrideFixtures (#7649)1 year ago
api_actions_artifact_test.go[v11.0/forgejo] fix(test): TestActionsArtifactOverwrite needs ordered query for pgsql (#8848)1 year ago
api_actions_artifact_v4_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_activitypub_actor_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_activitypub_person_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_activitypub_repository_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_admin_actions_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_admin_org_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_admin_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_block_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_branch_test.go[v11.0/forgejo] fix: make API /repos/{owner}/{repo}/compare/{basehead} work with forks (#8333)1 year ago
api_comment_attachment_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_comment_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_feed_plain_text_titles_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_forgejo_root_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_forgejo_version_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_fork_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_gitignore_templates_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_gpg_keys_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_health_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_helper_for_declarative_test.go[v11.0/forgejo] fix: make API /repos/{owner}/{repo}/compare/{basehead} work with forks (#8333)1 year ago
api_httpsig_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_issue_attachment_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_issue_config_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_issue_label_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_issue_milestone_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_issue_pin_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_issue_reaction_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_issue_stopwatch_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_issue_subscription_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_issue_templates_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_issue_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_issue_tracked_time_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_keys_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_label_templates_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_license_templates_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_nodeinfo_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_notification_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_oauth2_apps_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_org_actions_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_org_avatar_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_org_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_alpine_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_alt_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_arch_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_cargo_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_chef_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_composer_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_conan_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_conda_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_container_cleanup_sha256_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_container_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_cran_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_debian_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_generic_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_goproxy_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_helm_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_maven_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_npm_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_nuget_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_pub_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_pypi_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_rpm_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_rubygems_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_swift_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_packages_test.go[v11.0/forgejo] fix: package cleaned rule fails if the keep count is too high (#9469)1 year ago
api_packages_vagrant_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_private_serv_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_pull_commits_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_pull_review_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_pull_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_push_mirror_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_quota_management_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_quota_use_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_releases_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_actions_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_activities_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_archive_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_avatar_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_branch_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_collaborator_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_compare_test.go[v11.0/forgejo] fix: make API /repos/{owner}/{repo}/compare/{basehead} work with forks (#8333)1 year ago
api_repo_edit_test.go[v11.0/forgejo] fix: validate input for default_{merge,update}_style (#7401)1 year ago
api_repo_file_create_test.go[v11.0/forgejo] fix: make API /repos/{owner}/{repo}/compare/{basehead} work with forks (#8333)1 year ago
api_repo_file_delete_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_file_get_test.go[v11.0/forgejo] fix: make API /repos/{owner}/{repo}/compare/{basehead} work with forks (#8333)1 year ago
api_repo_file_helpers.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_file_update_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_files_change_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_get_contents_list_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_get_contents_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_git_blobs_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_git_commits_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_git_hook_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_git_notes_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_git_ref_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_git_tags_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_git_trees_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_hook_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_languages_test.go[GITEA] Allow user to select email for file operations in Web UI2 years ago
api_repo_lfs_locks_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_lfs_migrate_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_lfs_test.go[v11.0/forgejo] fix: make API /repos/{owner}/{repo}/compare/{basehead} work with forks (#8333)1 year ago
api_repo_pulls_test.go[v11.0/forgejo] fix(api): encode empty requested reviewers as an empty array (#7365)1 year ago
api_repo_raw_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_secrets_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_tags_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_teams_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_test.go[v11.0/forgejo] fix: make API /repos/{owner}/{repo}/compare/{basehead} work with forks (#8333)1 year ago
api_repo_topic_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_repo_variables_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_settings_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_team_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_team_user_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_token_test.go[v11.0/forgejo] fix: require password login for creation of new token (#9079)1 year ago
api_twofa_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_user_actions_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_user_avatar_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_user_email_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_user_follow_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_user_heatmap_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_user_info_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_user_org_perm_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_user_orgs_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_user_search_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_user_secrets_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_user_star_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_user_variables_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_user_watch_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
api_wiki_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
appearance_settings_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
archived_labels_display_test.goAdd integration test for (non-)archived label properties2 years ago
attachment_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
auth_ldap_test.go[v11.0/forgejo] fix: upgrade to the ldap version used for testing to 2.5 (#9418)1 year ago
auth_token_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
avatar.pngAdd API for changing Avatars (#25369)3 years ago
benchmarks_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
block_test.go[v11.0/forgejo] chore: merge tests.AddFixtures and unittest.OverrideFixtures (#7649)1 year ago
branches_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
change_default_branch_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
cmd_admin_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
cmd_forgejo_actions_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
cmd_forgejo_f3_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
cmd_keys_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
codeowner_test.go[v11.0/forgejo] fix: use credentials helpers for git clones (#9069)1 year ago
comment_roles_system_test.go[v11.0/forgejo] chore: merge tests.AddFixtures and unittest.OverrideFixtures (#7649)1 year ago
comment_roles_test.gofix(commenter roles): don't give system users roles (#6766)1 year ago
commit_status_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
compare_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
cors_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
create_no_session_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
csrf_test.go[v11.0/forgejo] fix: validate CSRF on non-safe methods (#9081)1 year ago
db_collation_test.go[v11.0/forgejo] chore: use eventually for mysql collation test (#8517)1 year ago
delete_user_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
disable_forgotten_password_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
doctor_packages_nuget_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
download_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
dummy_lang_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
dump_restore_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
easymde_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
editor_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
empty_repo_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
eventsource_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
explore_code_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
explore_org_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
explore_repos_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
explore_user_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
feed_repo_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
feed_user_test.go[v11.0/forgejo] chore: merge tests.AddFixtures and unittest.OverrideFixtures (#7649)1 year ago
forgejo_confirmation_repo_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
forgejo_git_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
git_helper_for_declarative_test.go[v11.0/forgejo] fix: use credentials helpers for git clones (#9069)1 year ago
git_push_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
git_smart_http_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
git_test.go[v11.0/forgejo] fix: make API /repos/{owner}/{repo}/compare/{basehead} work with forks (#8333)1 year ago
goget_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
gpg_git_test.go[v11.0/forgejo] fix: make API /repos/{owner}/{repo}/compare/{basehead} work with forks (#8333)1 year ago
html_helper.go[v11.0/forgejo] fix: package cleanup rules are not applied when there are more than 200 packages (depends on `MAX_RESPONSE_ITEMS`) (#9219) (#9232)1 year ago
incoming_email_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
integration_test.go[v11.0/forgejo] chore: sort mailer messages in test assertion (#8292)1 year ago
issue_subscribe_test.goDisable issue subscribe button for guest users (#4095)2 years ago
issue_test.go[v11.0/forgejo] chore: merge tests.AddFixtures and unittest.OverrideFixtures (#7649)1 year ago
last_updated_time_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
lfs_getobject_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
lfs_local_endpoint_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
lfs_view_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
linguist_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
links_test.go[v11.0/forgejo] chore: branding import path (#7354)1 year ago
README.mdchore: improve database docker instructions2 years ago
README.md

Integration tests

Thank you for your effort to provide good software tests for Forgejo. Please also read the general testing instructions in the Forgejo contributor documentation.

This file is meant to provide specific information for the integration tests as well as some tips and tricks you should know.

Feel free to extend this file with more instructions if you feel like you have something to share!

How to run the tests?

Before running any tests, please ensure you perform a clean build:

make clean build

Integration tests can be run with make commands for the appropriate backends, namely:

make test-sqlite
make test-pgsql
make test-mysql

Run tests via local forgejo runner

If you have a forgejo runner, you can use it to run the test jobs:

Run all jobs

forgejo-runner exec -W .forgejo/workflows/testing.yml --event=pull_request

Warning: This file defines many jobs, so it will be resource-intensive and therefore not recommended.

Run single job

forgejo-runner exec -W .forgejo/workflows/testing.yml --event=pull_request -j <job_name>

You can list all job names via:

forgejo-runner exec -W .forgejo/workflows/testing.yml --event=pull_request -l

Run sqlite integration tests

Start tests

make test-sqlite

Run MySQL integration tests

Setup a MySQL database inside docker

docker run -e MYSQL_DATABASE=test -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -p 3306:3306 --rm --name mysql mysql:latest #(Ctrl-c to stop the database)

Start tests based on the database container

TEST_MYSQL_HOST=localhost:3306 TEST_MYSQL_DBNAME=test?multiStatements=true TEST_MYSQL_USERNAME=root TEST_MYSQL_PASSWORD='' make test-mysql

Run pgsql integration tests

Setup a pgsql database inside docker

docker run -e "POSTGRES_DB=test" -e POSTGRES_PASSWORD=postgres -p 5432:5432 --rm --name pgsql postgres:latest #(Ctrl-c to stop the database)

Start tests based on the database container

TEST_STORAGE_TYPE=local TEST_PGSQL_HOST=localhost:5432 TEST_PGSQL_DBNAME=test TEST_PGSQL_USERNAME=postgres TEST_PGSQL_PASSWORD=postgres make test-pgsql

Running individual tests

Example command to run GPG test:

For SQLite:

make test-sqlite#GPG

For other databases (replace mysql to pgsql):

TEST_MYSQL_HOST=localhost:1433 TEST_MYSQL_DBNAME=test TEST_MYSQL_USERNAME=sa TEST_MYSQL_PASSWORD=MwantsaSecurePassword1 make test-mysql#GPG

Setting timeouts for declaring long-tests and long-flushes

We appreciate that some testing machines may not be very powerful and the default timeouts for declaring a slow test or a slow clean-up flush may not be appropriate.

You can either:

  • Within the test ini file set the following section:
[integration-tests]
SLOW_TEST = 10s ; 10s is the default value
SLOW_FLUSH = 5S ; 5s is the default value
  • Set the following environment variables:
GITEA_SLOW_TEST_TIME="10s" GITEA_SLOW_FLUSH_TIME="5s" make test-sqlite

Tips and tricks

If you know noteworthy tests that can act as an inspiration for new tests, please add some details here.