Julian 4a685f8b87 Add rebase with merge commit merge style (#3844) (#4052) 2 weeks ago
..
gitea-repositories-meta bf55276189 Fix redirect with non-ascii branch names (#4764) (#4810) 4 months ago
README.md 4090204944 CN translation of README (#5050) 3 months ago
README_ZH.md 4090204944 CN translation of README (#5050) 3 months ago
api_admin_test.go 7096085f2b Fix #5226 by adding CSRF checking to api reqToken and add CSRF to the POST header for deadline (#5250) 2 months ago
api_branch_test.go e47df0b301 Enforce token on api routes [fixed critical security issue #4357] (#4840) 4 months ago
api_comment_test.go e47df0b301 Enforce token on api routes [fixed critical security issue #4357] (#4840) 4 months ago
api_fork_test.go 93a1de4842 Fix repo API bug (#2133) 1 year ago
api_gpg_keys_test.go e47df0b301 Enforce token on api routes [fixed critical security issue #4357] (#4840) 4 months ago
api_issue_label_test.go e47df0b301 Enforce token on api routes [fixed critical security issue #4357] (#4840) 4 months ago
api_issue_test.go ea20adaa84 feat(repo): support search repository by topic name (#4505) 4 months ago
api_keys_test.go 00533d3870 Keys API changes (#4960) 2 months ago
api_org_test.go 8ef177f8c5 add api for user to create org (#5268) 1 month ago
api_pull_test.go e47df0b301 Enforce token on api routes [fixed critical security issue #4357] (#4840) 4 months ago
api_releases_test.go e47df0b301 Enforce token on api routes [fixed critical security issue #4357] (#4840) 4 months ago
api_repo_git_ref_test.go 08bf443016 Implement git refs API for listing references (branches, tags and other) (#5354) 1 month ago
api_repo_lfs_locks_test.go 9e842c8a72 Fix SSH auth lfs locks (#3152) 11 months ago
api_repo_raw_test.go e47df0b301 Enforce token on api routes [fixed critical security issue #4357] (#4840) 4 months ago
api_repo_test.go eabbddcd98 Restrict permission check on repositories and fix some problems (#5314) 1 month ago
api_team_test.go e47df0b301 Enforce token on api routes [fixed critical security issue #4357] (#4840) 4 months ago
api_token_test.go ab55ca7ebd Add ability to delete a token (#4235) 6 months ago
api_user_heatmap_test.go 6759237eda User action heatmap (#5131) 2 months ago
api_user_orgs_test.go da5a0b8382 add tests for api user orgs (#5494) 1 month ago
auth_ldap_test.go 22ad514297 Fix issue where ecdsa and other key types are not synced from LDAP (#5092) (#5094) 2 months ago
bare_repo_test.go fd45a032a7 Fix bare-repo bugs (#2199) 1 year ago
benchmarks_test.go 9a33798b30 Fix type mismatch of format string (#5574) 3 weeks ago
branches_test.go e59adcde65 Use httptest in integration tests (#3080) 1 year ago
change_default_branch_test.go f1adaef458 Less verbose integration tests (#2123) 1 year ago
delete_user_test.go 099372d76c Refactor User Settings (#3900) 8 months ago
download_test.go e08c7e521b Add raw blob endpoint to get objects by SHA ID (#5334) 1 month ago
editor_test.go bac6d05e78 Improve English grammar and consistency. (#3614) 9 months ago
explore_repos_test.go aec826b023 fix template error on explore repos (#2319) 1 year ago
git_test.go 7096085f2b Fix #5226 by adding CSRF checking to api reqToken and add CSRF to the POST header for deadline (#5250) 2 months ago
html_helper.go e59adcde65 Use httptest in integration tests (#3080) 1 year ago
integration_test.go 7fd34c0517 fix lfs version check warning log when using ssh protocol (#5501) 4 weeks ago
internal_test.go e59adcde65 Use httptest in integration tests (#3080) 1 year ago
issue_test.go befa7445d2 Unit tests for routers/repo/issue_label (#3198) 1 year ago
links_test.go 099372d76c Refactor User Settings (#3900) 8 months ago
mssql.ini.tmpl 6db7dbd333 Added test environment for mssql (#4282) 1 month ago
mysql.ini.tmpl 095fb9f2e3 Add integrations tests from git cli (#3377) 1 year ago
nonascii_branches_test.go bf55276189 Fix redirect with non-ascii branch names (#4764) (#4810) 4 months ago
pgsql.ini.tmpl 095fb9f2e3 Add integrations tests from git cli (#3377) 1 year ago
pull_compare_test.go 3d3faa2624 Responsive view (#2750) 1 year ago
pull_create_test.go ae30315a62 Fix escaping changed title in comments (#3530) 11 months ago
pull_merge_test.go 4a685f8b87 Add rebase with merge commit merge style (#3844) (#4052) 2 weeks ago
release_test.go befa7445d2 Unit tests for routers/repo/issue_label (#3198) 1 year ago
repo_activity_test.go ae30315a62 Fix escaping changed title in comments (#3530) 11 months ago
repo_branch_test.go cc7b8e3379 Add more bench (#3161) 1 year ago
repo_commits_test.go e47df0b301 Enforce token on api routes [fixed critical security issue #4357] (#4840) 4 months ago
repo_fork_test.go e59adcde65 Use httptest in integration tests (#3080) 1 year ago
repo_migrate_test.go cc7b8e3379 Add more bench (#3161) 1 year ago
repo_search_test.go 5866eb2321 Code/repo search (#2582) 1 year ago
repo_test.go 85d14cc229 Symlink icons (#1416) (#3826) 8 months ago
setting_test.go adba2ad609 fix not respecting landing page setting (#4209) 7 months ago
signin_test.go 8aadf79f80 Add integration tests for signin (#2363) 1 year ago
signout_test.go 5abd1d2a68 Add integration test for logging out (#2892) 1 year ago
signup_test.go f1adaef458 Less verbose integration tests (#2123) 1 year ago
sqlite.ini 095fb9f2e3 Add integrations tests from git cli (#3377) 1 year ago
timetracking_test.go befa7445d2 Unit tests for routers/repo/issue_label (#3198) 1 year ago
user_test.go 1fdf560678 Added user language setting (#3875) 8 months ago
version_test.go a4cd4616c6 Update hard-coded version to 1.3.0-dev (#2390) 1 year ago
xss_test.go 1fdf560678 Added user language setting (#3875) 8 months ago

README.md

Integrations tests

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

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

Make sure to perform a clean build before running tests:

make clean build

Run all tests via local drone

drone exec --local --build-event "pull_request"

Run sqlite integrations tests

Start tests

make test-sqlite

Run mysql integrations tests

Setup a mysql database inside docker

docker run -e "MYSQL_DATABASE=test" -e "MYSQL_ALLOW_EMPTY_PASSWORD=yes" --rm --name mysql mysql:5.7 #(just ctrl-c to stop db and clean the container) 

Start tests based on the database container

TEST_MYSQL_HOST="$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mysql):3306" TEST_MYSQL_DBNAME=test TEST_MYSQL_USERNAME=root TEST_MYSQL_PASSWORD='' make test-mysql

Run pgsql integrations tests

Setup a pgsql database inside docker

docker run -e "POSTGRES_DB=test" --rm --name pgsql postgres:9.5 #(just ctrl-c to stop db and clean the container) 

Start tests based on the database container

TEST_PGSQL_HOST=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' pgsql) TEST_PGSQL_DBNAME=test TEST_PGSQL_USERNAME=postgres TEST_PGSQL_PASSWORD=postgres make test-pgsql

Running individual tests

Example command to run GPG test with sqlite backend:

go test -c code.gitea.io/gitea/integrations \
  -o integrations.sqlite.test -tags 'sqlite' &&
  GITEA_ROOT="$GOPATH/src/code.gitea.io/gitea" \
  GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test \
  -test.v -test.run GPG