1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-09 03:57:19 +00:00

Add some tests to clarify the "must-change-password" behavior (#30693)

Follow  #30472:

When a user is created by command line `./gitea admin user create`:

Old behavior before #30472: the first user (admin or non-admin) doesn't
need to change password.

Revert to the old behavior before #30472
This commit is contained in:
wxiaoguang
2024-04-27 20:23:37 +08:00
committed by GitHub
parent dd301cae1c
commit d3cdef88ad
9 changed files with 81 additions and 17 deletions

View File

@ -46,7 +46,6 @@ func InitTest(requireGitea bool) {
// TODO: Speedup tests that rely on the event source ticker, confirm whether there is any bug or failure.
// setting.UI.Notification.EventSourceUpdateTime = time.Second
setting.IsInTesting = true
setting.AppWorkPath = giteaRoot
setting.CustomPath = filepath.Join(setting.AppWorkPath, "custom")
if requireGitea {