mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-02-19 03:47:49 -05:00
- Create `modules/testimport/import.go` to centralize blank import needed for tests (in order to run the `init` function) to simplify maintenance. - Remove the imports that are not needed. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10662 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: limiting-factor <limiting-factor@posteo.com> Co-committed-by: limiting-factor <limiting-factor@posteo.com>
17 lines
535 B
Go
17 lines
535 B
Go
// Copyright 2026 The Forgejo Authors
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package testimport
|
|
|
|
// ensure the init() function of those modules are called in a test
|
|
// environment that may not include them. It matters when the engine
|
|
// is trying to figure out the ordering of foreign keys, for instance
|
|
|
|
import ( //revive:disable:blank-imports
|
|
_ "forgejo.org/models/actions"
|
|
_ "forgejo.org/models/activities"
|
|
_ "forgejo.org/models/auth"
|
|
_ "forgejo.org/models/forgefed"
|
|
_ "forgejo.org/models/perm/access"
|
|
_ "forgejo.org/models/repo"
|
|
)
|