mirror of
https://github.com/photoprism/photoprism.git
synced 2025-10-05 08:47:12 +08:00
These changes allow to configure the computer vision models through an optional vision.yml configuration file. Note that the API endpoints are not yet functional and require further work. Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -24,6 +24,9 @@ func TestMain(m *testing.M) {
|
||||
c := config.NewTestConfig("commands")
|
||||
get.SetConfig(c)
|
||||
|
||||
// Remember to close database connection.
|
||||
defer c.CloseDb()
|
||||
|
||||
// Init config and connect to database.
|
||||
InitConfig = func(ctx *cli.Context) (*config.Config, error) {
|
||||
return c, c.Init()
|
||||
@@ -32,9 +35,6 @@ func TestMain(m *testing.M) {
|
||||
// Run unit tests.
|
||||
code := m.Run()
|
||||
|
||||
// Close database connection.
|
||||
_ = c.CloseDb()
|
||||
|
||||
os.Exit(code)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user