0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-23 07:43:18 -05:00
forgejo/tests
Gergely Nagy 13892121e6
tests: Refactor CreateDeclarativeRepo
Lets introduce a new helper function,
`CreateDeclarativeRepoWithOptions`! This is almost the same as the
existing `CreateDeclarativeRepo` helper, but instead of taking a list of
random parameters the author thought of at the time of its introduction,
it takes a `DeclarativeRepoOptions` struct, with optional members.

This makes it easier to extend the function, as new members can be added
without breaking or having to update existing callsites, as long as the
newly added members default to compatible values.

`CreateDeclarativeRepo` is then reimplemented on top of the new
function. Callsites aren't updated yet, we can do that organically,
whenever touching code that uses the older function.

No new functionality is introduced just yet, this is merely a refactor.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-05-01 13:29:21 +02:00
..
e2e Fixes that the settings button moves in the overflow menu 2024-04-29 10:54:39 +00:00
fuzz
gitea-lfs-meta
gitea-repositories-meta Allow non-admin users to delete review requests (#29057) 2024-02-26 22:30:27 +01:00
integration tests: Refactor CreateDeclarativeRepo 2024-05-01 13:29:21 +02:00
testdata/data/attachments/a/0
mssql.ini.tmpl
mysql.ini.tmpl
pgsql.ini.tmpl
sqlite.ini.tmpl [TESTS] increase test-sqlite log level to Trace 2024-02-05 14:44:33 +01:00
test_utils.go fix(tests): 30s to cancel processes to avoid false negatives 2024-04-19 17:04:53 +02:00