PR: https://github.com/go-gitea/gitea/pull/18621
The tests were refactored so that all YAML files content are checked, unless an exception is set (for instance for the Updated field which is automatically updated by the database and cannot be expected to be identical over a dump/restore/dump round.
This approach helps catch more errors where fields are added in the migration files because they do not need to be added to the tests to be verified.
It also helps as a reminder of what is left to be implemented, such as the the Assignees field in issues.
A helper is added to keep the tests DRY and facilitate their maintenance.