NameLast commit messageLast commit date
..
fixturesfix: reduce deadlocks merging PRs by using caching for repo issue count stats (#9922)1 year ago
migration-testchore: rename 'migrations' to 'gitea_migrations'1 year ago
schemasverify nodeinfo response by schema (#22137)3 years ago
actions_commit_status_test.gochore(typo): s/Copyright 20124/Copyright 2024/1 year ago
actions_concurrency_group_queue_test.goperf: update concurrency group query to be index-capable for status (#9943)1 year ago
actions_job_test.gotest: Ensure jobs.<job_id>.runs-on works with vars (#9982)1 year ago
actions_log_test.gochore: use code.forgejo.org/forgejo/actions-proto (#9981)1 year ago
actions_notifications_test.gochore: remove branding from application run helper (#9640)1 year ago
actions_route_test.gochore: remove branding from application run helper (#9640)1 year ago
actions_run_now_done_notification_test.gochore: remove branding from application run helper (#9640)1 year ago
actions_runner_test.gochore: use code.forgejo.org/forgejo/actions-proto (#9981)1 year ago
actions_trigger_test.gochore: remove branding from application run helper (#9640)1 year ago
actions_trust_test.gofeat: UI for the pull request trust management panel1 year ago
actions_variables_test.gochore(test): cleanup NewRequest which no longer supply CSRF values (#10119)12 months ago
actions_view_test.gofeat: display detailed action run diagnostics (#9966)1 year ago
activitypub_client_test.gochore: remove branding from application run helper (#9640)1 year ago
admin_auth_source_test.gofeat: add option to allow non-local users to change usernames (#8714)1 year ago
admin_config_test.gochore: branding import path (#7337)1 year ago
admin_moderation_test.gofeat: Admin interface for abuse reports (#7905)1 year ago
admin_repo_test.gofix: admin repo page error on NumIssues (#9983)1 year ago
admin_user_test.gochore(test): cleanup NewRequest which no longer supply CSRF values (#10119)12 months ago
api_actions_artifact_test.gochore: refactor the web UI tests for the actions run1 year ago
api_actions_artifact_v4_test.gochore: refactor the web UI tests for the actions run1 year ago
api_activitypub_actor_test.gochore: remove branding from application run helper (#9640)1 year ago
api_activitypub_person_inbox_follow_test.gochore: remove branding from application run helper (#9640)1 year ago
api_activitypub_person_inbox_useractivity_test.gochore: remove branding from application run helper (#9640)1 year ago
api_activitypub_person_test.gochore: remove branding from application run helper (#9640)1 year ago
api_activitypub_repository_test.gochore: remove branding from application run helper (#9640)1 year ago
api_admin_actions_test.gofeat: return all pending jobs if labels parameter is absent (#9839)1 year ago
api_admin_org_test.gochore: branding import path (#7337)1 year ago
api_admin_test.gofix: garbage collect lingering actions logs (#10009)11 months ago
api_block_test.gochore: sort blocked users list for determistic results (#8320)1 year ago
api_branch_test.gochore: remove branding from application run helper (#9640)1 year ago
api_comment_attachment_test.gofix(api): deactivate issue api for disabled or external issue-tracker (#8829)1 year ago
api_comment_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_federation_httpsig_test.gochore: remove branding from application run helper (#9640)1 year ago
api_feed_plain_text_titles_test.gochore: branding import path (#7337)1 year ago
api_forgejo_root_test.gochore: branding import path (#7337)1 year ago
api_forgejo_version_test.gofix: /api/forgejo/v1/version Content-Type error (#9897)1 year ago
api_fork_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_gitignore_templates_test.gochore: branding import path (#7337)1 year ago
api_gpg_keys_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_health_test.gochore: branding import path (#7337)1 year ago
api_helper_for_declarative_test.gofix: make API /repos/{owner}/{repo}/compare/{basehead} work with forks (#8326)1 year ago
api_httpsig_test.gofeat: replace cross origin protection (#9830)1 year ago
api_issue_attachment_test.gofix(api): deactivate issue api for disabled or external issue-tracker (#8829)1 year ago
api_issue_config_test.gofeat: search in the `docs` directory for issue and pull request templates (#8863)1 year ago
api_issue_label_test.gochore: unify the usage of `CryptoRandomString` (#10110)12 months ago
api_issue_milestone_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_issue_pin_test.gochore: branding import path (#7337)1 year ago
api_issue_reaction_test.gochore: branding import path (#7337)1 year ago
api_issue_stopwatch_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_issue_subscription_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_issue_templates_test.gochore: remove branding from application run helper (#9640)1 year ago
api_issue_test.gofix: reduce deadlocks merging PRs by using caching for repo issue count stats (#9922)1 year ago
api_issue_tracked_time_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_keys_test.gochore: branding import path (#7337)1 year ago
api_label_templates_test.gochore: branding import path (#7337)1 year ago
api_license_templates_test.gochore: branding import path (#7337)1 year ago
api_misc_test.gofeat(sec): Add SSH signing support for instances (#6897)1 year ago
api_nodeinfo_test.gochore: branding import path (#7337)1 year ago
api_notification_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_oauth2_apps_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_org_actions_test.gofeat: return all pending jobs if labels parameter is absent (#9839)1 year ago
api_org_avatar_test.gochore: branding import path (#7337)1 year ago
api_org_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_org_variables_test.gofix: include variable values in /repos/.../actions/variables API response (#10036)1 year ago
api_packages_alpine_test.gochore: branding import path (#7337)1 year ago
api_packages_alt_test.gofix(alt): handle package names with dots in ALT repository (#9763)1 year ago
api_packages_arch_test.gochore: branding import path (#7337)1 year ago
api_packages_cargo_test.gochore(test): cleanup NewRequest which no longer supply CSRF values (#10119)12 months ago
api_packages_chef_test.gochore: branding import path (#7337)1 year ago
api_packages_composer_test.gochore: branding import path (#7337)1 year ago
api_packages_conan_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_packages_conda_test.gochore: branding import path (#7337)1 year ago
api_packages_container_cleanup_sha256_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_packages_container_test.gofeat: replace cross origin protection (#9830)1 year ago
api_packages_cran_test.gochore: branding import path (#7337)1 year ago
api_packages_debian_test.gofeat: replace cross origin protection (#9830)1 year ago
api_packages_generic_test.gochore: branding import path (#7337)1 year ago
api_packages_goproxy_test.gochore: QoL improvements to tests (#7917)1 year ago
api_packages_helm_test.gochore: replace gopkg.in/yaml.v3 with go.yaml.in/yaml/v3 (#8956)1 year ago
api_packages_maven_test.gofix: maven use groupId:artifactId for package name concatenation (#6352)1 year ago
api_packages_npm_test.gochore: branding import path (#7337)1 year ago
api_packages_nuget_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_packages_pub_test.gochore: branding import path (#7337)1 year ago
api_packages_pypi_test.gochore: branding import path (#7337)1 year ago
api_packages_rpm_test.gofeat: replace go-rpmutils library with our own (#7953)1 year ago
api_packages_rubygems_test.gochore: branding import path (#7337)1 year ago
api_packages_swift_test.gofix linting1 year ago
api_packages_test.gofix: package cleaned rule fails if the keep count is too high (#9468)1 year ago
api_packages_vagrant_test.gochore: branding import path (#7337)1 year ago
api_private_serv_test.gochore: remove branding from application run helper (#9640)1 year ago
api_pull_commits_test.gochore: branding import path (#7337)1 year ago
api_pull_review_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_pull_test.gofeat: replace cross origin protection (#9830)1 year ago
api_push_mirror_test.gochore: remove branding from application run helper (#9640)1 year ago
api_quota_management_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_quota_use_test.gochore: remove branding from application run helper (#9640)1 year ago
api_releases_test.gofeat: make upload URL compatible with GitHub API (#9285)1 year ago
api_repo_actions_test.gofeat: return all pending jobs if labels parameter is absent (#9839)1 year ago
api_repo_activities_test.gochore: branding import path (#7337)1 year ago
api_repo_archive_test.gotest: compare file list instead of byte length in gzipped repo archive test (#10161)11 months ago
api_repo_avatar_test.gochore: branding import path (#7337)1 year ago
api_repo_branch_test.gochore: remove branding from application run helper (#9640)1 year ago
api_repo_collaborator_test.gochore: remove branding from application run helper (#9640)1 year ago
api_repo_compare_test.gochore: remove branding from application run helper (#9640)1 year ago
api_repo_convert_test.gofeat: Add converting mirror repos to normal to the API (#8932)1 year ago
api_repo_edit_test.gofix: validate input for default_{merge,update}_style (#7395)1 year ago
api_repo_file_create_test.gochore: remove branding from application run helper (#9640)1 year ago
api_repo_file_delete_test.gochore: remove branding from application run helper (#9640)1 year ago
api_repo_file_get_test.gochore: remove branding from application run helper (#9640)1 year ago
api_repo_file_helpers.goAPI: enforce sha requirement on `POST /repos/{owner}/{repo}/contents` (#8139)1 year ago
api_repo_file_update_test.gochore: remove branding from application run helper (#9640)1 year ago
api_repo_files_change_test.gochore: remove branding from application run helper (#9640)1 year ago
api_repo_get_contents_list_test.gochore: remove branding from application run helper (#9640)1 year ago
api_repo_get_contents_test.gochore: remove branding from application run helper (#9640)1 year ago
api_repo_git_blobs_test.goapi: GitBlob consistent naming1 year ago
api_repo_git_commits_test.gofix: correctly get stats for API commits (#8756)1 year ago
api_repo_git_hook_test.gochore: branding import path (#7337)1 year ago
api_repo_git_notes_test.gochore: remove branding from application run helper (#9640)1 year ago
api_repo_git_ref_test.gochore: branding import path (#7337)1 year ago
api_repo_git_tags_test.gochore: branding import path (#7337)1 year ago
api_repo_git_trees_test.gochore: branding import path (#7337)1 year ago
api_repo_hook_test.gochore: branding import path (#7337)1 year ago
api_repo_languages_test.gofeat: replace cross origin protection (#9830)1 year ago
api_repo_lfs_locks_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_repo_lfs_migrate_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_repo_lfs_test.gofix: make API /repos/{owner}/{repo}/compare/{basehead} work with forks (#8326)1 year ago
api_repo_pulls_test.gochore: use correct import (#7371)1 year ago
api_repo_raw_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_repo_secrets_test.gochore: branding import path (#7337)1 year ago
api_repo_tags_test.gofix(api): set default pagination and Link header for `repoListTags` (#9201)1 year ago
api_repo_teams_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_repo_test.gochore: remove branding from application run helper (#9640)1 year ago
api_repo_topic_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_repo_variables_test.gofix: include variable values in /repos/.../actions/variables API response (#10036)1 year ago
api_settings_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_team_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_team_user_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
api_token_test.gofeat: replace cross origin protection (#9830)1 year ago
api_twofa_test.gofeat: Global 2FA enforcement (#8753)1 year ago
api_user_actions_test.gofeat: return all pending jobs if labels parameter is absent (#9839)1 year ago
api_user_avatar_test.gochore: branding import path (#7337)1 year ago
api_user_email_test.gofeat: Add admin individual user email management endpoints (#9594)1 year ago
api_user_follow_test.gochore: branding import path (#7337)1 year ago
api_user_heatmap_test.gochore: branding import path (#7337)1 year ago
api_user_info_test.gochore: branding import path (#7337)1 year ago
api_user_org_perm_test.gochore: branding import path (#7337)1 year ago
api_user_orgs_test.gochore: branding import path (#7337)1 year ago
api_user_search_test.gofeat: add sort parameter for users/search api endpoint (#8594)1 year ago
api_user_secrets_test.gochore: branding import path (#7337)1 year ago
api_user_star_test.gochore: branding import path (#7337)1 year ago
api_user_variables_test.gofix: include variable values in /repos/.../actions/variables API response (#10036)1 year ago
api_user_watch_test.gochore: branding import path (#7337)1 year ago
api_wiki_test.gochore: remove branding from application run helper (#9640)1 year ago
appearance_settings_test.gofeat: replace cross origin protection (#9830)1 year ago
archived_labels_display_test.gofeat: replace cross origin protection (#9830)1 year ago
attachment_test.gofeat: replace cross origin protection (#9830)1 year ago
auth_ldap_test.gofeat: replace cross origin protection (#9830)1 year ago
auth_token_test.gofeat: replace cross origin protection (#9830)1 year ago
avatar.pngAdd API for changing Avatars (#25369)3 years ago
benchmarks_test.gochore: remove branding from application run helper (#9640)1 year ago
block_test.gofeat: replace cross origin protection (#9830)1 year ago
branches_test.gochore(test): cleanup NewRequest which no longer supply CSRF values (#10119)12 months ago
change_default_branch_test.gofeat: replace cross origin protection (#9830)1 year ago
cmd_admin_test.gotest: introduce TruncateBeansCascade test helper to support data cleanup of foreign-key referenced tables (#9684)1 year ago
cmd_forgejo_actions_test.gochore: remove branding from application run helper (#9640)1 year ago
cmd_forgejo_f3_test.gochore(upgrade): urfave/cli from v2 to v3 (#8035)1 year ago
cmd_keys_test.gochore: remove branding from application run helper (#9640)1 year ago
codeowner_test.gofeat: replace cross origin protection (#9830)1 year ago
comment_roles_system_test.gochore: merge tests.AddFixtures and unittest.OverrideFixtures (#7648)1 year ago
comment_roles_test.gofeat: replace cross origin protection (#9830)1 year ago
commit_status_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
common_navigation_test.gofeat(ui): JS-less dropdowns in navbar (#10025)12 months ago
compare_test.gochore: remove branding from application run helper (#9640)1 year ago
cors_test.gochore: branding import path (#7337)1 year ago
create_no_session_test.gofeat: replace cross origin protection (#9830)1 year ago
csrf_test.gofeat: replace cross origin protection (#9830)1 year ago
db_collation_test.gochore: use eventually for mysql collation test (#8301)1 year ago
delete_user_test.gochore(test): cleanup NewRequest which no longer supply CSRF values (#10119)12 months ago
devtest_error_test.gofeat: Global 2FA enforcement (#8753)1 year ago
disable_forgotten_password_test.gochore: branding import path (#7337)1 year ago
doctor_packages_nuget_test.gochore: branding import path (#7337)1 year ago
download_test.gochore: branding import path (#7337)1 year ago
dummy_lang_test.gochore: branding import path (#7337)1 year ago
dump_restore_test.gochore: remove branding from application run helper (#9640)1 year ago
easymde_test.gochore: branding import path (#7337)1 year ago
editor_test.gofeat: replace cross origin protection (#9830)1 year ago
email_block_allowlist_test.gochore: add email blocklist unit test1 year ago
empty_repo_test.gofeat: replace cross origin protection (#9830)1 year ago
eventsource_test.gochore: branding import path (#7337)1 year ago
explore_code_test.gochore: branding import path (#7337)1 year ago
explore_org_test.gofeat(ui): allow dropdown to contain not just items (#9951)1 year ago
explore_repos_test.gochore(test): cleanup NewRequest which no longer supply CSRF values (#10119)12 months ago
explore_user_test.gofeat(ui): allow dropdown to contain not just items (#9951)1 year ago
feed_repo_test.goUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>1 year ago
feed_user_test.gofix: prevent user-entered text with | characters from being truncated in activity feed (#8844)1 year ago
forgejo_confirmation_repo_test.gofeat: replace cross origin protection (#9830)1 year ago
README.mdchore(docs): add instructions to run S3 tests locally (#8895)1 year 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 -e POSTGRESQL_FSYNC=off -e POSTGRESQL_EXTRA_FLAGS="-c full_page_writes=off" -p 5432:5432 --rm --name pgsql data.forgejo.org/oci/bitnami/postgresql:16 #(Ctrl-c to stop)

Setup a S3 server inside docker

docker run -e MINIO_ROOT_USER=123456 -e MINIO_ROOT_PASSWORD=12345678 -p 9000:9000 --rm --name minio data.forgejo.org/oci/bitnami/minio:2024.8.17 #(Ctrl-c to stop)

Start tests based on the database container

TEST_PGSQL_HOST=localhost:5432 TEST_PGSQL_DBNAME=test TEST_PGSQL_USERNAME=postgres TEST_PGSQL_PASSWORD=postgres TEST_S3_HOST=localhost:9000 make 'test-pgsql#Test'

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.