forgejo/tests
Gusted 85505e0f81
[MODERATION] Refactor integration testing (squash)
- Motivation for this PR is that I'd noticed that a lot of repeated
calls are happening between the test functions and that certain tests
weren't using helper functions like `GetCSRF`, therefor this refactor of
the integration tests to keep it: clean, small and hopefully more
maintainable and understandable.
- There are now three integration tests: `TestBlockUser`,
`TestBlockUserFromOrganization` and `TestBlockActions` (and has been
moved in that order in the source code).
- `TestBlockUser` is for doing blocking related actions as an user and
`TestBlockUserFromOrganization` as an organisation, even though they
execute the same kind of tests they do not share any database calls or
logic and therefor it currently doesn't make sense to merge them
together (hopefully such oppurtinutiy might be presented in the future).
- `TestBlockActions` now contain all tests for actions that should be
blocked after blocking has happened, most tests now share the same doer
and blocked users and a extra fixture has been added to make this
possible for the comment test.
- Less code, more comments and more re-use between tests.

(cherry picked from commit ffb393213d)
2023-08-29 10:03:39 +02:00
..
e2e Update minimum password length requirements (#25946) 2023-08-21 19:27:50 +00:00
fuzz Move fuzz tests into tests/fuzz (#22376) 2023-01-09 15:30:14 +08:00
gitea-lfs-meta Test views of LFS files (#22196) 2022-12-23 07:41:56 +08:00
gitea-repositories-meta Add commits dropdown in PR files view and allow commit by commit review (#25528) 2023-07-28 21:18:12 +02:00
integration [MODERATION] Refactor integration testing (squash) 2023-08-29 10:03:39 +02:00
mssql.ini.tmpl [CI] set PASSWORD_HASH_ALGO = argon2 for integration tests 2023-08-29 08:22:03 +02:00
mysql.ini.tmpl [CI] set PASSWORD_HASH_ALGO = argon2 for integration tests 2023-08-29 08:22:03 +02:00
mysql8.ini.tmpl [CI] set PASSWORD_HASH_ALGO = argon2 for integration tests 2023-08-29 08:22:03 +02:00
pgsql.ini.tmpl [CI] set PASSWORD_HASH_ALGO = argon2 for integration tests 2023-08-29 08:22:03 +02:00
sqlite.ini.tmpl [TESTS] increase test-sqlite log level to Trace 2023-08-29 08:47:10 +02:00
test_utils.go Refactor tests (#26464) 2023-08-12 16:30:16 +00:00