mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-12 22:10:25 +00:00
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/10662 - create the 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 Co-authored-by: limiting-factor <limiting-factor@posteo.com> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10672 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org> Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
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"
|
|
)
|